TxInterceptorImpl txinterceptor = new TxInterceptorImpl();
txinterceptor.setTransactionManager(tm);
txinterceptor.setTxMetaDataHelper(txenhancer);
TxElementHandler namespaceHandler = new TxElementHandler();
namespaceHandler.setTransactionInterceptor(txinterceptor);
namespaceHandler.setTxMetaDataHelper(txenhancer);
Properties props = new Properties();
props.put("osgi.service.blueprint.namespace", new String[]{"http://aries.apache.org/xmlns/transactions/v1.0.0", "http://aries.apache.org/xmlns/transactions/v1.1.0"});
ctx.registerService(NamespaceHandler.class.getName(), namespaceHandler, props);
}