This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAXB Object Load time

 
Sunder Raman Balakrishnan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic