Hi all,
we are running JBoss-2.4.4_Tomcat-4.0.1-beta/jboss with version 1.0 of the persistence manager from MVCSoft. after experiencing OutOfMemory problems with a batch program which sucks data out of a legacy database and into postgresql through the EJB layer, i ran up Optimizeit and discovered that the source of the "leak" is instances of the following class are never getting garbage collected. org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock I wrote a simple test client which just repeatedly called a stateless session bean method called createAddress which creates a simple cmp (no cmr) entity bean. The same problem occurred. Please refer to the attached file (data.txt) for the allocation backtrace of org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock in this simple test. I've tried debugging this but to be perfectly honest I'm a little out of my depth here. It appears the reference counts for the locks never reaches zero and therefore the removeLockRef in the BeanLockManager never actually removes the lock from the map. If anyone can help me on this, I would really appreciate it. I'm not quite sure what to do next. Any suggestions would be great. regards, Colin Daly.
Allocation backtraces for class org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock. application ------------------------------------------------------------------------------------------------- Backtrace of code allocating org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock -------------------------------------------------------------------------------- 4908 instances of org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock allocated. 100.0% sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run() (starting in TCPTransport.java:574) 100.0% sun.rmi.transport.tcp.TCPTransport.handleMessages() (starting in TCPTransport.java:444) 100.0% sun.rmi.transport.Transport.serviceCall() (starting in Transport.java:106) 100.0% sun.rmi.transport.Transport$1.run() (starting in Transport.java:151) 100.0% sun.rmi.server.UnicastServerRef.dispatch() (starting in UnicastServerRef.java:183) 100.0% org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke() (starting in JRMPContainerInvoker.java:401) 100.0% org.jboss.ejb.StatelessSessionContainer.invoke() (starting in StatelessSessionContainer.java:286) 100.0% org.jboss.ejb.plugins.LogInterceptor.invoke() (starting in LogInterceptor.java:151) 100.0% org.jboss.ejb.plugins.SecurityInterceptor.invoke() (starting in SecurityInterceptor.java:116) 100.0% org.jboss.ejb.plugins.TxInterceptorCMT.invoke() (starting in TxInterceptorCMT.java:100) 100.0% org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions() (starting in TxInterceptorCMT.java:233) 100.0% org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext() (starting in TxInterceptorCMT.java:134) 100.0% org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke() (starting in StatelessSessionInstanceInterceptor.java:73) 100.0% org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke() (starting in StatelessSessionContainer.java:510) 100.0% au.com.ucw.cop.ejb.PartyOrderControllerBean.createTestAddress() (starting in PartyOrderControllerBean.java:670) 100.0% au.com.ucw.cop.ejb.PartyOrderControllerBean.createAddress() (starting in PartyOrderControllerBean.java:936) 100.0% $Proxy13.create() 100.0% org.jboss.ejb.plugins.local.BaseLocalContainerInvoker$HomeProxy.invoke() (starting in BaseLocalContainerInvoker.java:341) 100.0% org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeHome() (starting in BaseLocalContainerInvoker.java:227) 100.0% org.jboss.ejb.EntityContainer.invokeHome() (starting in EntityContainer.java:421) 100.0% org.jboss.ejb.plugins.LogInterceptor.invokeHome() (starting in LogInterceptor.java:85) 100.0% org.jboss.ejb.plugins.SecurityInterceptor.invokeHome() (starting in SecurityInterceptor.java:91) 100.0% org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome() (starting in TxInterceptorCMT.java:86) 100.0% org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions() (starting in TxInterceptorCMT.java:233) 100.0% org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext() (starting in TxInterceptorCMT.java:134) 100.0% org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome() (starting in EntityLockInterceptor.java:97) 100.0% org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome() (starting in EntityInstanceInterceptor.java:136) 100.0% org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome() (starting in EntitySynchronizationInterceptor.java:231) 100.0% org.jboss.ejb.BeanLockManager.getLock() (starting in BeanLockManager.java:54)