aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Stateless EBJ using JNDI to get DataSource with JBOSS 4.2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Stateless EBJ using JNDI to get DataSource with JBOSS 4.2" Watch "Stateless EBJ using JNDI to get DataSource with JBOSS 4.2" New topic
Author

Stateless EBJ using JNDI to get DataSource with JBOSS 4.2

Tim Gilbert
Greenhorn

Joined: Dec 08, 2009
Posts: 1
Please consider that I have a stateless EBJ that accesses a mysql database via:



Then I have a Servlet in a different project (Dynamic Web)

WEB-INF/jboss-web.xml


then in my WEB-INF/web.xml


and finally I have a mysql-ds.xml in my jboss/deploy directory.

This works, however, it makes no sense to me. I would much rather have WEB-INF stuff defined at the EAR level as I can't think of a reason why I'd want to define something that the ejbModule needs in another possibly unrelated project. I am a java newbie, so I don't know how to make those connections outside of the WEB-INF, which I discovered by googleing.

Can anyone point me in the right direction?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10102
    
165

The WEB-INF, web.xml and jboss-web.xml are irrelevant for an EJB module. Remove those files and i am sure it will still work


[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Stateless EBJ using JNDI to get DataSource with JBOSS 4.2