title: How to use AMQ PooledConnectionFactory with spring integration?
body: <p>I am using activemq 3.7 and activemq pool 3.7 libraries integrated with spring integration 2.1.3 and spring 3.0.5. When i tried to define connectionFactory like this i got the exception below</p>
  
  <pre><code>&lt;bean id="connectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory"&gt;
      &lt;property name="targetConnectionFactory"&gt;
          &lt;bean class="org.apache.activemq.pool.PooledConnectionFactory"
              destroy-method="stop"&gt;
              &lt;property name="connectionFactory"&gt;
                  &lt;bean class="org.apache.activemq.pool.PooledConnectionFactory" destroy-method="stop"&gt;
                      &lt;constructor-arg name="brokerURL" value="${jms.broker.url}" /&gt;
                  &lt;/bean&gt;
              &lt;/property&gt;
          &lt;/bean&gt;
      &lt;/property&gt;
      &lt;property name="sessionCacheSize" value="10" /&gt;
      &lt;property name="cacheProducers" value="false" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Here is the exception:</p>
  
  <pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'connectionFactory' defined in class path resource 
  [META-INF/integration-context.xml]: 
  Cannot create inner bean 'org.apache.activemq.pool.PooledConnectionFactory#1445748' 
  of type [org.apache.activemq.pool.PooledConnectionFactory] 
  while setting bean property 'targetConnectionFactory'; nested exception is 
  org.springframework.beans.factory.BeanCreationException: 
  Error creating bean with name 'org.apache.activemq.pool.PooledConnectionFactory#1445748' 
  defined in class path resource [META-INF/integration-context.xml]: 
  Initialization of bean failed; 
  nested exception is java.lang.reflect.MalformedParameterizedTypeException
  </code></pre>
  
  <p>if i use ActiveMQConnectionFactory instead of PooledConnectionFactory everything is deployed fine but i have performace i have performance issues.</p>