aspose file tools*
The moose likes Web Services and the fly likes JAXB Object Load time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "JAXB Object Load time" Watch "JAXB Object Load time" New topic
Author

JAXB Object Load time

Sunder Raman Balakrishnan
Greenhorn

Joined: Mar 07, 2007
Posts: 3
Hi

We see in some scenario unmarshall of XML string .. to equivalent JAXB xml object is consuming significant amount of processing time.. is there a way to reduce /tweak this time to minimum - any configurable prameters that can be played with?

Appreciate your time in this regard.

Thanks
sunder
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Have you tried to re-use the JAXBContext? The JAXBContext is thread-safe and can be re-used.
If you want to further experiment, then you can also try to pool Marshaller and Unmarshaller instances, in order not to have to create new ones all the time. Note that Marshaller and Unmarshaller instances are not thread-safe.
The JavaSE 6 API documentation of Marshaller and Unmarshaller contains a list of the properties connected to respective entity.
Best wishes!
Sunder Raman Balakrishnan
Greenhorn

Joined: Mar 07, 2007
Posts: 3
Thanks Ivan...

We will surely try this out... and will let you know the results.. further we are using XMLBeans in some scenario's can you help us how to optimize this load time.. I posted a seperate message in this regard.

http://www.coderanch.com/t/446236/Web-Services/java/XMLBeans-XmlObject-newInstance-load-time

Any pointers in this regard will help us a lot.

Thanks
sunder
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JAXB Object Load time