This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
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

Annotation doubt

 
Aditya Vasudeva
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does "using @Resource at the class level mean"?

That is, when this annotation is used as a @TARGET-field, it says that to look up a resource in a helper class, we have to use JNDI.

Also, what is a helper class? And, when @Resource is used for setter or getter methods, is the actual resource we want to inject obtained through the arguments/return-types?

This is described in EJB3 in Action on page 150.

Also, what does the @Target annotation do? What does:

@Target({TYPE,METHOD,FIELD}) mean??
 
jonas stock
Greenhorn
Posts: 2
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic