aspose file tools*
The moose likes JBoss/WildFly and the fly likes How to get the datasource from Bean through deployment descriptor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "How to get the datasource from Bean through deployment descriptor" Watch "How to get the datasource from Bean through deployment descriptor" New topic
Author

How to get the datasource from Bean through deployment descriptor

Mike Thomson
Ranch Hand

Joined: Nov 07, 2007
Posts: 121
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

Joined: Jul 20, 2005
Posts: 10288
    
168

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


[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get the datasource from Bean through deployment descriptor