Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes EJB and other Java EE Technologies and the fly likes MDB : destinationName property for JMS queue at runtime Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "MDB : destinationName property for JMS queue at runtime" Watch "MDB : destinationName property for JMS queue at runtime" New topic
Author

MDB : destinationName property for JMS queue at runtime

Paolo Biondo
Greenhorn

Joined: Aug 02, 2009
Posts: 10
This is the actual code:

Instead of use static destination (@Resource(name="jms/MyQueue")) I have multiple possibility of destination and so I read destination name from properties file (for example).
The Message Driven Bean :


Is there a method to read at runtime (properties file) the property mappedName (without using annotation)?


I use IBM websphere application server version 7.0 .

Thanks in advance


SQL Insert Script generator in java
Richard Reese
author
Ranch Hand

Joined: Jul 13, 2011
Posts: 57
    
    5

Paolo,

I am not aware of any techniques that will allow you to read and then change these properties at runtime. Perhaps someone else has a solution.


Richard Reese
EJB 3.1 Cookbook
Java 7 New Features Cookbook
Paolo Biondo
Greenhorn

Joined: Aug 02, 2009
Posts: 10
Hi, I try to specifiy JMS Destination in the sender message and in this mode there is no need to specify the property "destinationName".


My problem now is to eliminate the dependence from the "activation specification" in ibm-ejb-jar-bnd.xml.

 
 
subject: MDB : destinationName property for JMS queue at runtime
 
Similar Threads
MDB in EJB 3.0 and JBOSS AS 6.1 final
access jms queue from different servers
Who creates destination Queueor Topic
Error while using MDB with JMS
Message Drive Bean doesn't load with JMS/SecurityConfig