title: Post a message to a remote JMS queue using JBoss
body: <p>This looks simple but I can't find a simple answer.</p>
  
  <p>I want to open a connection to a remote JMS broker (IP and port are known), open a session to the a specific queue (name known) and post a message to this queue.</p>
  
  <p>Is there any simple Java API (standard if possible) to do that ?</p>
  
  <hr>
  
  <p><strong>EDIT</strong></p>
  
  <p>Ok I understand now that JMS is a driver spec just like JDBC and not a communication protocol as I thought.</p>
  
  <p>Given I am running in JBoss, I still don't understand how to create a <a href="http://www.jboss.org/file-access/default/members/jbossmessaging/freezone/docs/javadoc/api-1.4.0.SP1/org/jboss/jms/client/JBossConnectionFactory.html" rel="nofollow noreferrer">JBossConnectionFactory</a>.</p>
  
  <hr>
  
  <p><strong>EDIT</strong></p>
  
  <p>I actually gave the problem some thoughts (hmmm) and if JMS needs to be treated the same as JDBC, then I need to use a client provided by my MQ implementation. Since we are using SonicMQ for our broker, I decided to embed the sonic_Client.jar library provided with SonicMQ. </p>
  
  <p>This is working in a standalone Java application and in our JBoss service.</p>
  
  <p>Thanks for the help</p>