Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Mark Tobin
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic