aspose file tools* The moose likes EJB and other Java EE
Technologies and the fly likes How does @Resource injection
work? Big Moose Saloon   Search | Java FAQ | Recent Topics
Register / Login Reply Bookmark "How does @Resource injection
work?" Watch "How does @Resource injection work?" New topic  How
does @Resource injection work?  Jayesh A Lalwani  Joined: Jan
17, 2008 Posts: 1696  I am trying to write a app that will send
messages to a message queue. RIght now, I am sending the
messages through a servlet. It works, but I have no idea how the
@Resource injection works.  My code is  I created the
jms/testQueue and jms/connectionFactory in my Glassfish Admin
console. The code works fine. I am trying to understand how it
works.  I understand that the @Resource annotation is injecting
the code that will look up and object of the name
jms/connectionFactory in the JNDI. But, I don;t understand how
it gets the JNDI context? If I want to write a standalone app
that does the same thing, where do I put the reference