openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Franck Wolff <>
Subject Re: Lazy initialisation questions
Date Tue, 16 Dec 2008 19:23:26 GMT
Pinaki Poddar a écrit :
> Hi,
>   1. What is the detachment configuration settings? 
>      <property name="openjpa.DetachState" value="?"/>
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?
>   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!

View raw message