Search in sources :

Example 11 with ServiceRegistry

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);
}
Also used : WSCEnvironmentBean(org.jboss.jbossts.xts.environment.WSCEnvironmentBean) ServletContext(javax.servlet.ServletContext) ServiceRegistry(com.arjuna.webservices11.ServiceRegistry)

Example 12 with ServiceRegistry

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();
}
Also used : W3CEndpointReferenceBuilder(javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder) ServiceRegistry(com.arjuna.webservices11.ServiceRegistry)

Example 13 with ServiceRegistry

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);
}
Also used : WSCEnvironmentBean(org.jboss.jbossts.xts.environment.WSCEnvironmentBean) ServletContext(javax.servlet.ServletContext) ServiceRegistry(com.arjuna.webservices11.ServiceRegistry)

Example 14 with ServiceRegistry

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);
}
Also used : ServiceRegistry(com.arjuna.webservices11.ServiceRegistry)

Example 15 with ServiceRegistry

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);
}
Also used : ServiceRegistry(com.arjuna.webservices11.ServiceRegistry)

Aggregations

ServiceRegistry (com.arjuna.webservices11.ServiceRegistry)53 WSCEnvironmentBean (org.jboss.jbossts.xts.environment.WSCEnvironmentBean)22 W3CEndpointReferenceBuilder (javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder)16 WSTEnvironmentBean (org.jboss.jbossts.xts.environment.WSTEnvironmentBean)12 QName (javax.xml.namespace.QName)7 W3CEndpointReference (javax.xml.ws.wsaddressing.W3CEndpointReference)7 SystemException (com.arjuna.mw.wsas.exceptions.SystemException)6 ServletContext (javax.servlet.ServletContext)6 InvalidCreateParametersException (com.arjuna.wsc.InvalidCreateParametersException)5 CoordinationContext (org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext)5 Expires (org.oasis_open.docs.ws_tx.wscoor._2006._06.Expires)5 NoActivityException (com.arjuna.mw.wsas.exceptions.NoActivityException)4 InstanceIdentifier (com.arjuna.webservices11.wsarj.InstanceIdentifier)4 InvalidProtocolException (com.arjuna.wsc.InvalidProtocolException)4 CoordinationContextType (org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType)4 SubordinateBACoordinator (com.arjuna.mwlabs.wscf.model.sagas.arjunacore.subordinate.SubordinateBACoordinator)3 Uid (com.arjuna.ats.arjuna.common.Uid)2 DuplicateParticipantException (com.arjuna.mw.wscf.exceptions.DuplicateParticipantException)2 ProtocolNotRegisteredException (com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException)2 SubordinateATCoordinator (com.arjuna.mwlabs.wscf.model.twophase.arjunacore.subordinate.SubordinateATCoordinator)2