• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

How to get the datasource from Bean through deployment descriptor

 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using MySql with JBoss4.2.2.GA. I have configured the web.xml and jboss-web.xml and mysql-ds.xml properly and I can able to get the datasource from the Servlet without any problem.

In the same way, when I tried to retrieve the datasource from the Entity bean, I am getting the following exception:



My web.xml


My jboss-web.xml


My jboss.xml


How to get the datasource from deployment descriptor from the Entity Bean. Whether we need to configure in both ejb-jar.xml and jboss.xml, as we did for web.xml and jboss-web.xml?

Between, the forums new look and feel and features are amazing!!!
And I have also looked for this attachment feature for the long time!!

 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This in jboss-web.xml is incorrect:


You are mapping a datasource here, so this should have been a resource-ref and not a ejb-ref.


Between, the forums new look and feel and features are amazing!!!
And I have also looked for this attachment feature for the long time!!



Yes, the new forum has brought in a lot of good features If you have any words of encouragement, suggestions feel free to post them in this thread
 
ice is for people that are not already cool. Chill with this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic