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 annotaion. doubts

 
Deepak Jain
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Resource annotaion.
@Resource(name = "jdbc/ActionBazaarDS", mappedName = "java:/DefaultDS")
private DataSource dataSource;
I just created a table using the following SQL statements as given in EJB in Action examples.


1) From where or who did the data source named "ActionBazaarDS" was created?

I changed the data source name in the @Resource annotation as below
@Resource(name = "jdbc/MyActionBazaarDS", mappedName = "java:/DefaultDS")
private DataSource dataSource;
Still everything worked fine, when the next time i attempted to add bids to the BIDS table.
2) What significance does the name element of the @Resource annotation have?
3) What is the significance of mappedName
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic