File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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.

Don't get me started about those stupid light bulbs.
subject: need a good paper on use of @Resource(name = "myService")
Similar Threads
Does jboss-4.0.3 support Annotation @Resouce
MDB @PostConstruct error
how inject a service into servlet
Weblogic security - ajax web service
web & application server