title: Which HornetQ libraries i need for JMS client?
body: <p>I have a standalone hornetq server and a <em>JMS client</em> working with it! With respect to hornetq user-manual i should only add <em>jnp-client.jar</em> and <em>jms.jar</em> to client classpath. But when i trying use hornetq server (produce and consume messages), several ClassNotFoundExceptions thrown, so i forced adding these jar files to my client classpath:</p>
  
  <p><em>1. jms
   2. jnp-client</em> 
   3. hornetq-jms-client 
   4. netty 
   5. hornetq-core-cilent 
   6. jboss-common</p>
  
  <p>Am i using <em>Hornetq core client</em> instead of <em>jms client</em>?? What jar files i really need for <em>jms client</em>?? </p>
  
  <p>My applicationContext.xml:</p>
  
  <pre><code>&lt;!-- JndiTemplate --&gt;
  &lt;bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate"&gt;
          &lt;property name="environment"&gt;
              &lt;props&gt;
                  &lt;prop key="java.naming.factory.initial"&gt;org.jnp.interfaces.NamingContextFactory&lt;/prop&gt;
                  &lt;prop key="java.naming.factory.url.pkgs"&gt;org.jboss.naming:org.jnp.interfaces&lt;/prop&gt;
                  &lt;prop key="java.naming.provider.url"&gt;jnp://localhost:1099&lt;/prop&gt;
              &lt;/props&gt;
          &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;!-- Connection Factory --&gt;
  &lt;bean id="hornetqConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean"&gt;
          &lt;property name="jndiTemplate" ref="jndiTemplate"/&gt;
          &lt;property name="jndiName" value="/ConnectionFactory" /&gt;
  &lt;/bean&gt;
  
  &lt;!-- Destionation --&gt;
  &lt;bean id="annotationDeleteCommandDestination" class="org.springframework.jndi.JndiObjectFactoryBean"&gt;
          &lt;property name="jndiTemplate" ref="jndiTemplate"/&gt;
          &lt;property name="jndiName" value="/queue/command/annotation/deleteQueue" /&gt;
  &lt;/bean&gt;
  
  &lt;!-- Message Listener --&gt;
  &lt;bean id="annotationMessageHandler" class="command.messaging.handler.annotation.AnnotationMessageHandler"&gt;
          &lt;property name="annotationService" ref="annotationService"/&gt;
  &lt;/bean&gt;
  
  &lt;!-- Message Listener Container --&gt;
  &lt;bean id="annotationDeleteCommandMsgListenerContainer"
        class="org.springframework.jms.listener.DefaultMessageListenerContainer" 
        p:connectionFactory-ref="hornetqConnectionFactory"
        p:destination-ref="annotationDeleteCommandDestination"
        p:cacheLevelName="CACHE_CONSUMER"
        p:messageListener-ref="annotationDeleteCommandMessageHandler"
        p:concurrentConsumers="10"
        p:maxConcurrentConsumers="50"
        p:receiveTimeout="5000"
        p:idleTaskExecutionLimit="10
        p:idleConsumerLimit="5" /&gt;
  
  &lt;!-- Message Producer --&gt;
  &lt;bean id="messageSender" class="command.messaging.sender.MessageSender"&gt;
          &lt;property name="connectionFactory" ref="hornetqConnectionFactory" /&gt;
  &lt;/bean&gt;
  </code></pre>