JBoss Community

Re: Use plain @EJB for remote EJB lookup?

created by Mikal Henriksen in JNDI and Naming - View the full discussion

jaikiran pai wrote:

 

Mikal Henriksen wrote:

 

 

But your answer made me realize that we also need to know the name for the implementing class, since that's part of every standard jndi name. Thinking about it, it seems weird that the client should have to know about the name of the server-side class implementing the interface (the exception is of course multiple implementations of the same interface).

 

You don't need to know the class name of the implementing bean class. That's just a default that gets used. i.e. the bean name defaults to the simple class name of the implementing class. It can always be overriden using the name attribute of the appropriate annotation (@Stateless, @Stateful, @Singleton) or via the ejb-name element of ejb-jar.xml.

I've done some more research, and I guess what it boils down to is that the client needs to know that name (whether default or custom); the interface alone plus the connection to the server is not enough to lookup and connect to the remote implementation.

 

Are there other approaches I can use to streamline this? Is this something domain deployment would help with?

Reply to this message by going to Community

Start a new discussion in JNDI and Naming at Community