jQuery in Action, 2nd edition
The moose likes Java in General and the fly likes need a good paper on use of @Resource(name = Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "need a good paper on use of @Resource(name = "myService")" Watch "need a good paper on use of @Resource(name = "myService")" New topic

need a good paper on use of @Resource(name = "myService")

Mark Tobin
Ranch Hand

Joined: May 05, 2010
Posts: 37
I have a method

As I understand it the use of @Resource will inject myService into the method.

This works when deployed on Tomcat, but does not work when deployed on JBoss.

What I need to understand is the basics of how @Resource works, I would guess that myService with its path would be set in a context or ApplicationContext like springs DI.

But I have not found myService in amy XML files.

so a bit confused on how it works any paper or docs on how it runs would be helpful, if I can figure out why it works on Tomcat I could then use that to make it work in JBoss.

I agree. Here's the link: http://aspose.com/file-tools
subject: need a good paper on use of @Resource(name = "myService")