48 lines
3.2 KiB
XML
48 lines
3.2 KiB
XML
<?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 Attribution–Share 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>
|