WildFly Naming Subsystem Configuration: Difference between revisions
Line 21: | Line 21: | ||
==Importing an External JNDI Context== | ==Importing an External JNDI Context== | ||
This section describes the configuration required to import an external JNDI context into the local JND namespace. The external JNDI context must be exported by a remote server. More details about external JNDI contexts are available here: {{Internal|WildFly_JNDI_Concepts#Declaring_an_External_JNDI_Context|External JNDI Contexts}} | This section describes the configuration required to import an external JNDI context into the local JND namespace. The external JNDI context must be exported by a remote server. More details about external JNDI contexts are available here: {{Internal|WildFly_JNDI_Concepts#Declaring_an_External_JNDI_Context|External JNDI Contexts}} | ||
Provided that remote JNDI objects have been bound into an externally exported context (java:/jboss/export) by a remote server, the can be made available locally as follows: | |||
<pre> | <pre> | ||
<subsystem xmlns="urn:jboss:domain:naming:1.4"> | |||
... | |||
<bindings> | |||
<external-context name="java:global/remote-hornetq" | |||
module="org.jboss.remote-naming" | |||
class="javax.naming.InitialContext"> | |||
<environment> | |||
<property name="java.naming.factory.initial" value="org.jboss.naming.remote.client.InitialContextFactory"/> | |||
<property name="java.naming.provider.url" value="remote://${remote.hornetq.node.one.address}:${remote.hornetq.node.one.remoting.port},remote://${remote.hornetq.node.two.address}:${remote.hornetq.node.two.remoting.port}"/> | |||
<property name="java.naming.security.principal" value="${remoting.user.name}"/> | |||
<property name="java.naming.security.credentials" value="${remoting.password}"/> | |||
</environment> | |||
</external-context> | |||
</bindings> | |||
</subsystem> | |||
</pre> | </pre> | ||
Revision as of 19:07, 3 April 2017
Internal
Overview
The "naming" subsystem contains configuration related to various JNDI namespaces.
<subsystem xmlns="urn:jboss:domain:naming:1.4"> <remote-naming/> </subsystem>
Configuration
<remote-naming>
If present, this element activates the remote naming server, that allows access to items bound in the java:jboss/exported JNDI context. More details about the JBoss exported JNDI namespace and the remote naming server can be found here:
Importing an External JNDI Context
This section describes the configuration required to import an external JNDI context into the local JND namespace. The external JNDI context must be exported by a remote server. More details about external JNDI contexts are available here:
Provided that remote JNDI objects have been bound into an externally exported context (java:/jboss/export) by a remote server, the can be made available locally as follows:
<subsystem xmlns="urn:jboss:domain:naming:1.4"> ... <bindings> <external-context name="java:global/remote-hornetq" module="org.jboss.remote-naming" class="javax.naming.InitialContext"> <environment> <property name="java.naming.factory.initial" value="org.jboss.naming.remote.client.InitialContextFactory"/> <property name="java.naming.provider.url" value="remote://${remote.hornetq.node.one.address}:${remote.hornetq.node.one.remoting.port},remote://${remote.hornetq.node.two.address}:${remote.hornetq.node.two.remoting.port}"/> <property name="java.naming.security.principal" value="${remoting.user.name}"/> <property name="java.naming.security.credentials" value="${remoting.password}"/> </environment> </external-context> </bindings> </subsystem>
"name" is the local JNDI name to bind to.
More details about external JNDI Contexts can be found here:
A working example is available here: