Yes I tried to do the same thing but I put the close connection in the ejbRemove method. and then came up with the erroneous conclusion that remove is never called :).
I will take care of this Regards Manu On 3/29/07, Dain Sundstrom <[EMAIL PROTECTED]> wrote:
Release is part of the endpoint handler interface and is supposed to be called by the resource adapter directly. I think the problem is we are simply opening too many concurrent MdbConnections. For each MDB in the itest app (7) we allow up to 10 instances to be created. In the setMessageDrivenContext of these beans, we create a MdbInvoker which opens an ActiveMQ connection, and looking at the service- jar.xml file, we have a connection limit of 30 connections. We may be able to make this problem go away by changing the MdbInvoker code to open and then close a connection each time it needs one in a try/finally block. Do you want to give this a shot? -dain On Mar 29, 2007, at 4:28 AM, Manu George wrote: > Hi, > I am sometimes getting a ResourceException when I run the tests > as shown below. > javax.resource.ResourceException: No ManagedConnections available > within configured blocking timeout ( 5000 [ms] ) for pool > org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor > @1ad552c. > Once this error comes all the remaining tests fail with the same > error. I am wondering if this is because connections are not properly > released from the pool after use > > I was debugging trying to figure why this occurs and found that the > release() method on the EndpointHandler class is never getting called. > Thus ejbRemove methods are never called(or so i think :)). > > The stack trace is > > ERROR - The bean instance threw a system > exception:org.apache.xbean.recipe.ConstructionException: Error setting > property: public void > org.apache.openejb.test.mdb.ContextLookupMdbBean.setMessageDrivenConte > xt(javax.ejb.MessageDrivenContext) > throws javax.ejb.EJBException > org.apache.xbean.recipe.ConstructionException: Error setting property: > public void > org.apache.openejb.test.mdb.ContextLookupMdbBean.setMessageDrivenConte > xt(javax.ejb.MessageDrivenContext) > throws javax.ejb.EJBException > at org.apache.xbean.recipe.ObjectRecipe.setProperty > (ObjectRecipe.java:308) > at org.apache.xbean.recipe.ObjectRecipe.setProperties > (ObjectRecipe.java:251) > at org.apache.xbean.recipe.ObjectRecipe.create(ObjectRecipe.java:198) > at org.apache.xbean.recipe.AbstractRecipe.create > (AbstractRecipe.java:28) > at org.apache.openejb.core.mdb.MdbInstanceFactory.constructBean > (MdbInstanceFactory.java:217) > at org.apache.openejb.core.mdb.MdbInstanceFactory.createInstance > (MdbInstanceFactory.java:113) > at org.apache.openejb.core.mdb.EndpointHandler.<init> > (EndpointHandler.java:78) > at org.apache.openejb.core.mdb.EndpointFactory.createEndpoint > (EndpointFactory.java:57) > at org.apache.activemq.ra.ServerSessionPoolImpl.createEndpoint > (ServerSessionPoolImpl.java:90) > at > org.apache.activemq.ra.ServerSessionPoolImpl.createServerSessionImpl > (ServerSessionPoolImpl.java:76) > at org.apache.activemq.ra.ServerSessionPoolImpl.getServerSession > (ServerSessionPoolImpl.java:116) > at org.apache.activemq.ActiveMQConnectionConsumer.dispatch > (ActiveMQConnectionConsumer.java:136) > at org.apache.activemq.ActiveMQConnection.onCommand > (ActiveMQConnection.java:1479) > at org.apache.activemq.transport.ResponseCorrelator.onCommand > (ResponseCorrelator.java:95) > at org.apache.activemq.transport.TransportFilter.onCommand > (TransportFilter.java:65) > at org.apache.activemq.transport.vm.VMTransport.syncOneWay > (VMTransport.java:96) > at org.apache.activemq.transport.vm.VMTransport.oneway > (VMTransport.java:83) > at org.apache.activemq.transport.MutexTransport.oneway > (MutexTransport.java:47) > at org.apache.activemq.transport.ResponseCorrelator.oneway > (ResponseCorrelator.java:60) > at org.apache.activemq.broker.TransportConnection.dispatch > (TransportConnection.java:1138) > at org.apache.activemq.broker.TransportConnection.processDispatch > (TransportConnection.java:805) > at org.apache.activemq.broker.TransportConnection.dispatchSync > (TransportConnection.java:770) > at org.apache.activemq.broker.region.PrefetchSubscription.dispatch > (PrefetchSubscription.java:404) > at org.apache.activemq.broker.region.QueueSubscription.dispatch > (QueueSubscription.java:172) > at org.apache.activemq.broker.region.PrefetchSubscription.add > (PrefetchSubscription.java:129) > at org.apache.activemq.broker.region.Queue.addSubscription > (Queue.java:191) > at org.apache.activemq.broker.region.AbstractRegion.addConsumer > (AbstractRegion.java:233) > at org.apache.activemq.broker.region.RegionBroker.addConsumer > (RegionBroker.java:337) > at org.apache.activemq.broker.BrokerFilter.addConsumer > (BrokerFilter.java:86) > at org.apache.activemq.advisory.AdvisoryBroker.addConsumer > (AdvisoryBroker.java:78) > at org.apache.activemq.broker.BrokerFilter.addConsumer > (BrokerFilter.java:86) > at org.apache.activemq.broker.MutableBrokerFilter.addConsumer > (MutableBrokerFilter.java:96) > at > org.apache.activemq.broker.TransportConnection.processAddConsumer > (TransportConnection.java:586) > at org.apache.activemq.command.ConsumerInfo.visit > (ConsumerInfo.java:313) > at org.apache.activemq.broker.TransportConnection.service > (TransportConnection.java:294) > at org.apache.activemq.broker.TransportConnection$1.onCommand > (TransportConnection.java:185) > at org.apache.activemq.transport.ResponseCorrelator.onCommand > (ResponseCorrelator.java:95) > at org.apache.activemq.transport.TransportFilter.onCommand > (TransportFilter.java:65) > at org.apache.activemq.transport.vm.VMTransport.iterate > (VMTransport.java:201) > at org.apache.activemq.thread.PooledTaskRunner.runTask > (PooledTaskRunner.java:117) > at org.apache.activemq.thread.PooledTaskRunner.access$100 > (PooledTaskRunner.java:26) > at org.apache.activemq.thread.PooledTaskRunner$1.run > (PooledTaskRunner.java:44) > at > edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor > $Worker.runTask(ThreadPoolExecutor.java:650) > at > edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor > $Worker.run(ThreadPoolExecutor.java:675) > at java.lang.Thread.run(Thread.java:595) > Caused by: javax.ejb.EJBException: javax.jms.JMSException: No > ManagedConnections available within configured blocking timeout ( 5000 > [ms] ) for pool > org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor > @1ad552c > at > org.apache.openejb.test.mdb.ContextLookupMdbBean.setMessageDrivenConte > xt(ContextLookupMdbBean.java:68) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke > (NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke > (DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.apache.xbean.recipe.ObjectRecipe$MethodMember.setValue > (ObjectRecipe.java:830) > at org.apache.xbean.recipe.ObjectRecipe.setProperty > (ObjectRecipe.java:299) > ... 44 more > Caused by: javax.jms.JMSException: No ManagedConnections available > within configured blocking timeout ( 5000 [ms] ) for pool > org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor > @1ad552c > at > org.apache.activemq.ra.ActiveMQConnectionFactory.createConnection > (ActiveMQConnectionFactory.java:100) > at > org.apache.activemq.ra.ActiveMQConnectionFactory.createConnection > (ActiveMQConnectionFactory.java:66) > at org.apache.openejb.test.mdb.MdbInvoker.<init>(MdbInvoker.java:42) > at > org.apache.openejb.test.mdb.ContextLookupMdbBean.setMessageDrivenConte > xt(ContextLookupMdbBean.java:66) > ... 50 more > > Some insights from the MDB guy will be appreciated :) > > Regards > Manu
