Author: buildbot
Date: Tue Aug 23 19:22:31 2016
New Revision: 995758
Log:
Production update by buildbot for activemq
Modified:
websites/production/activemq/content/cache/main.pageCache
websites/production/activemq/content/jndi-support.html
Modified: websites/production/activemq/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/activemq/content/jndi-support.html
==============================================================================
--- websites/production/activemq/content/jndi-support.html (original)
+++ websites/production/activemq/content/jndi-support.html Tue Aug 23 19:22:31
2016
@@ -98,7 +98,7 @@ queue.MyQueue = example.MyQueue
# register some topics in JNDI using the form
# topic.[jndiName] = [physicalName]
topic.MyTopic = example.MyTopic</pre>
-</div></div><p>You can edit the jndi.properties file to configure the
ActiveMQConnectionFactory's properties such as brokerURL and whether or not
there should be an embedded broker etc. See <a shape="rect"
href="how-do-i-embed-a-broker-inside-a-connection.html">how to embed a broker
in a connection</a> for more details.</p><h3
id="JNDISupport-ActiveMQJNDITutorial">ActiveMQ JNDI Tutorial</h3><p>This is a
quick one page tutorial on how to setup and use JNDI to create a connection to
ActiveMQ. The first thing is ActiveMQ does not provide a full JNDI server. This
means JMS clients need to use properties files to create a jndi
IntialContextFactory. If you need an example properties file, you can look the
source distribution <a shape="rect" class="external-link"
href="http://svn.apache.org/viewvc/activemq/trunk/activemq-unit-tests/src/test/resources/jndi.properties?view=markup">http://svn.apache.org/viewvc/activemq/trunk/activemq-unit-tests/src/test/resources/jndi.properties?view=markup</
a>. Before we proceed, here are the properties.</p><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Value</p></th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>java.naming.factory.initial</p></td><td colspan="1"
rowspan="1"
class="confluenceTd"><p>org.apache.activemq.jndi.ActiveMQInitialContextFactory</p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p>java.naming.provider.url</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>tcp://hostname:61616</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>topic.MyTopic</p></td><td
colspan="1" rowspan="1"
class="confluenceTd"><p>example.MyTopic</p></td></tr></tbody></table></div><p>Make
sure to add activemq-<version>.jar and spring-1.x.jar to your classpath.
If the libraries are not in the classpath, you will get a
"ClassNotFoundException" at run
time. If you get "ClassNotFoundException", try printing out the classpath and
check it is present. You can also run activeMQ with "-verbose" option to verify
the jar was loaded correctly.</p><p><strong>Sample code</strong></p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+</div></div><p>You can edit the jndi.properties file to configure the
ActiveMQConnectionFactory's properties such as brokerURL and whether or not
there should be an embedded broker etc. See <a shape="rect"
href="how-do-i-embed-a-broker-inside-a-connection.html">how to embed a broker
in a connection</a> for more details.</p><h3
id="JNDISupport-ActiveMQJNDITutorial">ActiveMQ JNDI Tutorial</h3><p>This is a
quick one page tutorial on how to setup and use JNDI to create a connection to
ActiveMQ. The first thing is ActiveMQ does not provide a full JNDI server. This
means JMS clients need to use properties files to create a jndi
IntialContextFactory. If you need an example properties file, you can look the
source distribution <a shape="rect" class="external-link"
href="https://github.com/apache/activemq/blob/master/activemq-unit-tests/src/test/resources/jndi.properties"
rel="nofollow">https://github.com/apache/activemq/blob/master/activemq-unit-tests/src/test/resources/jndi.properties</a>.
Before we proceed, here are the properties.</p><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Value</p></th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>java.naming.factory.initial</p></td><td colspan="1"
rowspan="1"
class="confluenceTd"><p>org.apache.activemq.jndi.ActiveMQInitialContextFactory</p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p>java.naming.provider.url</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>tcp://hostname:61616</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>topic.MyTopic</p></td><td
colspan="1" rowspan="1"
class="confluenceTd"><p>example.MyTopic</p></td></tr></tbody></table></div><p>Make
sure to add activemq-<version>.jar and spring-1.x.jar to your classpath.
If the libraries are not in the classpath, you will get a
"ClassNotFoundException" at runtim
e. If you get "ClassNotFoundException", try printing out the classpath and
check it is present. You can also run activeMQ with "-verbose" option to verify
the jar was loaded correctly.</p><p><strong>Sample code</strong></p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">// create a new intial context, which loads from
jndi.properties file
javax.naming.Context ctx = new javax.naming.InitialContext();
// lookup the connection factory