use of org.apache.cxf.jca.core.resourceadapter.UriHandlerInit in project cxf by apache.
the class JCABusFactory method init.
protected synchronized void init() throws ResourceException {
LOG.info("Initializing the CXF Bus ...");
new UriHandlerInit();
ClassLoader original = Thread.currentThread().getContextClassLoader();
try {
ClassLoader cl = this.getClass().getClassLoader();
// ensure resourceadapter: url handler can be found by URLFactory
Thread.currentThread().setContextClassLoader(cl);
// TODO Check for the managed connection factory properties
// TODO We may need get the configuration file from properties
BusFactory bf = BusFactory.newInstance();
bus = bf.createBus();
initializeServants();
} catch (ResourceAdapterInternalException ex) {
throw ex;
} catch (Exception ex) {
throw new ResourceAdapterInternalException(new Message("FAIL_TO_INITIALIZE_JCABUSFACTORY", BUNDLE).toString(), ex);
} finally {
Thread.currentThread().setContextClassLoader(original);
}
}
Aggregations