activemq-artemis/docs/user-manual/zh/client-classpath.xml

48 lines
3.2 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8"?>
<!-- ============================================================================= -->
<!-- Copyright © 2009 Red Hat, Inc. and others. -->
<!-- -->
<!-- The text of and illustrations in this document are licensed by Red Hat under -->
<!-- a Creative Commons AttributionShare Alike 3.0 Unported license ("CC-BY-SA"). -->
<!-- -->
<!-- An explanation of CC-BY-SA is available at -->
<!-- -->
<!-- http://creativecommons.org/licenses/by-sa/3.0/. -->
<!-- -->
<!-- In accordance with CC-BY-SA, if you distribute this document or an adaptation -->
<!-- of it, you must provide the URL for the original version. -->
<!-- -->
<!-- Red Hat, as the licensor of this document, waives the right to enforce, -->
<!-- and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent -->
<!-- permitted by applicable law. -->
<!-- ============================================================================= -->
<chapter id="client-classpath">
<title>客户端的Classpath</title>
<para>ActiveMQ的<emphasis>客户端Classpath</emphasis>需要有几个jar文件。具体是哪几个要根据客户端
是需要内核API、JMS和JNDI中的哪些服务来确定。</para>
<warning>
<para>本章所提及的所有jar文件全部在HorneQ发布包的 <literal>lib</literal>目录下。在使用中一定
要确保所有的jar文件属于同一个发布版本。将不同版本的jar混在一起使用可能造成一些难以发现的错误。</para>
</warning>
<section>
<title>使用ActiveMQ内核的客户端</title>
<para>如果客户端只使用ActiveMQ内核非JMS客户端需要将 <literal
>hornetq-core-client.jar</literal>
<literal>netty.jar</literal> 放到classpath中。</para>
</section>
<section>
<title>JMS客户端</title>
<para>如果客户端使用JMS需要在classpath上增加两个jar文件 <literal
>hornetq-jms-client.jar</literal><literal>jboss-jms-api.jar</literal></para>
<note>
<para><literal>jboss-jms-api.jar</literal>中包含的只是 <literal>javax.jms.*</literal> 包中的接口类。
如果这些类已经在你的classpath中则你就不需要这个jar文件。</para>
</note>
</section>
<section>
<title>需要JNDI的JMS客户端</title>
<para>如果你的JMS客户端使用JNDI来查找ActiveMQ单独服务器上的对象你需要将 <literal>jnp-client.jar</literal> 增加
到你的classpath中。</para>
</section>
</chapter>