Search in sources :

Example 26 with WSCEnvironmentBean

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

Example 27 with WSCEnvironmentBean

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

the class ParticipantInitialisation 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 + "/ParticipantService";
    final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry();
    serviceRegistry.registerServiceProvider(InteropConstants.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