JBoss Community

Re: lookup a session bean inside a servlet

created by stefano bertozzi in JNDI and Naming - View the full discussion

I would prefer to have my .jar inside my web project ( as I do now ) and in the end create an .ear that I will deploy to the server ( my .jar alone is useless without the web interface ). Moreover this is a university project and I need to deliver a totally builded and working .ear.

 

As i do now I can find every bean and entity in my servlet during code writing; at run time is the same, the only thing is the lookup.

I don't get why everything is seen properly but the lookup returns a null pointer.

I think I'm missing something about the jndi: I got a similar problem while writing my BookShop and I solved it adding the jndi.properties file.

 

 

Regard your code:

 

@Stateless

@RemoteBinding(jndiBinding = "/BookShop/OperazioniUtenti/remote")

public class TesBean implements

 

 

I don't get where I have to insert the @RemoteBinding annotation: inside my servlet? or in my session beans ( OperazioniUtenti, etc... ) inside my ejb project BookShop?

Reply to this message by going to Community

Start a new discussion in JNDI and Naming at Community