[jboss-user] [JNDI and Naming] - Re: lookup a session bean inside a servlet

Andrzej Goławski do-not-reply at jboss.com
Tue May 3 15:12:50 EDT 2011


Andrzej Goławski [http://community.jboss.org/people/andi-g] created the discussion

"Re: lookup a session bean inside a servlet"

To view the discussion, visit: http://community.jboss.org/message/603286#603286

--------------------------------------------------------------
Here is a part of a text from second link:
"*Mechanism 1: The WEB-INF/lib Directory*
If you place a library JAR file (for example, struts.jar) into the WEB-INF/lib directory of the WAR file, a web application or web module can use the Struts APIs. bla bla bla ... *This mechanism cannot be used by EJB modules*."

I'm not an expert, but as far as I know, there are at least two kinds of containers in JBoss, WebContainer and EJBContainer. If you place  BookShop.jar in WEB-INF/lib dir, then ejbDeployer doesn't create EJB components and doen't put theirs names in JNDI. 


Try to do so, and put BookShop.jar in deploy dir. Of course, if you want to have everything in one archive, the ear will be the best solution.
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/603286#603286]

Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110503/a1474cea/attachment.html 


More information about the jboss-user mailing list