Meaningless Drivel is fun!
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

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "JAXB Object Load time" Watch "JAXB Object Load time" New topic

JAXB Object Load time

Sunder Raman Balakrishnan

Joined: Mar 07, 2007
Posts: 3

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.

Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
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

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.

Any pointers in this regard will help us a lot.

I agree. Here's the link:
subject: JAXB Object Load time
It's not a secret anymore!