This week's book giveaways are in the Refactoring and Agile forums. We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line! See this thread and this one for details.
Stateless EBJ using JNDI to get DataSource with JBOSS 4.2
posted 6 years ago
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)
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.