Hi Jörg, Jörg Schaible <joerg.schaible@...> writes:
> > Actually I have no experience with the Hibernate stuff at all, therefore I > don't know, if it really can make a difference. However, I'd be wondering. > > Can you create a version of the classes above without the Hibernate stuff, > create an instance and marshal that to XML? > > How do you initialize the XStream instance? > > - Jörg > I'll double check without the Hibernate mappings on Monday. But one of the benefits of the Hibernate extension is automatic loading of lazy collections and attributes. I would rather not miss this, as the above code is just a small portion of the data model. I pretty much initialize the xstream following the tutorial: final XStream xstream = new XStream(new StaxDriver()) { @Override protected MapperWrapper wrapMapper(final MapperWrapper next) { return new HibernateMapper(next); } }; Mapper mapper = xstream.getMapper(); xstream.registerConverter(new HibernateProxyConverter()); xstream.registerConverter(new HibernatePersistentCollectionConverter(mapper)); xstream.registerConverter(new HibernatePersistentMapConverter(mapper)); xstream.registerConverter(new HibernatePersistentSortedMapConverter(mapper)); xstream.registerConverter(new HibernatePersistentSortedSetConverter(mapper)); String xml = xstream.toXML(workflowRole); I would appreciate if you or anyone else has some other ideas. Thanks, Alexander --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email