use of com.arjuna.webservices11.ServiceRegistry in project narayana by jbosstm.
the class CoordinatorCompletionCoordinatorInitialisation 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 + "/" + BusinessActivityConstants.COORDINATOR_COMPLETION_COORDINATOR_SERVICE_NAME;
final String secureBaseUri = "https://" + bindAddress + ":" + secureBindPort + coordinatorServiceURLPath;
final String secureUri = secureBaseUri + "/" + BusinessActivityConstants.COORDINATOR_COMPLETION_COORDINATOR_SERVICE_NAME;
serviceRegistry.registerServiceProvider(BusinessActivityConstants.COORDINATOR_COMPLETION_COORDINATOR_SERVICE_NAME, uri);
serviceRegistry.registerSecureServiceProvider(BusinessActivityConstants.COORDINATOR_COMPLETION_COORDINATOR_SERVICE_NAME, secureUri);
}
use of com.arjuna.webservices11.ServiceRegistry in project narayana by jbosstm.
the class BAParticipantInitialisation method contextInitialized.
/**
* The context has been initialized.
* @param servletContextEvent The servlet context event.
*/
public void contextInitialized(final ServletContextEvent servletContextEvent) {
ServletContext context = servletContextEvent.getServletContext();
WSCEnvironmentBean wscEnvironmentBean = XTSPropertyManager.getWSCEnvironmentBean();
String bindAddress = wscEnvironmentBean.getBindAddress11();
int bindPort = wscEnvironmentBean.getBindPort11();
String baseURI = "http://" + bindAddress + ":" + bindPort + "/interop11";
final String uri = baseURI + "/BAParticipantService";
final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry();
serviceRegistry.registerServiceProvider(BAInteropConstants.SERVICE_PARTICIPANT, uri);
}
use of com.arjuna.webservices11.ServiceRegistry in project narayana by jbosstm.
the class BAInitiatorInitialisation method contextDestroyed.
/**
* The context is about to be destroyed.
* @param servletContextEvent The servlet context event.
*/
public void contextDestroyed(final ServletContextEvent servletContextEvent) {
final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry();
serviceRegistry.removeServiceProvider(BAInteropConstants.SERVICE_INITIATOR);
;
}
use of com.arjuna.webservices11.ServiceRegistry in project narayana by jbosstm.
the class BAInitiatorInitialisation method contextInitialized.
/**
* The context has been initialized.
* @param servletContextEvent The servlet context event.
*/
public void contextInitialized(final ServletContextEvent servletContextEvent) {
ServletContext context = servletContextEvent.getServletContext();
WSCEnvironmentBean wscEnvironmentBean = XTSPropertyManager.getWSCEnvironmentBean();
String bindAddress = wscEnvironmentBean.getBindAddress11();
int bindPort = wscEnvironmentBean.getBindPort11();
String baseURI = "http://" + bindAddress + ":" + bindPort + "/interop11";
final String uri = baseURI + "/BAInitiatorService";
final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry();
serviceRegistry.registerServiceProvider(BAInteropConstants.SERVICE_INITIATOR, uri);
}
use of com.arjuna.webservices11.ServiceRegistry in project narayana by jbosstm.
the class BAInteropUtil method getCoordinatorCompletionParticipant.
/**
* Get the endpoint reference for a coordinator completion participant.
* @param id The participant id.
* @return The endpoint reference.
*/
private static W3CEndpointReference getCoordinatorCompletionParticipant(final String id) {
final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry();
final String serviceURI = serviceRegistry.getServiceURI(BusinessActivityConstants.COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_NAME);
final W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
builder.serviceName(BusinessActivityConstants.COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_QNAME);
builder.endpointName(BusinessActivityConstants.COORDINATOR_COMPLETION_PARTICIPANT_PORT_QNAME);
builder.address(serviceURI);
InstanceIdentifier.setEndpointInstanceIdentifier(builder, id);
return builder.build();
}
Aggregations