• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stateless EBJ using JNDI to get DataSource with JBOSS 4.2

 
Tim Gilbert
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic