File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get the datasource from Bean through deployment descriptor

 
Mike Thomson
Ranch Hand
Posts: 121
  • 0
  • Mark post as helpful
  • send pies
  • 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!!

 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic