Search in sources :

Example 11 with WSCEnvironmentBean

use of org.jboss.jbossts.xts.environment.WSCEnvironmentBean in project narayana by jbosstm.

the class CompletionCoordinatorRPCInitialisation 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 + "/" + AtomicTransactionConstants.COMPLETION_COORDINATOR_RPC_SERVICE_NAME;
    final String secureBaseUri = "https://" + bindAddress + ":" + secureBindPort + coordinatorServiceURLPath;
    final String secureUri = secureBaseUri + "/" + AtomicTransactionConstants.COMPLETION_COORDINATOR_RPC_SERVICE_NAME;
    serviceRegistry.registerServiceProvider(AtomicTransactionConstants.COMPLETION_COORDINATOR_RPC_SERVICE_NAME, uri);
    serviceRegistry.registerSecureServiceProvider(AtomicTransactionConstants.COMPLETION_COORDINATOR_RPC_SERVICE_NAME, secureUri);
}
Also used : WSTEnvironmentBean(org.jboss.jbossts.xts.environment.WSTEnvironmentBean) WSCEnvironmentBean(org.jboss.jbossts.xts.environment.WSCEnvironmentBean) ServiceRegistry(com.arjuna.webservices11.ServiceRegistry)

Example 12 with WSCEnvironmentBean

use of org.jboss.jbossts.xts.environment.WSCEnvironmentBean in project narayana by jbosstm.

the class CompletionInitiatorInitialisation 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 clientServiceURLPath = wstEnvironmentBean.getClientServiceURLPath();
    if (clientServiceURLPath == null) {
        clientServiceURLPath = "/ws-t11-client";
    }
    if (bindAddress == null) {
        bindAddress = "localhost";
    }
    if (bindPort == 0) {
        bindPort = 8080;
    }
    if (secureBindPort == 0) {
        secureBindPort = 8443;
    }
    final String baseUri = "http://" + bindAddress + ":" + bindPort + clientServiceURLPath;
    final String uri = baseUri + "/" + AtomicTransactionConstants.COMPLETION_INITIATOR_SERVICE_NAME;
    final String secureBaseUri = "https://" + bindAddress + ":" + secureBindPort + clientServiceURLPath;
    final String secureUri = secureBaseUri + "/" + AtomicTransactionConstants.COMPLETION_INITIATOR_SERVICE_NAME;
    serviceRegistry.registerServiceProvider(AtomicTransactionConstants.COMPLETION_INITIATOR_SERVICE_NAME, uri);
    serviceRegistry.registerSecureServiceProvider(AtomicTransactionConstants.COMPLETION_INITIATOR_SERVICE_NAME, secureUri);
}
Also used : WSTEnvironmentBean(org.jboss.jbossts.xts.environment.WSTEnvironmentBean) WSCEnvironmentBean(org.jboss.jbossts.xts.environment.WSCEnvironmentBean) ServiceRegistry(com.arjuna.webservices11.ServiceRegistry)

Example 13 with WSCEnvironmentBean

use of org.jboss.jbossts.xts.environment.WSCEnvironmentBean in project narayana by jbosstm.

the class ParticipantInitialisation 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 participantServiceURLPath = wstEnvironmentBean.getParticipantServiceURLPath();
    if (participantServiceURLPath == null) {
        participantServiceURLPath = "/ws-t11-participant";
    }
    if (bindAddress == null) {
        bindAddress = "localhost";
    }
    if (bindPort == 0) {
        bindPort = 8080;
    }
    if (secureBindPort == 0) {
        secureBindPort = 8443;
    }
    final String baseUri = "http://" + bindAddress + ":" + bindPort + participantServiceURLPath;
    final String uri = baseUri + "/" + AtomicTransactionConstants.PARTICIPANT_SERVICE_NAME;
    final String secureBaseUri = "https://" + bindAddress + ":" + secureBindPort + participantServiceURLPath;
    final String secureUri = secureBaseUri + "/" + AtomicTransactionConstants.PARTICIPANT_SERVICE_NAME;
    serviceRegistry.registerServiceProvider(AtomicTransactionConstants.PARTICIPANT_SERVICE_NAME, uri);
    serviceRegistry.registerSecureServiceProvider(AtomicTransactionConstants.PARTICIPANT_SERVICE_NAME, secureUri);
}
Also used : WSTEnvironmentBean(org.jboss.jbossts.xts.environment.WSTEnvironmentBean) WSCEnvironmentBean(org.jboss.jbossts.xts.environment.WSCEnvironmentBean) ServiceRegistry(com.arjuna.webservices11.ServiceRegistry)

Example 14 with WSCEnvironmentBean

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

Example 15 with WSCEnvironmentBean

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

Aggregations

WSCEnvironmentBean (org.jboss.jbossts.xts.environment.WSCEnvironmentBean)27 ServiceRegistry (com.arjuna.webservices11.ServiceRegistry)22 WSTEnvironmentBean (org.jboss.jbossts.xts.environment.WSTEnvironmentBean)12 ServletContext (javax.servlet.ServletContext)6 PrivilegedAction (java.security.PrivilegedAction)1 XTSService (org.jboss.jbossts.XTSService)1 StartException (org.jboss.msc.service.StartException)1 MAP (org.jboss.ws.api.addressing.MAP)1 ServerConfig (org.jboss.wsf.spi.management.ServerConfig)1 RegisterResponseType (org.oasis_open.docs.ws_tx.wscoor._2006._06.RegisterResponseType)1