Currently our application is not leveraging the xml transformers that spring integration provides. Instead it is creating one JaxbContext then from that JaxbContext creating a pool of JAXB unmarshallers/marshallers and wiring these into service activiators. We create the pool so as to not incur the cost of creating marshallers and unmarshallers for each operation.
As part of a re factoring effort we decided we should make use of the xml transformers. While attempting to implement we've discovered that the org.spring.oxm.Marshaller implementations do not support pooling of marshallers/unmarshallers, because UnmarshallingTransformer by spring integration expects and implementation of org.spring.oxm.Marshaller. Each implementation of org.spring.oxm.Marshaller creates an new javax.xml.bind.Unmarshaller when the unmarshal method is called
Finally I've given enough background for my question. Is creating a new Unmarshaller for each unmarshal operation not a performance concern? According to the jaxb ri documentation it does impact performance. As a counter argument a lead on jaxb project states that they are lightweight