Version 8


    The JNDI naming service can be accessed over HTTP. From a JNDI client's perspective this is a transparent change as they continue to use the JNDI Context  interface. Operations through the Context  interface are translated into HTTP posts to a servlet that passes the request to the NamingService using its JMX invoke operation. Advantages of using HTTP as the access protocol include better access through firewalls and proxies setup to allow HTTP, as well as the ability to secure access to the JNDI service using standard servlet role based security.


    To access JNDI over HTTP you use the org.jboss.naming.HttpNamingContextFactory as the factory implementation. The complete set of support InitialContext environment properties for this factory are:


    • java.naming.factory.initial (or Context.INITIAL_CONTEXT_FACTORY ), The name of the environment property for specifying the initial context factory, which must be org.jboss.naming.HttpNamingContextFactory .

    • java.naming.provider.url (or Context.PROVIDER_URL ), This must be set to the http URL of the JMX invoker servlet. It depends on the configuration of the http-invoker.sar and its contained war, but the default setup places the JMX invoker servlet under /invoker/JMXInvokerServlet. The full http URL would be the public URL of the JBoss servlet container + "/invoker/JMXInvokerServlet". Examples include:

    where the first accesses the servlet using the port 8080, the second uses the standard HTTP port 80, and the third uses an SSL encrypted connection to the standard HTTPS port 443.

    • java.naming.factory.url.pkgs (or Context.URL_PKG_PREFIXES ), For all JBoss JNDI provider this must be org.jboss.naming:org.jnp.interfaces . This property is essential for locating the jnp: and java: URL context factories of the JBoss JNDI provider.


    Referenced by: