This one time, at band camp, Craig A. Vanderborgh said:

CAV>I have run into an unexpected problem that is causing us some grief.  It
CAV>seems that Castor persistent objects are not serializable.  I am trying
CAV>to return an object as the result of an EJB session bean method call.
CAV>In my Session EJB, I have something like the following:
...
CAV>If I simply "new up" a non-persistent Pick object and return it from my
CAV>getPick() Session EJB method, No Problem.  
CAV>
CAV>Does this mean that Castor objects, even really simple ones, are not
CAV>serializable?  I can see that if I were to use a transient Pick object
CAV>as a data transfer object and return that from getPick() that I could
CAV>get this to work.  But there would be a lot of copying needed in the
CAV>bean.  Is there a better way to deal with this?  Is it possible to
CAV>transform a Castor persistent object into transient one so that it can
CAV>be serialized?

Craig,

Castor JDO objects should be serializable with almost no problems. I've
used them in EJBs myself. One thing that will prohibit this is the use
of a Castor internal class named RelationCollection. This class is used
when employing Castor's lazy loading. Are you using lazy loading? Please
post the Pick object mapping.

Bruce
-- 
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'

The Castor Project 
http://www.castor.org/

Apache Geronimo 
http://incubator.apache.org/projects/geronimo.html

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to