Outbound session pooling - number of sessions per connection

View: New views
2 Messages — Rating Filter:   Alert me  

Outbound session pooling - number of sessions per connection

by szefo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have configured connection pooling using JmsTemplate and org.jencks.amqpool.JcaPooledConnectionFactory.
How can I set number of sessions for one connection???

This is my configuration:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>

  <bean id="transactionManager" class="org.jencks.factory.TransactionManagerFactoryBean"/>
 
  <bean id="connectionFactory"
      class="org.apache.activemq.ActiveMQConnectionFactory">
      <property name="brokerURL" value="tcp://localhost:7777" />
  </bean>

  <!-- Connection Factory Pool configuration -->
  <bean id="JcaPooledConnectionFactory" class="org.jencks.amqpool.JcaPooledConnectionFactory">
    <!-- <constructor-arg value="vm://localhost" /> -->
    <property name="connectionFactory" ref="connectionFactory" />
    <property name="maxConnections" value="8" />
    <property name="maximumActive" value="8" />
    <property name="transactionManager" ref="transactionManager"/>
    <property name="name" value="LocalBroker"/>
  </bean>
 
  <bean id="jmsTemplate"
      class="org.springframework.jms.core.JmsTemplate">
    <property name="defaultDestinationName" value="Hello.Queue"/>
    <property name="connectionFactory" ref="JcaPooledConnectionFactory"/>
   
    <!-- Turns on local transactions! (TESTED!)-->
    <property name="sessionTransacted" value="true"/>
   
  </bean>

</beans>

Thanks

Re: Outbound session pooling - number of sessions per connection

by szefo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok, this is my mistake, I read the documentation so many times, that I missed this:

<!-- The number of connections to the broker to use simultaneously. -->
<property name="maxConnections" value="8" />

<!-- The maximum number of active sessions for a given connection -->
<property name="maximumActive" value="250" />
LightInTheBox - Buy quality products at wholesale price