Have you tried serializing to XStream or another alternative, instead of
using Java's serialization?  While this is a limitation of iBATI 2 (version
3 solves it somewhat, but still not between systems), you should never
depend on Java serialization for connecting two systems.  You should choose
a more canonical serialization process.  XStream is my personal favourite,
but there are many others (even some binary).

Java serialization is a bad thing to depend upon.

Cheers,
Clinton

On Mon, Jul 27, 2009 at 1:44 AM, Dawson Lewis <hardcore...@yahoo.com.br>wrote:

>
> Hi,
> Do you have any clue in how to do that ?
> I created a clone method for the Address class so every object is cloned
> before it is serialized. It works fine but do you think this is a good idea
> ?
>
> Best Regards
>
> Stelio
>
> Larry Meadors wrote:
> >
> > You should be able to, yeah.
> >
> > Larry
> >
> >
> > On Thu, Jul 23, 2009 at 12:39 AM, Dawson Lewis<hardcore...@yahoo.com.br>
> > wrote:
> >>
> >> Thanks for you reply Larry,
> >>
> >> Is there a way I can get the "normal" Address objects ? I need to
> >> serialize
> >> those objects to XML , the extra fields in these enhanced classes will
> >> create problems when deserializing because maybe the application that
> >> will
> >> deserialize is not using iBatis. Can't I just disable lazy loading and
> >> CGLIB
> >> for performing serialization ?
> >>
> >> Regards
> >>
> >>
> >> Larry Meadors wrote:
> >>>
> >>> They are still Address objects, just enhanced ones.
> >>>
> >>> Larry
> >>>
> >>>
> >>> On Wed, Jul 22, 2009 at 7:58 AM, Dawson Lewis<hardcore...@yahoo.com.br
> >
> >>> wrote:
> >>>>
> >>>> Hi ,
> >>>>
> >>>> I have an object with a List property - List<Address> addresses, after
> >>>> iBatis populates this object  the addresses fields will not contain a
> >>>> list
> >>>> of address objects but a List$$EnhancerCGLIBb$$475a4210 , according to
> >>>> the
> >>>> eclipse debugger.
> >>>>
> >>>> This only happens when lazyLoadingEnabled and enhancementEnabled are
> >>>> set
> >>>> to
> >>>> true.
> >>>>
> >>>> Is there anyway I can get  a list of addresses (List<Address>) without
> >>>> disabling lazy loading or enhancement ?
> >>>>
> >>>> Best regards
> >>>> --
> >>>> View this message in context:
> >>>>
> http://www.nabble.com/LazyLoading-and-CGLIB-return-wrong-types-tp24607048p24607048.html
> >>>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
> >>>> For additional commands, e-mail: user-java-h...@ibatis.apache.org
> >>>>
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
> >>> For additional commands, e-mail: user-java-h...@ibatis.apache.org
> >>>
> >>>
> >>>
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/LazyLoading-and-CGLIB-return-wrong-types-tp24607048p24620151.html
> >> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
> >> For additional commands, e-mail: user-java-h...@ibatis.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
> > For additional commands, e-mail: user-java-h...@ibatis.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/LazyLoading-and-CGLIB-return-wrong-types-tp24607048p24675025.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
> For additional commands, e-mail: user-java-h...@ibatis.apache.org
>
>

Reply via email to