[jboss-user] [EJB 3.0] - Re: Detach entities - Obtaining a clear pojo

fatbatman do-not-reply at jboss.com
Sun Sep 3 07:04:23 EDT 2006


I also need to obtain a completely clean Pojo.

I currently serialise detached entities then send them over a network to a remote client which is an applet that has no concept of EJB3 (no ejb jars on classpath).  Here the client treats them as Pojos. 

When running a full round trip unit test in which a detached obj is sent to the client, if a field/association is not initialised then I want a null value, not a LazyInitialisationException.  But because in the test case the client and server are both run within the same JVM I get a LazyInitialisationException.  
If I was able to get a completely clean Pojo, this wouldn't happen.
Is there some standard way of doing this?  like a;
Object getCompletelyDetachedClone(obj)  method?

thanks in advance

James

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969090#3969090

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969090



More information about the jboss-user mailing list