public interface JaxbContextCache
JAXBContext instances per message type.
It is used to achieve better performance when marshalling or unmarshalling MX messages.
| Modifier and Type | Method and Description |
|---|---|
javax.xml.bind.JAXBContext |
get(java.lang.Class messageClass,
java.lang.Class<?>[] classes)
Returns the cached context to marshall or unmarshall a message.
|
javax.xml.bind.JAXBContext get(java.lang.Class messageClass,
java.lang.Class<?>[] classes)
throws javax.xml.bind.JAXBException,
java.util.concurrent.ExecutionException
Cache implementations should be per message type, so the actual message class name could be used as key.
Regarding the JAXBContext creation, notice the namespace or package cannot be used because all dictionary
classes in the model share the same "dic" package. However the classes for each message are available in the API
and made available here. The context can be created directly with: JAXBContext.newInstance(classes)
messageClass - class of the message to be read or writtenclasses - comprehensive list of classes for the contextjavax.xml.bind.JAXBExceptionjava.util.concurrent.ExecutionException