use of org.jboss.jbossts.xts.environment.XTSEnvironmentBean in project cxf by apache.
the class XTSConfig method xtsService.
@Bean(name = "xtsService", initMethod = "start", destroyMethod = "stop")
public XTSService xtsService() {
XTSEnvironmentBean xtsEnvironmentBean = XTSPropertyManager.getXTSEnvironmentBean();
// xtsEnvironmentBean.setXtsInitialisations();
XTSService service = new XTSService();
return service;
}
use of org.jboss.jbossts.xts.environment.XTSEnvironmentBean in project narayana by jbosstm.
the class XTSService method start.
public void start() throws Exception {
XTSLogger.logger.info("JBossTS XTS Transaction Service - starting");
// execute startup for all registered initialisations
XTSEnvironmentBean xtsEnvironmentBean = XTSPropertyManager.getXTSEnvironmentBean();
Iterator<String> iterator = xtsEnvironmentBean.getXtsInitialisations().iterator();
while (iterator.hasNext()) {
String className = iterator.next();
Class<?> clazz = null;
try {
clazz = CoordinatorRecoveryInitialisation.class.getClassLoader().loadClass(className);
} catch (ClassNotFoundException cnfe) {
XTSLogger.i18NLogger.error_XTSService_1(className, cnfe);
continue;
}
if (!XTSInitialisation.class.isAssignableFrom(clazz)) {
XTSLogger.i18NLogger.error_XTSService_2(className);
continue;
}
try {
XTSInitialisation initialisation = (XTSInitialisation) clazz.newInstance();
initialisation.startup();
xtsInitialisations.add(initialisation);
} catch (InstantiationException ie) {
XTSLogger.i18NLogger.error_XTSService_3(className, ie);
} catch (IllegalAccessException iae) {
XTSLogger.i18NLogger.error_XTSService_4(className, iae);
}
}
TaskManagerInitialisation();
}
Aggregations