title: Initialize JAXBContext in a post construct method
body: <p>I am using JAXB to convert an xml into a java object. Our application is event driven. When some event happens a method in the Parser class is called. We will receive the xml as a byte array.</p>
  
  <p>Since its very costly to create a JAXBContext every time when the event is fired and even meaningless. </p>
  
  <p>So I tried to shift this code to a post construct method. Then I realized JAXBConext.newInstance(Class) throws a JAXBException. Is it a good idea to put the initialization code here? If the creation fails due to some reason there is no meaning in processing the events now.</p>
  
  <p>Is there any other approach?</p>