@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { final String name = context.getCurrentAddressValue(); final ServiceName serviceName = MessagingServices.getActiveMQServiceName(context.getCurrentAddress()); final ServiceTarget serviceTarget = context.getServiceTarget(); // Do not pass the JNDI bindings to ActiveMQ but install them directly instead so that the // dependencies from the BinderServices to the JMSQueueService are not broken JMSTopicService jmsTopicService = JMSTopicService.installService(name, serviceName, serviceTarget); final ServiceName jmsTopicServiceName = JMSServices.getJmsTopicBaseServiceName(serviceName).append(name); for (String entry : CommonAttributes.DESTINATION_ENTRIES.unwrap(context, model)) { BinderServiceUtil.installBinderService(serviceTarget, entry, jmsTopicService, jmsTopicServiceName); } List<String> legacyEntries = CommonAttributes.LEGACY_ENTRIES.unwrap(context, model); if (!legacyEntries.isEmpty()) { Topic legacyTopic = HornetQJMSClient.createTopic(name); for (String legacyEntry : legacyEntries) { BinderServiceUtil.installBinderService(serviceTarget, legacyEntry, legacyTopic); } } } }
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { final String name = context.getCurrentAddressValue(); final ServiceName serviceName = MessagingServices.getActiveMQServiceName(context.getCurrentAddress()); final ServiceTarget serviceTarget = context.getServiceTarget(); // Do not pass the JNDI bindings to ActiveMQ but install them directly instead so that the // dependencies from the BinderServices to the JMSQueueService are not broken JMSTopicService jmsTopicService = JMSTopicService.installService(name, serviceName, serviceTarget); final ServiceName jmsTopicServiceName = JMSServices.getJmsTopicBaseServiceName(serviceName).append(name); for (String entry : CommonAttributes.DESTINATION_ENTRIES.unwrap(context, model)) { BinderServiceUtil.installBinderService(serviceTarget, entry, jmsTopicService, jmsTopicServiceName); } List<String> legacyEntries = CommonAttributes.LEGACY_ENTRIES.unwrap(context, model); if (!legacyEntries.isEmpty()) { Topic legacyTopic = HornetQJMSClient.createTopic(name); for (String legacyEntry : legacyEntries) { BinderServiceUtil.installBinderService(serviceTarget, legacyEntry, legacyTopic); } } } }