JAXBContextHelper contextHelper = JAXBContextHelper.getInstance(registry);
// Force the JAXBContext to be cached
contextHelper.createJAXBContext(tContext, true);
long start = System.currentTimeMillis();
JAXB2OMElement t1 = new JAXB2OMElement(registry);
OMElement om = t1.transform(po, tContext);
long duration1 = System.currentTimeMillis() - start;
StringWriter sw = new StringWriter();
// serializeAndConsume() will trigger the JAXBDataSource.serialize(Writer, OMOutputFormat)
om.serializeAndConsume(sw);
System.out.println(sw.toString());