Hi,
I read a blog about configuring a pool of connections (inbound):
http://gnodet.blogspot.com/2006/12/over-past-weeks-i-spend-some-times-load.htmlI am using Spring+Jencks(2.1)+ActiveMQ(4.1.1).
I would like to use JcaPooledConnectionFactory (with jencks JCA inbound support).
I configured the org.jencks.amqpool.JcaPooledConnectionFactory , but it doesn't seem to work, there is only one connection and multiple sessions.
Here is my configuration:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "
http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
<property name="config" value="classpath:broker.xml" />
</bean>
<bean id="transactionManager" class="org.jencks.factory.TransactionManagerFactoryBean"/>
<bean id="resourceAdapter" class="org.apache.activemq.ra.ActiveMQResourceAdapter" depends-on="broker">
<property name="serverUrl" value="vm://localhost"/>
</bean>
<bean id="AMQconnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"/>
<bean id="connectionFactory" class="org.jencks.amqpool.JcaPooledConnectionFactory">
<constructor-arg value="vm://localhost" />
<property name="connectionFactory" ref="AMQconnectionFactory" />
<property name="maxConnections" value="8" />
<property name="maximumActive" value="8" />
<property name="transactionManager" ref="transactionManager"/>
<property name="name" value="LocalBroker"/>
</bean>
<bean id="jencks" class="org.jencks.JCAContainer">
<property name="transactionManager" ref="transactionManager"/>
<property name="threadPoolSize" value="25"/>
<property name="resourceAdapter" ref="resourceAdapter"/>
</bean>
<bean id="activspec" class="org.apache.activemq.ra.ActiveMQActivationSpec">
<property name="destination" value="Hello.Queue"/>
<property name="destinationType" value="javax.jms.Queue"/>
<property name="enableBatch" value="true" />
<property name="maxMessagesPerBatch" value="1" />
<property name="maxSessions" value="25" />
</bean>
<bean id="inboundConnector" class="org.jencks.JCAConnector">
<property name="jcaContainer" ref="jencks" />
<property name="activationSpec" ref="activspec"/>
<property name="ref" value="echoBean"/>
</bean>
<bean id="echoBean" class="mdpojo.approach.activemq.HelloBean" singleton="true"/>
</beans>
I read a post:
http://www.nabble.com/How-to-configure-multiple-connection-threads-tt15447114.html#a15447114Does it actually work? I am not able to check it - logs are all the time the same...
So the only way to do it is to copy/paste the inboundConnector??? It doesn't seem to be a good practice... What if I would like to have 20 inbound-connection pool?