This content has been marked as final.
Show 2 replies
-
1. Re: Weirdness with messaging/clustering configuration
rhusar Aug 17, 2015 8:12 AM (in response to pfyod)Weird part that no configuration file (domain.xml on domain controller, host.xml on host controller) has the values of clustered=false and cluster-password="CHANGE ME!!!"
In general, defaults are coming from the resource definitions, e.g.:
wildfly/BridgeDefinition.java at master · wildfly/wildfly · GitHub
Someone from messaging can surely explain how to configure that per deployments..
-
2. Re: Weirdness with messaging/clustering configuration
pfyod Aug 17, 2015 11:31 AM (in response to rhusar)My problem is not that I want to configure it per deployment. For some reason it just does not take messaging configuration from the profile (and reverts to defaults).
Perhaps it's the way I define JMS destination that is wrong and I should reference container defined?
Here's the relevant code:
// define JMS destination @JMSDestinationDefinition( name = "java:/jms/topic/monitoring", interfaceName = "javax.jms.Topic", destinationName = "monitoring" ) // use it @MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "destinationLookup", propertyValue = "jms/topic/monitoring"), @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"), @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge")}) public class JMSEventReceiver implements MessageListener { ... }
and
public class JMSEventSender { @Resource(lookup = "java:/jms/topic/monitoring") private Topic cdiEventsTopic; @Inject private JMSContext jmsContext; @Transactional(Transactional.TxType.REQUIRES_NEW) public void send(@Observes @MonitoringReport Serializable outbound) { jmsContext.createProducer().send(cdiEventsTopic, jmsContext.createObjectMessage(outbound)); } }