public void activated() { if (overrideInVMSecurity) { activeMQServer.getValue().getRemotingService().allowInvmSecurityOverride(new ActiveMQPrincipal(DefaultCredentials.getUsername(), DefaultCredentials.getPassword())); } // ActiveMQ only provides a callback to be notified when ActiveMQ core server is activated. // but the JMS service start must not be completed until the JMSServerManager wrappee is indeed started (and has deployed the JMS resources, etc.). // It is possible that the activation service has already been installed but becomes passive when a backup server has failed over (-> ACTIVE) and failed back (-> PASSIVE) // [WFLY-6178] check if the service container is shutdown to avoid an IllegalStateException if an // ActiveMQ backup server is activated during failover while the WildFly server is shutting down. if (serviceContainer.isShutdown()) { return; } if (activeMQActivationController == null) { activeMQActivationController = serviceContainer.addService(ActiveMQActivationService.getServiceName(serverServiceName), new ActiveMQActivationService()) .setInitialMode(Mode.ACTIVE) .install(); } else { activeMQActivationController.setMode(ACTIVE); } }
ServerSession session = server.createSession(request.getName(), activeMQPrincipal == null ? request.getUsername() : activeMQPrincipal.getUserName(), activeMQPrincipal == null ? request.getPassword() : activeMQPrincipal.getPassword(), request.getMinLargeMessageSize(), connection, request.isAutoCommitSends(), request.isAutoCommitAcks(), request.isPreAcknowledge(), request.isXA(), request.getDefaultAddress(), sessionCallback, true, sessionOperationContext, routingTypeMap); ServerProducer serverProducer = new ServerProducerImpl(session.getName(), "CORE", request.getDefaultAddress()); session.addProducer(serverProducer);
public void activated() { if (overrideInVMSecurity) { activeMQServer.getValue().getRemotingService().allowInvmSecurityOverride(new ActiveMQPrincipal(DefaultCredentials.getUsername(), DefaultCredentials.getPassword())); } // ActiveMQ only provides a callback to be notified when ActiveMQ core server is activated. // but the JMS service start must not be completed until the JMSServerManager wrappee is indeed started (and has deployed the JMS resources, etc.). // It is possible that the activation service has already been installed but becomes passive when a backup server has failed over (-> ACTIVE) and failed back (-> PASSIVE) // [WFLY-6178] check if the service container is shutdown to avoid an IllegalStateException if an // ActiveMQ backup server is activated during failover while the WildFly server is shutting down. if (serviceContainer.isShutdown()) { return; } if (activeMQActivationController == null) { activeMQActivationController = serviceContainer.addService(ActiveMQActivationService.getServiceName(serverServiceName), new ActiveMQActivationService()) .setInitialMode(Mode.ACTIVE) .install(); } else { activeMQActivationController.setMode(ACTIVE); } }