[Fix Pack 25 or later]


Reducing the time required to create the JAXBContext

A search of the classloader for potential JAXB classes is performed every time a web services application is invoked. If the search process for your application is lengthy, there are ways to reduce the amount of time the system spends creating the JAXBContext for your application.

Creation of the JAXBContext object can be divided into three steps.
  1. Creating the list of packages that might contain JAXB classes. The list is created based on the contents of the WSDL and annotations.
    There are no options to reduce the time required to create the list of packages. However, it is important to know that some corner cases and unique usage scenarios, might cause a package that does not contain JAXB classes to be included in the package list. Following is an example of a trace message that indicates a package is included that does not contain any JAXB classes:
    Here is an example trace that indicates this situation12/2/11 6:24:40:548 PST] 0000003e JAXBUtils 1 org.apache.axis2.jaxws.message.databinding.JAXBUtils createJAXBContextValue Package com.company.queryall.v1 does not have any JAXB classes. It is removed from the JAXB context path.

    For each occurrence of this message, you should include an empty jaxb.index file in the package to indicate there are no JAXB classes. If this action is not taken, the time consuming JAXB class search occurs.

  2. Determining the signature of JAXBContext.newInstance() to be invoked. Because JAXBContext.newInstance() can be invoked with either a list of packages, or a list of JAXB classes, you must decide which approach to use based on your goals.
  3. Invoking the JAXBContext.newInstance() which actually creates the JAXBContext object.

Completing the following actions might reduce the amount of time required to create the JAXBContext




Related reference
Web services specifications and APIs
Java virtual machine custom properties
Concept topic Concept topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Jun 11, 2013 8:40:09 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=v701sca&product=was-nd-mp&topic=cwbs_tuning_jaxbcontext
File name: cwbs_tuning_jaxbcontext.html