You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Mattias Jiderhamn (JIRA)" <ji...@apache.org> on 2012/11/20 15:03:00 UTC

[jira] [Updated] (AMQ-3988) PooledSession throw Exception at closing

     [ https://issues.apache.org/jira/browse/AMQ-3988?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mattias Jiderhamn updated AMQ-3988:
-----------------------------------

    Comment: was deleted

(was: Even with 5.7.0 I'm getting an exception when closing, although a few lines further down:

{code}
javax.jms.IllegalStateException: The Session is closed
	at org.apache.activemq.ActiveMQSession.checkClosed(ActiveMQSession.java:731) ~[activemq-core-5.7.0.jar:5.7.0]
	at org.apache.activemq.ActiveMQSession.rollback(ActiveMQSession.java:574) ~[activemq-core-5.7.0.jar:5.7.0]
	at org.apache.activemq.pool.PooledSession.close(PooledSession.java:120) ~[activemq-pool-5.7.0.jar:5.7.0]
	at org.springframework.jms.support.JmsUtils.closeSession(JmsUtils.java:108) [spring-jms-3.1.0.RELEASE.jar:3.1.0.RELEASE]
{code})
    
> PooledSession throw Exception at closing
> ----------------------------------------
>
>                 Key: AMQ-3988
>                 URL: https://issues.apache.org/jira/browse/AMQ-3988
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: activemq-camel, activemq-pool, JMS client
>    Affects Versions: 5.6.0
>         Environment: Mac OSX Snow Leopard, Java 6, ActiveMQ 5.6.0, Camel 2.10, Spring 3.0.7.RELEASE
>            Reporter: Jorge Davison
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 5.7.0
>
>         Attachments: AMQ-3988.patch
>
>
> Using ActiveMQ library 5.6.0 with Camel 2.10, the PooledSession is throwing IllegalStateException at shutdown application time.
> With the version 5.4.2 of ActiveMQ library there is not such behavior.
> {code}
> 2012-08-23 12:08:48,274 [WARN] PooledSession(122): Caught exception trying close() when putting session back into the pool, will invalidate. javax.jms.IllegalStateException: The Session is closed 
> javax.jms.IllegalStateException: The Session is closed
> 	at org.apache.activemq.ActiveMQSession.checkClosed(ActiveMQSession.java:731) ~[activemq-core-5.6.0.jar:5.6.0]
> 	at org.apache.activemq.ActiveMQSession.setMessageListener(ActiveMQSession.java:813) ~[activemq-core-5.6.0.jar:5.6.0]
> 	at org.apache.activemq.pool.PooledSession.close(PooledSession.java:99) ~[activemq-pool-5.6.0.jar:5.6.0]
> 	at org.springframework.jms.support.JmsUtils.closeSession(JmsUtils.java:108) [spring-jms-3.0.7.RELEASE.jar:3.0.7.RELEASE]
> 	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.clearResources(DefaultMessageListenerContainer.java:1099) [spring-jms-3.0.7.RELEASE.jar:3.0.7.RELEASE]
> 	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:999) [spring-jms-3.0.7.RELEASE.jar:3.0.7.RELEASE]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_33]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_33]
> 	at java.lang.Thread.run(Thread.java:680) [na:1.6.0_33]
> {code}
> Pool Connection Declaration:
> {code}
> 	<bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
> 		<property name="brokerURL" value="${amq.url}" />
> 		<property name="userName" value="${amq.username}" />
> 		<property name="password" value="${amq.password}" />
> 		<property name="watchTopicAdvisories" value="${amq.watchTopicAdv}" />
> 	</bean>
> 	<bean id="pooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory">
> 		<property name="maxConnections" value="${amq.maxConnections}" />
> 		<property name="maximumActive" value="${amq.maximumActive}" />
> 		<property name="connectionFactory" ref="jmsConnectionFactory" />
> 	</bean>
> 	<bean id="jmsConfig" class="org.apache.camel.component.jms.JmsConfiguration">
> 		<property name="connectionFactory" ref="pooledConnectionFactory" />
> 		<property name="transacted" value="false" />
> 		<property name="testConnectionOnStartup" value="true" />
> 		<property name="concurrentConsumers" value="${amq.concurrentConsumers}" />
> 	</bean>
> 	<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
> 		<property name="configuration" ref="jmsConfig" />
> 	</bean>
> {code}
> Maven Dependencies:
> {code}
> 		<dependency>
> 			<groupId>org.apache.activemq</groupId>
> 			<artifactId>activemq-camel</artifactId>
> 			<version>5.6.0</version>
> 		</dependency>
> 		<dependency>
> 			<groupId>org.apache.activemq</groupId>
> 			<artifactId>activemq-pool</artifactId>
> 			<version>5.6.0</version>
> 		</dependency>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira