Return-Path: Delivered-To: apmail-openjpa-users-archive@locus.apache.org Received: (qmail 12286 invoked from network); 16 Dec 2008 19:24:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Dec 2008 19:24:03 -0000 Received: (qmail 99223 invoked by uid 500); 16 Dec 2008 19:24:15 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 99204 invoked by uid 500); 16 Dec 2008 19:24:15 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 99193 invoked by uid 99); 16 Dec 2008 19:24:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Dec 2008 11:24:15 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [213.251.154.83] (HELO mx1.adequatesystems.com) (213.251.154.83) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Dec 2008 19:24:00 +0000 Received: from [192.168.0.53] (unknown [212.234.48.58]) by mx1.adequatesystems.com (Postfix) with SMTP id 2ADE468196 for ; Tue, 16 Dec 2008 20:24:55 +0100 (CET) Message-ID: <4948002E.5000108@graniteds.org> Date: Tue, 16 Dec 2008 20:23:26 +0100 From: Franck Wolff Organization: Granite Data Services User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: users@openjpa.apache.org Subject: Re: Lazy initialisation questions References: <4947B7E8.9090205@graniteds.org> <1229442765558-1663486.post@n2.nabble.com> <4947E2C3.30708@graniteds.org> <1229451403686-1664168.post@n2.nabble.com> In-Reply-To: <1229451403686-1664168.post@n2.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Adequate-Systems-MailScanner-Information: Please contact the ISP for more information X-Adequate-Systems-MailScanner-ID: 2ADE468196.11A93 X-Adequate-Systems-MailScanner: Found to be clean X-Adequate-Systems-MailScanner-From: franck.wolff@graniteds.org X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No Pinaki Poddar a �crit : > Hi, > 1. What is the detachment configuration settings? > > I don't know. I use a vanilla WebLogic 10.3 server and deploy a standard ear test application (with EJB3 session and entity beans)... > 2. Does the entities have version field defined? > Yes. > 3. I do not work on multi-tier/multi-language application development and > hence my statements can be fairly inaccurate. But if you allow a bit of > self-promotion I will suggest a reference. Back in early 2006, just because > of sheer corporate decisions, I had written a 'Sample AJAX application' when > every conference session that had 'AJAX' in its title used to ensure very > high attendance. This 'application' demonstrated how you can detach a > persistent object graph (or rather a configurable sub-graph), transport it > to a remote Web tier where they materialize not as Java objects but as > JavaScript objects, gets modified and merged back to a different persistent > context. The inter-language conversion was handled by DWR (Direct Web > Remoting). > This seems to be very close to what I am trying to do (just replace Ajax by Flex, JavaScript by ActionScript3 and DWR by AMF3). But how did you deal with uninitialized properties? My code already work with fully initialized entities, my problem is only with uninitialized ones. > A BEA dev2dev blog was posted to explain the bits but that blog does not > exist anymore. However, this sample (it is reasonably documented and comes > with source code) can still (at least since I last looked:) be found in > Weblogic 9.x download as a Sample EJB3/AJAX application. I do not remember > the details anymore but if you can access that application, it may provide > some useful pointers for the problem you are addressing. > I couldn't find it in 10.3 sample apps (ok, I didn't search for a long time ;-) What is the name of this app? > 4. In essence, if (a big if) I have followed the use case you have > described, I will do the following > > a) decide on my detachment strategy (based on the environmental > constraints on the remote tier) and configure OpenJPA accordingly > b) use fetch graphs to configure detached sub-graph per use case > c) use an utility (e.g. DWR, JSON etc) for inter-language object > conversion > d) not attempt to recreate a entity graph by hand > I'm not trying to recreate a entity graph by hand (I have a AMF3 deserializer that already creates the entire graph for me), I'm just trying to restore lazy loaded metadata before the bean is merged back. Thanks a lot for your help! Franck.