This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

@Resource doubts

 
Jonathan Elkharrat
Ranch Hand
Posts: 170
Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

what happen wehn a field is annotated with @resource?
i.e. @Resource DataSource myDS;
is the container inject a datasource mapped to "java:comp/env/pacageName.className/myDS"?
is it ths same as:
??

and when annotating the class like that @Resource(name="myName" type=javax.sql.DataSource.class)
how the container know what to add to the bean environment?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic