2

I have the following settings to connect to my async infrastructure:

@Resource(lookup = "java:/JmsXA")
private static ConnectionFactory connectionFactory;

@Resource(lookup = "java:/queue/myQueue")
private Queue notificationQueue;

I would like to extract the names values for the connection factory and queue in an external properties files for ease of configuration. So to have something like this:

@Resource(lookup = "${jms.connectionFactory}")
private static ConnectionFactory connectionFactory;

@Resource(lookup = "${jms.queue}")
private Queue notificationQueue;

Unfortunately I couldn't find up to know any suitable mechanism to obtain this in Java EE.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Olimpiu POP
  • 5,001
  • 4
  • 34
  • 49
  • May be using ejb-jar.xml here is the link http://stackoverflow.com/questions/8951448/can-we-use-ejb-jar-xml-instead-of-annotations-for-messagedrivenbeanmdb-in-ejb – Fireworks Dec 23 '13 at 04:51

0 Answers0