You learn something new every day, I don't know how I missed that when I
was learning about new JMS 2.0 features.
Unfortunately we're stuck with a Java EE 6 app server at my current
project, whenever the vendor decides to release a fully Java EE 7 compliant
app server I'll make sure to put this to annotation to good use.
David
On Thu, Aug 13, 2015 at 5:27 AM, Nigel Deakin <nigel.deakin_at_oracle.com>
wrote:
> 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
>
>
>
>
--
http://ensode.net - A Guide to Java, Linux and Other Technology Topics
My Books: http://www.packtpub.com/authors/profiles/david-heffelfinger
My Video Training:
http://www.packtpub.com/java-ee-development-with-netbeans-7/video
Follow me on Twitter: https://twitter.com/ensode