Java Reference
In-Depth Information
Creating a remote EJB client
Creating a remote EJB client for the AS 7 application server is a bit different compared
to other releases of the application server.
As a matter of fact, previous versions of JBoss AS (versions < 7. x ) used the JNP
project as the JNDI naming implementation so developers are familiar with jnp://
PROVIDER_URL to communicate with the application server.
Starting with AS7, the JNP project is no longer used, neither on the server side or
on the client side. The client side of the JNP project has now been replaced by
the jboss-remote-naming project ( https://github.com/jbossas/jboss-remote-naming ).
There were various reasons why the JNP client was replaced by the jboss-remote-
naming project. One of them was that the JNP project did not allow fine-grained secur-
ity configurations while communicating with the JNDI server. The jboss-remote-nam-
ing project is backed by the jboss-remoting project ( https://github.com/jboss-remot-
ing/jboss-remoting ) ; it allows much more and better control over security.
Besides the new naming implementation, in AS7 there is no longer support for binding
custom JNDI names to EJBs. So the beans are always bound to the spec's mandated
java:global , java:app and java:module namespaces. Therefore, setting the
JNDI name for the session bean element via an annotation or configuration file is no
longer supported.
So what will be the JNDI name used to invoke a stateless session bean? Here is it:
ejb:<app-name>/<module-name>/<distinct-name>/
<bean-name>!<fully-qualified-classname-of-the-remote-interface>
A bit verbose, isn't it? However, the following table will help you to get through it:
Search WWH ::




Custom Search