Search in sources :

Example 1 with CoreEnvironmentBean

use of com.arjuna.ats.arjuna.common.CoreEnvironmentBean in project wildfly by wildfly.

the class CoreEnvironmentService method start.

@Override
public void start(StartContext context) throws StartException {
    // Global configuration.
    final CoreEnvironmentBean coreEnvironmentBean = arjPropertyManager.getCoreEnvironmentBean();
    if (coreEnvironmentBean.getProcessImplementationClassName() == null) {
        UuidProcessId id = new UuidProcessId();
        coreEnvironmentBean.setProcessImplementation(id);
    }
    try {
        coreEnvironmentBean.setNodeIdentifier(nodeIdentifier);
    } catch (CoreEnvironmentBeanException e) {
        throw new StartException(e.getCause());
    }
    // Setup the socket process id if there is a binding
    SocketBinding binding = socketProcessBindingInjector.getOptionalValue();
    if (binding != null) {
        int port = binding.getPort();
        coreEnvironmentBean.setSocketProcessIdPort(port);
    }
}
Also used : SocketBinding(org.jboss.as.network.SocketBinding) CoreEnvironmentBeanException(com.arjuna.ats.arjuna.common.CoreEnvironmentBeanException) CoreEnvironmentBean(com.arjuna.ats.arjuna.common.CoreEnvironmentBean) StartException(org.jboss.msc.service.StartException) UuidProcessId(com.arjuna.ats.internal.arjuna.utils.UuidProcessId)

Aggregations

CoreEnvironmentBean (com.arjuna.ats.arjuna.common.CoreEnvironmentBean)1 CoreEnvironmentBeanException (com.arjuna.ats.arjuna.common.CoreEnvironmentBeanException)1 UuidProcessId (com.arjuna.ats.internal.arjuna.utils.UuidProcessId)1 SocketBinding (org.jboss.as.network.SocketBinding)1 StartException (org.jboss.msc.service.StartException)1