activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Tarau <...@daxtechnologies.com>
Subject Re: Session closed after a while(random)
Date Tue, 18 Jul 2006 18:17:36 GMT
Al the code resides in on JVM - we will change this in the future, we 
will have a standalone process for an ActiveMQ browser so we will use 
TCP/IP connection latter.
Well, I don't know about fatal errors in the transport, but the 
connection is not closed(as you can see in my last posts) the connection 
is cleaned up(close sessions, stream ,listeners) but the session remains 
connected.

The only thing that occurs just before I get "Session close" is this 
exception :

I think I will do like that :

I will store one session in a ThreadLocal and use that to create 
consumers and producers. Both operations will catch the first exception 
and recreate the session again so only the second failure is propagated 
up. So in this case a connection cleanup will not be a problem.
Also I will active activemq loging with debuging and everything I will 
get I will post it here.

Thanks again.

2006-07-15 03:24:54,628 [AcitveMQ Connection Worker: vm://localhost#0] 
ERROR com.daxtechnologies.sams.manager.SamsManagerJMS - JMS Error
javax.jms.JMSException: Interrupted.
   at 
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:45) 

   at 
org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1462) 

   at 
org.apache.activemq.ActiveMQConnection.onException(ActiveMQConnection.java:1478) 

   at 
org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:94) 

   at 
org.apache.activemq.transport.ResponseCorrelator.onException(ResponseCorrelator.java:120)


   at 
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:94) 

   at 
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:63) 

   at 
org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:76)
   at 
org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:44)
   at 
org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60) 

   at 
org.apache.activemq.broker.TransportConnection.dispatch(TransportConnection.java:211) 

   at 
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:64) 

   at 
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:97) 

   at 
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:63) 

   at 
org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:76)
   at 
org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:44)
   at 
org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:68)


   at 
org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:73) 

   at 
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1131) 

   at 
org.apache.activemq.ActiveMQSession.syncSendPacket(ActiveMQSession.java:1667) 

   at 
org.apache.activemq.ActiveMQMessageConsumer.<init>(ActiveMQMessageConsumer.java:196)


   at 
org.apache.activemq.ActiveMQSession.createConsumer(ActiveMQSession.java:840) 

   at 
org.apache.activemq.ActiveMQSession.createConsumer(ActiveMQSession.java:800) 

   at 
com.daxtechnologies.sams.manager.JmsSessionWrapper.createConsumer(JmsSessionWrapper.java:106)


   at 
com.daxtechnologies.sams.manager.AbstractSamsManagerQueue.consume(AbstractSamsManagerQueue.java:133)


   at 
com.daxtechnologies.sams.manager.SamsManagerQueues$AbstractQueueRunnable.consume(SamsManagerQueues.java:602)


   at 
com.daxtechnologies.sams.manager.SamsManagerQueues$AbstractQueueRunnable.throttleQueue(SamsManagerQueues.java:571)


   at 
com.daxtechnologies.sams.manager.SamsManagerQueues$AbstractQueueRunnable.run(SamsManagerQueues.java:622)


   at 
com.daxtechnologies.sams.manager.SamsManagerThreadPool$WorkerThead.run(SamsManagerThreadPool.java:188)


Caused by: java.io.InterruptedIOException: Interrupted.
   at 
org.apache.activemq.transport.FutureResponse.set(FutureResponse.java:56)
   at 
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:89) 

   ... 23 more

James Strachan wrote:
> On 7/18/06, Adrian Tarau <ady@daxtechnologies.com> wrote:
>> Hi James,
>>
>> Again I use VM connector so no failure should happen.
>
> So all your code resides in a single JVM right? There is no TCP 
> whatsoever?
>
>
>> But anyway that's not a problem with the failure, the big question is
>> why the connection is cleaned up when a transport error occur
>
> What else could we do other than close the connection and throw an
> exception if the transport goes bad.
>
>
>> and what's
>> the approach here, is not clear for me in case of transport failures,
>> the connection release the sessions and next time I will get "Session
>> close" when I'm trying to create a consumer.
>> What should I do? in case of an error first try to recreate the session?
>
> So first try and diagnose what is causing the failure. So turn on
> debug logging. Or create a local build of ActiveMQ which dumps in big
> flashing letters the exact error which is causing the transport to be
> closed - something is causing the session to close and its 1 single
> Java class, so you should be able to add logging code in there to tell
> you exactly what is causing it. Then mail us the stack trace and
> interesting bit of your log.
>


Mime
View raw message