title: Configuring sendTimeout in connecting to ActiveMQ with Jboss resource adapter
body: <p>Based on this <a href="http://rastkososkic.blogspot.de/2013/12/deploying-activemq-590-resource-adapter.html?showComment=1422559659598#c2672386122249314801" rel="nofollow">link</a>, i've connected <code>JBoss eap 6.2</code> to an external <code>ActiveMQ 5.9.0</code>. The <code>org.apache.activemq.ActiveMQConnectionFactory</code> has a <code>sendTimeout</code> field that i want to set. But in this approach i can't access to this class directly and it seems all i can do is adding some parameter to <code>ServerUrl</code> in <code>resouce-adapter</code> deceleration in <code>standalone.xml</code> in JBoss. </p>
  
  <p>Based on this <a href="http://activemq.apache.org/tcp-transport-reference.html" rel="nofollow">link</a>, it's possible to add some parameter to <code>ServerUrl</code>, but it seems it hasn't <code>sendTimeout</code> parameter. And this <a href="http://activemq.apache.org/cms/configuring.html" rel="nofollow">link</a> (ActiveMQ CPP) introduces some other parameters, that they don't work and I get below error in Jboss startup:</p>
  
  <pre><code>java.lang.IllegalArgumentException: Invalid connect parameters: {connection.sendTimeout=20000}
  </code></pre>
  
  <p>ActiveMQ <code>resource-adapter</code> in <code>standalone.xml</code> file:</p>
  
  <pre><code>&lt;subsystem xmlns="urn:jboss:domain:resource-adapters:1.1"&gt;
      &lt;resource-adapters&gt;
          &lt;resource-adapter id="activemq-rar.ra"&gt;
              &lt;module slot="main" id="org.apache.activemq"/&gt;
              &lt;transaction-support&gt;LocalTransaction&lt;/transaction-support&gt;
              &lt;config-property name="ServerUrl"&gt;tcp://localhost:61616?connection.sendTimeout=20000&lt;/config-property&gt;
              &lt;connection-definitions&gt;
                  &lt;connection-definition class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory" jndi-name="java:/activemq/ConnectionFactory" enabled="true" use-java-context="true" pool-name="ActiveMQConnectionFactoryPool"&gt;
                  &lt;/connection-definition&gt;
              &lt;/connection-definitions&gt;
          &lt;/resource-adapter&gt;
          &lt;!--resource-adapter--&gt;
      &lt;/resource-adapters&gt;
  &lt;/subsystem&gt;
  </code></pre>
  
  <p>So how can i set value of this parameter? Should i config <code>ServerUrl</code> in <code>ra.xml</code> file instead?</p>