use of org.jboss.jbossts.XTSService in project wildfly by wildfly.
the class XTSManagerService method start.
@Override
public synchronized void start(final StartContext context) throws StartException {
// XTS expects the TCCL to be set to something that will locate the XTS service implementation classes.
final ClassLoader loader = XTSService.class.getClassLoader();
WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(loader);
try {
ServerConfig serverConfigValue = wsServerConfig.getValue();
WSCEnvironmentBean wscEnVBean = XTSPropertyManager.getWSCEnvironmentBean();
if (coordinatorURL != null) {
wscEnVBean.setCoordinatorURL11(coordinatorURL);
} else {
//Defaults to insecure (http) on this server's bind address.
String defaultCoordinatorUrl = "http://" + serverConfigValue.getWebServiceHost() + ":" + serverConfigValue.getWebServicePort() + "/" + wscEnVBean.getCoordinatorPath11();
wscEnVBean.setCoordinatorURL11(defaultCoordinatorUrl);
}
wscEnVBean.setBindAddress11(serverConfigValue.getWebServiceHost());
wscEnVBean.setBindPort11(serverConfigValue.getWebServicePort());
wscEnVBean.setBindPortSecure11(serverConfigValue.getWebServiceSecurePort());
XTSService service = new XTSService();
try {
service.start();
} catch (Exception e) {
throw XtsAsLogger.ROOT_LOGGER.xtsServiceFailedToStart();
}
xtsService = service;
} finally {
WildFlySecurityManager.setCurrentContextClassLoaderPrivileged((ClassLoader) null);
}
}
Aggregations