AW: [xstream-user] Hibernate associations

2012-10-18 Thread Sebastian Götz
OK, I have it working now with a slightly different solution as state before: public void export() { ZipOutputStream zip; ListClass? entityClasses; ListClass? annotations = new ArrayList(); final int batchSize = 50; Number count; Criteria query;

[xstream-user] Re: AW: Hibernate associations

2012-10-18 Thread Jörg Schaible
Hi, Sebastian Götz wrote: Hi Jaime, after trying ym own solution I finally understand what you intended with your approach. But let me post some code of how I am doing it: private XStream createXstreamInstance(final Class? p_clazz) { XStream xstream = new XStream()

Re: [xstream-user] Hibernate associations

2012-10-18 Thread Jaime Metcher
Hi Sebastian, Yep, your solution is pretty much exactly what I had in mind. I did misread the code - the converter does indeed get invoked on the top level object. Jame

Re: [xstream-user] Re: AW: Hibernate associations

2012-10-18 Thread Jaime Metcher
Jörg, I think you've lost me there. Can you elaborate a bit? I'm not sure why you want to call super.marshal every time you see a new entity. Also, my recollection is that you don't need to worry about the HibernateProxyConverter as registering it with high priority means it will already have

AW: [xstream-user] Re: AW: Hibernate associations

2012-10-18 Thread Sebastian Götz
Yes that’s what I found out debugging. The ProxyConverter will unwrap the proxy prior to calling the ReflectionConverter. So we can easily leave it out of the discussion. Von: Jaime Metcher [mailto:jmetc...@gmail.com] Gesendet: Donnerstag, 18. Oktober 2012 10:24 An: user@xstream.codehaus.org

[xstream-user] Re: Re: AW: Hibernate associations

2012-10-18 Thread Jörg Schaible
Hi Jaime, Jaime Metcher wrote: Jörg, I think you've lost me there. Can you elaborate a bit? I'm not sure why you want to call super.marshal every time you see a new entity. Because that's what is called normally without my version of the custom converter. Also, my recollection is that

Re: [xstream-user] Re: Issues with Xstream 1.4.3 on OSX

2012-10-18 Thread Timotej Ecimovic
This seems to be the same problem as reported in eclipse bug database: https://bugs.eclipse.org/bugs/show_bug.cgi?id=345652 Another thread: http://lists.apple.com/archives/java-dev/2008/May/msg00116.html suggest that some other awt classes do load fine, seems like java.awt.Color is a bad

Re: [xstream-user] Re: XStream and DigestInputStream

2012-10-18 Thread Joshua Turner
Jörg: That did the trick! Thanks kindly for your help. Josh On 12-10-18 01:04 PM, Jörg Schaible wrote: Hi Josh, Joshua Turner wrote: Hi all -- I'm using XStream to process large streams of objects via ObjectInputStream. As one of my requirements, I have to validate the SHA1