Search in sources :

Example 1 with WSTEnvironmentBean

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

the class TerminationCoordinatorRPCInitialisation 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 + "/" + ArjunaTX11Constants.TERMINATION_COORDINATOR_RPC_SERVICE_NAME;
    final String secureBaseUri = "https://" + bindAddress + ":" + secureBindPort + coordinatorServiceURLPath;
    final String secureUri = secureBaseUri + "/" + ArjunaTX11Constants.TERMINATION_COORDINATOR_RPC_SERVICE_NAME;
    serviceRegistry.registerServiceProvider(ArjunaTX11Constants.TERMINATION_COORDINATOR_RPC_SERVICE_NAME, uri);
    serviceRegistry.registerSecureServiceProvider(ArjunaTX11Constants.TERMINATION_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 2 with WSTEnvironmentBean

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

the class WSTXInitialisation method configure.

/**
 * Configure all configured WSTX client and participant implementations.
 */
private static void configure() throws Exception {
    WSTEnvironmentBean wstEnvironmentBean = XTSPropertyManager.getWSTEnvironmentBean();
    final String userTx = wstEnvironmentBean.getUserTransaction11();
    final String txManager = wstEnvironmentBean.getTransactionManager11();
    final String userBa = wstEnvironmentBean.getUserBusinessActivity11();
    final String baManager = wstEnvironmentBean.getBusinessActivityManager11();
    if (userTx != null) {
        UserTransaction.setUserTransaction((UserTransaction) ClassLoaderHelper.forName(WSTXInitialisation.class, userTx).newInstance());
    }
    if (txManager != null) {
        TransactionManager.setTransactionManager((TransactionManager) ClassLoaderHelper.forName(WSTXInitialisation.class, txManager).newInstance());
    }
    if (userBa != null) {
        UserBusinessActivity.setUserBusinessActivity((UserBusinessActivity) ClassLoaderHelper.forName(WSTXInitialisation.class, userBa).newInstance());
    }
    if (baManager != null) {
        BusinessActivityManager.setBusinessActivityManager((BusinessActivityManager) ClassLoaderHelper.forName(WSTXInitialisation.class, baManager).newInstance());
    }
}
Also used : WSTEnvironmentBean(org.jboss.jbossts.xts.environment.WSTEnvironmentBean)

Example 3 with WSTEnvironmentBean

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

the class CoordinatorCompletionParticipantInitialisation 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 + "/" + BusinessActivityConstants.COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_NAME;
    final String secureBaseUri = "https://" + bindAddress + ":" + secureBindPort + participantServiceURLPath;
    final String secureUri = secureBaseUri + "/" + BusinessActivityConstants.COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_NAME;
    serviceRegistry.registerServiceProvider(BusinessActivityConstants.COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_NAME, uri);
    serviceRegistry.registerSecureServiceProvider(BusinessActivityConstants.COORDINATOR_COMPLETION_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 4 with WSTEnvironmentBean

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

the class ParticipantCompletionParticipantInitialisation 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 + "/" + BusinessActivityConstants.PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_NAME;
    final String secureBaseUri = "https://" + bindAddress + ":" + secureBindPort + participantServiceURLPath;
    final String secureUri = secureBaseUri + "/" + BusinessActivityConstants.PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_NAME;
    serviceRegistry.registerServiceProvider(BusinessActivityConstants.PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_NAME, uri);
    serviceRegistry.registerSecureServiceProvider(BusinessActivityConstants.PARTICIPANT_COMPLETION_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 5 with WSTEnvironmentBean

use of org.jboss.jbossts.xts.environment.WSTEnvironmentBean 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)

Aggregations

WSTEnvironmentBean (org.jboss.jbossts.xts.environment.WSTEnvironmentBean)13 ServiceRegistry (com.arjuna.webservices11.ServiceRegistry)12 WSCEnvironmentBean (org.jboss.jbossts.xts.environment.WSCEnvironmentBean)12