use of com.arjuna.webservices11.ServiceRegistry in project narayana by jbosstm.
the class ATParticipantInitialisation 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 + "/ATParticipantService";
final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry();
serviceRegistry.registerServiceProvider(ATInteropConstants.SERVICE_PARTICIPANT, uri);
}
use of com.arjuna.webservices11.ServiceRegistry in project narayana by jbosstm.
the class InteropUtil method getParticipant.
/**
* Get an endpoint reference for the participant service.
* @param id The participant id.
* @return The endpoint reference.
*/
private static W3CEndpointReference getParticipant(final String id) {
final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry();
final String serviceURI = serviceRegistry.getServiceURI(AtomicTransactionConstants.PARTICIPANT_SERVICE_NAME);
final W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
builder.serviceName(AtomicTransactionConstants.PARTICIPANT_SERVICE_QNAME);
builder.endpointName(AtomicTransactionConstants.PARTICIPANT_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 ATInitiatorInitialisation 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 + "/ATInitiatorService";
final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry();
serviceRegistry.registerServiceProvider(ATInteropConstants.SERVICE_INITIATOR, uri);
}
use of com.arjuna.webservices11.ServiceRegistry in project narayana by jbosstm.
the class ATInitiatorInitialisation 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(ATInteropConstants.SERVICE_INITIATOR);
}
use of com.arjuna.webservices11.ServiceRegistry in project narayana by jbosstm.
the class ParticipantInitialisation 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_PARTICIPANT);
}
Aggregations