org.kie.remote.services.rest.jaxb
Class JaxbContextManager
java.lang.Object
org.kie.remote.services.rest.jaxb.JaxbContextManager
@ApplicationScoped
public class JaxbContextManager
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JaxbContextManager
public JaxbContextManager()
createDeploymentLockObjectOnDeploy
public void createDeploymentLockObjectOnDeploy(@Observes
org.jbpm.kie.services.impl.event.DeploymentEvent event)
- Adds a deployment lock object.
- Parameters:
event - The DeploymentEvent fired on deployment
cleanUpOnUndeploy
public void cleanUpOnUndeploy(@Observes
org.jbpm.kie.services.impl.event.DeploymentEvent event)
- Remove the cached
JAXBContext and deployment lock object
It's VERY important that the cached JAXBContext instance be removed! The new deployment
may contain a different version of a class with the same name. Keeping the old class definition
will cause problems!
- Parameters:
event - The DeploymentEvent fired on an undeploy of a deployment
getJaxbContext
public JAXBContext getJaxbContext(Class<?> type,
javax.ws.rs.core.UriInfo uriInfo)
- This method does the following:
- Determine the deployment id from the
UriInfo instance.
- If the deployment id can not be determined, return a default
JAXBContext instance.
- If a
JAXBContext instance has already been created for this deployment,
retrieve it from the JAXBContext cache (contextsCache) and return it.
- Create a
JAXBContext instance based on the classes from the appropriate deployment.
- Cache the
JAXBContext instance and return it.
- Parameters:
type - The Class of the new object that should be deserialized by returned JAXBContext.uriInfo - A UriInfo instance needed to determine the deployment containing the necessary classes.
- Returns:
- A
JAXBContext instance
Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.