use of com.arjuna.webservices11.ServiceRegistry in project narayana by jbosstm.
the class InitiatorInitialisation 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(InteropConstants.SERVICE_INITIATOR);
}
use of com.arjuna.webservices11.ServiceRegistry in project narayana by jbosstm.
the class InitiatorInitialisation 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 + "/sc007";
final String uri = baseURI + "/InitiatorService";
final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry();
serviceRegistry.registerServiceProvider(InteropConstants.SERVICE_INITIATOR, uri);
}
use of com.arjuna.webservices11.ServiceRegistry in project narayana by jbosstm.
the class InteropUtil method getCompletionParticipant.
/**
* Get an endpoint reference for the completion initiator service.
* @param id The completion id.
* @return The endpoint reference.
*/
private static W3CEndpointReference getCompletionParticipant(final String id) {
final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry();
final String serviceURI = serviceRegistry.getServiceURI(AtomicTransactionConstants.COMPLETION_INITIATOR_SERVICE_NAME);
final W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
builder.serviceName(AtomicTransactionConstants.COMPLETION_INITIATOR_SERVICE_QNAME);
builder.endpointName(AtomicTransactionConstants.COMPLETION_INITIATOR_PORT_QNAME);
builder.address(serviceURI);
InstanceIdentifier.setEndpointInstanceIdentifier(builder, id);
return builder.build();
}
use of com.arjuna.webservices11.ServiceRegistry in project narayana by jbosstm.
the class BAParticipantInitialisation 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_PARTICIPANT);
}
use of com.arjuna.webservices11.ServiceRegistry in project narayana by jbosstm.
the class BAInteropUtil method getTerminatorParticipant.
/**
* Get the endpoint reference for a terminator participant.
* @param id The participant id.
* @return The endpoint reference.
*/
private static W3CEndpointReference getTerminatorParticipant(final String id) {
final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry();
final String serviceURI = serviceRegistry.getServiceURI(ArjunaTX11Constants.TERMINATION_PARTICIPANT_SERVICE_NAME);
final W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
builder.serviceName(ArjunaTX11Constants.TERMINATION_PARTICIPANT_SERVICE_QNAME);
builder.endpointName(ArjunaTX11Constants.TERMINATION_PARTICIPANT_PORT_QNAME);
builder.address(serviceURI);
InstanceIdentifier.setEndpointInstanceIdentifier(builder, id);
return builder.build();
}
Aggregations