Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.2.3
-
None
Description
After a few component redeployments, the AutoDeploymentService stops working. Looking at the thread stack traces, we find:
Timer-3 [WAITING] CPU time: 4:21 java.lang.Object.wait() org.apache.commons.pool.impl.GenericObjectPool.borrowObject() org.apache.activemq.pool.SessionPool.borrowSession() org.apache.activemq.pool.ConnectionPool.createSession(boolean, int) org.apache.activemq.pool.PooledConnection.createSession(boolean, int) org.apache.servicemix.jbi.nmr.flow.jms.AbstractJMSFlow.onComponentStarted(ComponentEvent) org.apache.servicemix.jbi.nmr.flow.jms.AbstractJMSFlow$2.componentStarted(ComponentEvent) org.apache.servicemix.jbi.framework.ComponentMBeanImpl.fireEvent(int) org.apache.servicemix.jbi.framework.ComponentMBeanImpl.doStart() org.apache.servicemix.jbi.framework.ComponentMBeanImpl.start() org.apache.servicemix.jbi.framework.InstallationService.install(File, Properties, Descriptor, boolean) org.apache.servicemix.jbi.framework.AutoDeploymentService.checkPendingComponents() org.apache.servicemix.jbi.framework.AutoDeploymentService.updateSharedLibrary(AutoDeploymentService$ArchiveEntry, File, Descriptor) org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(String, AutoDeploymentService$ArchiveEntry, boolean) org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(File, Map) org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService, File, Map) org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run() java.util.TimerThread.run()
Looking at hte AbstractJMSFlow, it appears that we create and destroy MessageConsumer instances, but never close the matching Session. That's probably the reason that we eventually run out of pooled sessions as shown in the stack trace.