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/603699#603699
--------------------------------------------------------------
No problem :)
Try to use:
@Stateless
*@LocalBinding(jndiBinding = "myProject/OperazioniUtenti/local")*
public class +OperazioniUtentiBean+ implements +OperazioniUtenti+
then you'll be able to write in your servlet:
*lookup("myProject/OperazioniUtenti/local")*
For remote:
*@Remote*
@Stateless
*@RemoteBinding(jndiBinding = "myProject/OperazioniUtenti/remote")*
public class +OperazioniUtentiBean+ implements +OperazioniUtenti+
Remember to use @Remote while using @RemoteBinding.
Good idea (in my opinion) is to create two separated jars:
1. BookShop.jar or BookShopImpl.jar to keep Beans' implementations (EJB)
2. BookShopApi.jar to keep only interfaces
After that you can safely put BookShopApi to WEB-INF/lib dir or include to other
client's application.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/603699#603699]
Start a new discussion in JNDI and Naming at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]