@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); } }
/** * If node identifier wasn't set by property manager, then set default {@link #DEFAULT_NODE_IDENTIFIER}. */ private void initNodeIdentifier() { if (arjPropertyManager.getCoreEnvironmentBean().getNodeIdentifier() == null) { LOGGER.warning("Node identifier was not set. Setting it to the default value: " + DEFAULT_NODE_IDENTIFIER); try { arjPropertyManager.getCoreEnvironmentBean().setNodeIdentifier(DEFAULT_NODE_IDENTIFIER); } catch (CoreEnvironmentBeanException e) { LOGGER.log(Level.WARNING, e.getMessage(), e); } } jtaPropertyManager.getJTAEnvironmentBean() .setXaRecoveryNodes(Collections.singletonList(arjPropertyManager.getCoreEnvironmentBean().getNodeIdentifier())); }
final String xaNodeId = MessageFormat.format("Mule[{0}/{1}]", address.getHostName(), address.getHostAddress()); arjPropertyManager.getCoreEnvironmentBean().setNodeIdentifier(xaNodeId);
@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); } }
@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); } }
String nodeName2 = nodeName1; arjPropertyManager.getCoreEnvironmentBean() .setNodeIdentifier(nodeName1);