Return-Path: X-Original-To: apmail-cayenne-commits-archive@www.apache.org Delivered-To: apmail-cayenne-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EE3CF8FCA for ; Mon, 22 Aug 2011 11:55:41 +0000 (UTC) Received: (qmail 82080 invoked by uid 500); 22 Aug 2011 11:52:41 -0000 Delivered-To: apmail-cayenne-commits-archive@cayenne.apache.org Received: (qmail 57869 invoked by uid 500); 22 Aug 2011 11:50:46 -0000 Mailing-List: contact commits-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list commits@cayenne.apache.org Received: (qmail 47483 invoked by uid 99); 22 Aug 2011 11:49:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Aug 2011 11:49:42 +0000 X-ASF-Spam-Status: No, hits=-1999.9 required=5.0 tests=ALL_TRUSTED,DATE_IN_PAST_03_06,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Aug 2011 11:49:39 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 0FE9CAAE31 for ; Mon, 22 Aug 2011 06:14:29 +0000 (UTC) Date: Mon, 22 Aug 2011 06:14:29 +0000 (UTC) From: "John Huss (JIRA)" To: commits@cayenne.apache.org Message-ID: <1795395341.341.1313993669061.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1594721617.338.1313993549103.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (CAY-1604) Android support for ROP apps MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CAY-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] John Huss updated CAY-1604: --------------------------- Attachment: tutorial-rop-android.zip cayenne-android-support.patch Patch and example Android application > Android support for ROP apps > ---------------------------- > > Key: CAY-1604 > URL: https://issues.apache.org/jira/browse/CAY-1604 > Project: Cayenne > Issue Type: Improvement > Components: ROP > Affects Versions: 3.1M2 > Environment: Tested Android 2.3, Cayenne 3.1 > Reporter: John Huss > Priority: Minor > Labels: patch > Attachments: cayenne-android-support.patch, tutorial-rop-android.zip > > Original Estimate: 168h > Remaining Estimate: 168h > > I tried out Cayenne ROP on Android and this is what I found: it doesn't work out of the box, but it can be made to work with a bit of effort. > The Hessian library refers to a few classes that are not present in Android: > java.rmi.Remote > java.rmi.RemoteException > Cayenne itself refers to a few other classes missing in Android: > java.beans.PropertyDescriptor > java.beans.IntrospectionException > So references to these need to be dealt with. Here is what I did: > 1) Use the existing open source"hessdroid" library instead of the regular hessian library > 2) Remove reference to java.rmi.Remote from org.apache.cayenne.remote.RemoteService > 3) Change RemoteException to IOException in org.apache.cayenne.remote.RemoteService > 4) Use the java.beans code from Apache Harmony repackaged as com.googlecode.openbeans. I created the "openbeans" project on Google Code to host this code. > Only the cayenne-client library needs to be changed in this way. The server can stay the same, but it needs to have access to the openbeans library so that those classes are defined. > With these changes I was able to run the ROP client tutorial code in an Android app. I've attached the patch so you can see exactly what was needed. I don't know what the proper course of action would be to integrate something like this; presumably these aren't the kind of changes you would want to make to the core library, just to an android-only version. So maybe you have an idea. > I've attached the patch and the example project. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira