ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dawson Lewis <hardcore...@yahoo.com.br>
Subject Re: LazyLoading and CGLIB return wrong types
Date Wed, 29 Jul 2009 07:09:18 GMT

Hi,
I am aware of that , but there are so many fields to exclude. It should not
be that way .
Plus it is really annoying to track all those classes iBatis is creating.

Look at the following XML snippet xStream is producing
<addresses class="dynamic-proxy">

I may able of omitting fields but how do I get rid of the class attribute ?

I tried type casting before serializing but it also does not work.

Stelio

cmathrusse wrote:
> 
> XStream already has the capability to exclude specific fields from the 
> serialization. It's rather easy:
> 
> com.thoughtworks.xstream.XStream xstream;
> ...
> xstream.omitField(YouriBatisClass.class, "fieldName");
> 
> That's it! You can omit as many fields as you want.
> You can even omit them with Annotations but I don't think that would help 
> much with CGLIB generated classes.
> 
> Chris Mathrusse
> christopher.mathrusse@sybase.com
> Sybase, Inc
> 
> 
> 
> 
> From:
> Clinton Begin <clinton.begin@gmail.com>
> To:
> user-java@ibatis.apache.org
> Date:
> 07/28/2009 06:10 AM
> Subject:
> Re: LazyLoading and CGLIB return wrong types
> 
> 
> 
> You'll have to paste it in, as attachements get stripped.
> 
> I think I've seen it before though, a bunch of $adfweragvav type fields.  
> I wish there was a way in XStream to ignore fields that start with $ or 
> something.  You'd have the same problem with any framework that uses CGLIB 
> or ASM etc. 
> 
> I've heard that Betwixt might be a good alternative to XStream in this 
> regard.  Or you could try modifying XStream to ignore $ fields and subit a 
> patch back to them. 
> 
> Cheers,
> Clinton
> 
> On Tue, Jul 28, 2009 at 2:35 AM, Dawson Lewis <hardcoreehb@yahoo.com.br> 
> wrote:
> 
> Hi,
> It is what I am doing , I am using xStream 1.3  for serializing , I was
> using the 1.3.1 version before but it could not serialize synchronized
> collections , then I switch to 1.3. It seems that xStream is also
> serializing those objects created by iBatis at runtime . Have a look at 
> the
> xml file generated by xStream , see how much "garbage" (meaning no
> disrespect for either iBatis or xStream because I love them both) is being
> added.
> 
> I do not want to serialize  these iBatis enhanced objects  .
> 
> Regards,
> Stelio
> 
> 
> 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
> 
> --
> View this message in context: 
> http://www.nabble.com/LazyLoading-and-CGLIB-return-wrong-types-tp24607048p24694842.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/LazyLoading-and-CGLIB-return-wrong-types-tp24607048p24713673.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message