3

I am experiencing some difficulties trying to get our MDBs to use dynamically loaded properties in different environments.

@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "providerURL", propertyValue = "localhost:7001"),
@ActivationConfigProperty(propertyName = "destinationType", propertyValue ="javax.jms.Queue") }, mappedName = "jms.MyQueue", name = "MyQueueReader")
public class QueueReaderBean implements MessageListener {

}

We would like to change the providerURL when deploying to different environments. Do you have any tips?

We do not want to use ejb.xml but rather do it programatically in the constructor or in a post construct method.

Thanks

1 Answers1

0

Maybe it has to do with this entry connecting to a remote JMS provider from a Message Driven Bean (MDB)

and using the url whit the jnp protocol may do the job:

@MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "providerURL", propertyValue ="jnp://hostname:1099"), @ActivationConfigProperty(propertyName = "destinationType", propertyValue ="javax.jms.Queue") }, mappedName = "jms.MyQueue", name = "MyQueueReader") public class QueueReaderBean implements MessageListener {

}

Community
  • 1
  • 1
carlosavoy
  • 99
  • 4