On 13/08/2015 00:30, David Heffelfinger wrote:
>
>
> On Wed, Aug 12, 2015 at 10:30 AM, Nigel Deakin <nigel.deakin_at_oracle.com <mailto:nigel.deakin_at_oracle.com>> wrote:
>
> On 12/08/2015 00:56, David Heffelfinger wrote:
>
> I'm not opposed to using JNDI, it just would be nice to be able to map the product specific names to the JNDI names
> defined in the application server, ideally through an annotation right on the MDB or messaage listener.
>
> Can you explain what you have in mind in a bit more detail?
>
> I'm thinking from an application developer's perspective. I just don't want to have to create the cumbersome .bindings
> file to map JNDI name to Messaging Middleware specific name, something along the following lines,
>
> @QueueMapping(jndiName="jndi/someQueue", momName="SOME.QUEUE")
>
> The above annotation would be placed at the class level of an MDB or JMS listener, and would translate the JNDI name to
> the message oriented middleware specific name.
>
You can do that now (Java EE 7):
@JMSDestinationDefinition(name = "jndi/someQueue", destinationName="queue1234", interfaceName="javax.jms.Queue")
Simply place this at the top of your MDB code.
Nigel