• 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
 
I found a beautiful pie. And a tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!