activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Jencks in production: No ManagedConnections available within configured blocking timeout
Date Fri, 18 Aug 2006 02:36:08 GMT
A pool size of 10 looks fairly small - have you tried using a larger pool size?

On 8/17/06, Eugene Prokopiev <prokopiev@stc.donpac.ru> wrote:
> Hi,
>
> Is anybody use Jencks + ActiveMQ in production? After some time runnig I
> got:
>
> 2006-08-17 14:32:24,027 ERROR ActiveMQSession                  - error
> dispatching message:
> org.springframework.jms.UncategorizedJmsException: Uncategorized
> exception occured during JMS processing; nested exception is
> javax.jms.JMSExce
> ption: No ManagedConnections available within configured blocking
> timeout ( 60000 [ms] )
> Caused by:
> javax.jms.JMSException: No ManagedConnections available within
> configured blocking timeout ( 60000 [ms] )
>          at
> org.apache.activemq.ra.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:99)
>          at
> org.apache.activemq.ra.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:65)
>          at
> org.springframework.jms.core.JmsTemplate.createConnection(JmsTemplate.java:792)
>          at
> org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:420)
>          at
> org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:486)
>          at
> org.springframework.jms.core.JmsTemplate.convertAndSend(JmsTemplate.java:565)
>          at manager.broker.MessageRouter.onMessage(MessageRouter.java:53)
>          at
> manager.broker.MessageRouter$$FastClassByCGLIB$$94a8605c.invoke(<generated>)
>          at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
>          at
> org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:709)
>          at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
>          at
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:100)
>          at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
>          at
> org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:647)
>          at
> manager.broker.MessageRouter$$EnhancerByCGLIB$$42ff1b4.onMessage(<generated>)
>          at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
>          at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
>          at
> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
>          at
> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:690)
>          at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:164)
>          at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
>          at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
>          at java.lang.Thread.run(Thread.java:595)
>
> My configuration is:
>
> <beans>
>
>         <!-- Geronimo Transaction Manager -->
>         <bean id="transactionContextManager"
> class="org.jencks.factory.TransactionContextManagerFactoryBean"/>
>         <bean id="geronimo"
> class="org.jencks.factory.GeronimoTransactionManagerFactoryBean"/>
>         <bean id="geronimoTransactionManager"
> class="org.springframework.transaction.jta.JtaTransactionManager">
>                 <property name="userTransaction" ref="geronimo" />
>         </bean>
>
>         <!-- PostgreSQL JDBC DataSource configuration -->
>         <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
> destroy-method="close">
>                 <property name="driverClassName" value="org.postgresql.Driver"/>
>                 <property name="url" value="jdbc:postgresql://ats-manager/activemq"/>
>                 <property name="username" value="activemq"/>
>         </bean>
>
>         <!-- ActiveMQ Broker configuration -->
>         <bean id="broker" class="org.apache.activemq.broker.BrokerService"
> init-method="start" destroy-method="stop">
>                 <property name="persistent" value="true"/>
>                 <property name="transportConnectorURIs">
>                         <list>
>                                 <value>tcp://localhost:5000</value>
>                         </list>
>                 </property>
>                 <property name="persistenceAdapter">
>                         <bean class="org.apache.activemq.store.jdbc.JDBCPersistenceAdapter">
>                                 <property name="dataSource" ref="dataSource"/>
>                         </bean>
>                 </property>
>         </bean>
>
>         <!-- Jencks Connection Manager configuration -->
>         <bean id="connectionManager"
> class="org.jencks.factory.ConnectionManagerFactoryBean">
>                 <property name="transactionSupport">
>                         <bean class="org.jencks.factory.XATransactionFactoryBean">
>                                 <property name="useTransactionCaching" value="true"/>
>                                 <property name="useThreadCaching" value="true"/>
>                         </bean>
>                 </property>
>                 <property name="poolingSupport">
>                         <bean class="org.jencks.factory.SinglePoolFactoryBean">
>                                 <property name="maxSize" value="10"/>
>                                 <property name="minSize" value="1"/>
>                                 <property name="blockingTimeoutMilliseconds" value="60000"/>
>                                 <property name="idleTimeoutMinutes" value="60"/>
>                                 <property name="matchOne" value="true"/>
>                                 <property name="matchAll" value="true"/>
>                                 <property name="selectOneAssumeMatch" value="true"/>
>                         </bean>
>                 </property>
>         </bean>
>
>         <!-- JCA ActiveMQ Connection configuration -->
>         <bean id="jmsResourceAdapter"
> class="org.apache.activemq.ra.ActiveMQResourceAdapter" depends-on="broker">
>                 <property name="serverUrl" value="tcp://localhost:5000"/>
>         </bean>
>         <bean id="jmsManagedConnectionFactory"
> class="org.apache.activemq.ra.ActiveMQManagedConnectionFactory">
>                 <property name="resourceAdapter" ref="jmsResourceAdapter"/>
>         </bean>
>         <bean id="jmsConnectionFactory"
> class="org.springframework.jca.support.LocalConnectionFactoryBean">
>                 <property name="managedConnectionFactory"
> ref="jmsManagedConnectionFactory"/>
>                 <property name="connectionManager" ref="connectionManager"/>
>      </bean>
>
>         <!-- Jencks JCA Container configuration -->
>         <bean id="jencksJCAContainer" class="org.jencks.JCAContainer">
>                 <property name="bootstrapContext">
>                         <bean class="org.jencks.factory.BootstrapContextFactoryBean">
>                                 <property name="threadPoolSize" value="5"/>
>                         </bean>
>                 </property>
>                 <property name="resourceAdapter" ref="jmsResourceAdapter"/>
>         </bean>
>         <bean id="inboundConnector" class="org.jencks.JCAConnector">
>                 <property name="jcaContainer" ref="jencksJCAContainer" />
>                 <property name="activationSpec">
>                         <bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
>                                 <property name="destination" value="messages.input"/>
>                                 <property name="destinationType" value="javax.jms.Queue"/>
>                         </bean>
>                 </property>
>                 <property name="transactionManager" ref="geronimo"/>
>                 <property name="ref" value="messageRouter"/>
>         </bean>
>
>      <bean id="messageRouter" class="manager.broker.MessageRouterSimple">
>                 <property name="jmsTemplate">
>                         <bean class="org.springframework.jms.core.JmsTemplate">
>                                 <property name="connectionFactory" ref="jmsConnectionFactory"/>
>                         </bean>
>                 </property>
>         </bean>
>
> </beans>
>
> manager.broker.MessageRouterSimple.java is:
>
>
> public class MessageRouterSimple implements MessageListener {
>
>         private Log log = LogFactory.getLog(getClass());
>
>         private JmsTemplate jmsTemplate;
>
>         public void setJmsTemplate(JmsTemplate jmsTemplate) {
>                 this.jmsTemplate = jmsTemplate;
>         }
>
>         public void onMessage(Message msg) {
>                 try {
>                         long begin = System.currentTimeMillis();
>                         log.debug("currentTimeMillis : "+begin);
>                         final manager.messages.model.Message message =
>                                 (manager.messages.model.Message)((ObjectMessage)msg).getObject();
>                         jmsTemplate.convertAndSend("messages.output.consumer1", message);
>                         long end = System.currentTimeMillis();
>                         log.debug("route time : "+(end-begin));
>                         log.debug("currentTimeMillis : "+end);
>                 } catch (JMSException e) {
>                         e.printStackTrace();
>                 }
>         }
>
> }
>
> Is my configuration wrong or anybody has a same problems?
>
> I tried to use Spring 2.0 message driven POJO without JTA and all works
> fine ...
>
> --
> Thanks,
> Eugene Prokoiev
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message