WildFly Remote Programmatic JNDI Access: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Internal= * WildFly JNDI Concepts =Relevance= EAP 7 =Overview= This article describes remote programmatic JNDI access for WildFly/EAP. The article was written using...") |
No edit summary |
||
Line 10: | Line 10: | ||
This article describes remote programmatic JNDI access for WildFly/EAP. The article was written using an EAP 7.0.4 instance. | This article describes remote programmatic JNDI access for WildFly/EAP. The article was written using an EAP 7.0.4 instance. | ||
=Classpath= | |||
The client's classpath must include $JBOSS_HOME/bin/client/jboss-client.jar. | |||
=API= | |||
<pre> | |||
Properties properties = new Properties(); properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory"); properties.put(Context.PROVIDER_URL, "http-remoting://<hostname>:8080"); context = new InitialContext(properties); | |||
Queue myTestQueue = (Queue) context.lookup("jms/queue/myTestQueue"); | |||
</pre> | |||
=Code= | =Code= |
Revision as of 22:15, 6 February 2017
Internal
Relevance
EAP 7
Overview
This article describes remote programmatic JNDI access for WildFly/EAP. The article was written using an EAP 7.0.4 instance.
Classpath
The client's classpath must include $JBOSS_HOME/bin/client/jboss-client.jar.
API
Properties properties = new Properties(); properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory"); properties.put(Context.PROVIDER_URL, "http-remoting://<hostname>:8080"); context = new InitialContext(properties); Queue myTestQueue = (Queue) context.lookup("jms/queue/myTestQueue");