This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Resource annotaion. doubts

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
Danger, 10,000 volts, very electic .... tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic