use of org.jboss.jbossts.xts.environment.WSCEnvironmentBean in project narayana by jbosstm.
the class TerminationCoordinatorRPCInitialisation method startup.
public static void startup() {
final ServiceRegistry serviceRegistry = PrivilegedServiceRegistryFactory.getInstance().getServiceRegistry();
WSCEnvironmentBean wscEnvironmentBean = XTSPropertyManager.getWSCEnvironmentBean();
String bindAddress = wscEnvironmentBean.getBindAddress11();
int bindPort = wscEnvironmentBean.getBindPort11();
int secureBindPort = wscEnvironmentBean.getBindPortSecure11();
WSTEnvironmentBean wstEnvironmentBean = XTSPropertyManager.getWSTEnvironmentBean();
String coordinatorServiceURLPath = wstEnvironmentBean.getCoordinatorServiceURLPath();
if (coordinatorServiceURLPath == null) {
coordinatorServiceURLPath = "/ws-t11-coordinator";
}
if (bindAddress == null) {
bindAddress = "localhost";
}
if (bindPort == 0) {
bindPort = 8080;
}
if (secureBindPort == 0) {
secureBindPort = 8443;
}
final String baseUri = "http://" + bindAddress + ":" + bindPort + coordinatorServiceURLPath;
final String uri = baseUri + "/" + ArjunaTX11Constants.TERMINATION_COORDINATOR_RPC_SERVICE_NAME;
final String secureBaseUri = "https://" + bindAddress + ":" + secureBindPort + coordinatorServiceURLPath;
final String secureUri = secureBaseUri + "/" + ArjunaTX11Constants.TERMINATION_COORDINATOR_RPC_SERVICE_NAME;
serviceRegistry.registerServiceProvider(ArjunaTX11Constants.TERMINATION_COORDINATOR_RPC_SERVICE_NAME, uri);
serviceRegistry.registerSecureServiceProvider(ArjunaTX11Constants.TERMINATION_COORDINATOR_RPC_SERVICE_NAME, secureUri);
}
use of org.jboss.jbossts.xts.environment.WSCEnvironmentBean in project narayana by jbosstm.
the class WSCOORClient method getRegistrationPortMap.
private static MAP getRegistrationPortMap(Map<String, Object> requestContext) {
final WSCEnvironmentBean wscEnvironmentBean = XTSPropertyManager.getWSCEnvironmentBean();
MAP map;
if (WSCEnvironmentBean.SECURE_ASYNC_REQUEST.equals(wscEnvironmentBean.getUseAsynchronousRequest())) {
String responseService = PrivilegedServiceRegistryFactory.getInstance().getServiceRegistry().getSecureServiceURI(CoordinationConstants.REGISTRATION_RESPONSE_SERVICE_NAME);
String faultService = PrivilegedServiceRegistryFactory.getInstance().getServiceRegistry().getSecureServiceURI(CoordinationConstants.COORDINATION_SOAP_FAULT_SERVICE_NAME);
WSCLogger.logger.tracev("WSCOORClient Using secure endpoints {0} {1}", responseService, faultService);
map = AddressingHelper.outboundMap(requestContext, responseService, faultService);
} else if (WSCEnvironmentBean.PLAIN_ASYNC_REQUEST.equals(wscEnvironmentBean.getUseAsynchronousRequest())) {
String responseService = PrivilegedServiceRegistryFactory.getInstance().getServiceRegistry().getServiceURI(CoordinationConstants.REGISTRATION_RESPONSE_SERVICE_NAME);
String faultService = PrivilegedServiceRegistryFactory.getInstance().getServiceRegistry().getServiceURI(CoordinationConstants.COORDINATION_SOAP_FAULT_SERVICE_NAME);
WSCLogger.logger.tracev("WSCOORClient Using plain endpoints {0} {1}", responseService, faultService);
map = AddressingHelper.outboundMap(requestContext, responseService, faultService);
} else {
WSCLogger.logger.tracev("WSCOORClient Using anonymous endpoints");
map = AddressingHelper.outboundMap(requestContext);
}
return map;
}
use of org.jboss.jbossts.xts.environment.WSCEnvironmentBean in project narayana by jbosstm.
the class RegistrationCoordinatorFaultInitialisation method startup.
/**
* The context has been initialized.
*/
public static void startup() {
// TODO work out how to configure the endpoint name here
final ServiceRegistry serviceRegistry = PrivilegedServiceRegistryFactory.getInstance().getServiceRegistry();
WSCEnvironmentBean wscEnvironmentBean = XTSPropertyManager.getWSCEnvironmentBean();
String bindAddress = wscEnvironmentBean.getBindAddress11();
int bindPort = wscEnvironmentBean.getBindPort11();
int secureBindPort = wscEnvironmentBean.getBindPortSecure11();
String serviceURLPath = wscEnvironmentBean.getServiceURLPath();
if (serviceURLPath == null) {
serviceURLPath = "/ws-c11";
}
if (bindAddress == null) {
bindAddress = "localhost";
}
if (bindPort == 0) {
bindPort = 8080;
}
if (secureBindPort == 0) {
secureBindPort = 8443;
}
final String baseUri = "http://" + bindAddress + ":" + bindPort + serviceURLPath;
final String uri = baseUri + "/CoordinationFaultService";
final String secureBaseUri = "https://" + bindAddress + ":" + secureBindPort + serviceURLPath;
final String secureUri = secureBaseUri + "/CoordinationFaultService";
serviceRegistry.registerServiceProvider(CoordinationConstants.COORDINATION_SOAP_FAULT_SERVICE_NAME, uri);
serviceRegistry.registerSecureServiceProvider(CoordinationConstants.COORDINATION_SOAP_FAULT_SERVICE_NAME, secureUri);
;
}
use of org.jboss.jbossts.xts.environment.WSCEnvironmentBean in project narayana by jbosstm.
the class RegistrationCoordinatorResponseInitialisation method startup.
/**
* The context has been initialized.
*/
public static void startup() {
// TODO work out how to configure the endpoint name here
final ServiceRegistry serviceRegistry = PrivilegedServiceRegistryFactory.getInstance().getServiceRegistry();
WSCEnvironmentBean wscEnvironmentBean = XTSPropertyManager.getWSCEnvironmentBean();
String bindAddress = wscEnvironmentBean.getBindAddress11();
int bindPort = wscEnvironmentBean.getBindPort11();
int secureBindPort = wscEnvironmentBean.getBindPortSecure11();
String serviceURLPath = wscEnvironmentBean.getServiceURLPath();
if (serviceURLPath == null) {
serviceURLPath = "/ws-c11";
}
if (bindAddress == null) {
bindAddress = "localhost";
}
if (bindPort == 0) {
bindPort = 8080;
}
if (secureBindPort == 0) {
secureBindPort = 8443;
}
final String baseUri = "http://" + bindAddress + ":" + bindPort + serviceURLPath;
final String uri = baseUri + "/RegistrationResponseService";
final String secureBaseUri = "https://" + bindAddress + ":" + secureBindPort + serviceURLPath;
final String secureUri = secureBaseUri + "/RegistrationResponseService";
serviceRegistry.registerServiceProvider(CoordinationConstants.REGISTRATION_RESPONSE_SERVICE_NAME, uri);
serviceRegistry.registerSecureServiceProvider(CoordinationConstants.REGISTRATION_RESPONSE_SERVICE_NAME, secureUri);
;
}
use of org.jboss.jbossts.xts.environment.WSCEnvironmentBean in project narayana by jbosstm.
the class ProxyListenerService method init.
/**
* Initialise the servlet.
* @param config The servlet configuration.
*/
public void init(final ServletConfig config) throws ServletException {
super.init(config);
// Initialise the local host:port/urlstub for the proxy.
WSCEnvironmentBean wscEnvironmentBean = XTSPropertyManager.getWSCEnvironmentBean();
String bindAddress = wscEnvironmentBean.getBindAddress11();
int bindPort = wscEnvironmentBean.getBindPort11();
String baseURI = "http://" + bindAddress + ":" + bindPort + "/sc007";
final String proxyServiceURI = baseURI + "/proxy";
ProxyURIRewriting.setProxyURI(proxyServiceURI);
}
Aggregations