Jboss JNDI
There are three commonly used levels of naming scope in JBoss: names under java:comp
, names under java:
, and any other name. As discussed, the java:comp
context and its subcontexts are only available to the application component associated with that particular context. Subcontexts and object bindings directly under java:
are only visible within the JBoss server virtual machine and not to remote clients. Any other context or object binding is available to remote clients, provided the context or object supports serialization.
An example of where the restricting a binding to the java:
context is useful would be a javax.sql.DataSource
connection factory that can only be used inside of the JBoss server where the associated database pool resides. On the other hand, an EJB home interface would be bound to a globally visible name that should accessible by remote client.