• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic