Is it really an infinite loop (server never ending) or a ungraceful shutdown? Which version do you run? I usually see graceful shutdowns here.

On 08/01/2013 05:24 AM, Johnny Minty wrote:
Hi Guys,

It looks like I'm able to put the mail server in to an infinite loop if I call 
close on the root application context. (Stack and cause below)

The shutdown is failing on the destroy method on the 'mailqueuefactorybean' :
<bean id="mailqueuefactory" class="org.apache.james.queue.activemq.ActiveMQMailQueueFactory" 
depends-on="broker"/>

   @PreDestroy    public void destroy() {        for (String mbean : mbeans) {     
       unregisterMBean(mbean); <-- throws 
java.util.ConcurrentModificationException here        }
         for (MailQueue mailQueue : queues.values()) {            
LifecycleUtil.dispose(mailQueue);        }
     }

WARN  16:10:48 | InitDestroyAnnotationBeanPostProcessor | Invocation of destroy 
method failed on bean with name 'mailqueuefactory': 
java.util.ConcurrentModificationExceptionERROR 16:10:48 | JamesMailetContext | 
Exception caught in 
OutboundDelivery.run()org.apache.james.queue.api.MailQueue$MailQueueException: 
Unable to dequeue next message;  nested exception is:     
javax.jms.IllegalStateException: The Session is closed  at 
org.apache.james.queue.jms.JMSMailQueue.deQueue(JMSMailQueue.java:171)       at 
com.liverton.seemail.transport.OutboundDelivery.run(OutboundDelivery.java:655)  
     at java.lang.Thread.run(Thread.java:722)Caused by: 
javax.jms.IllegalStateException: The Session is closed       at 
org.apache.activemq.ActiveMQSession.checkClosed(ActiveMQSession.java:731)    at 
org.apache.activemq.ActiveMQSession.commit(ActiveMQSession.java:554) at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)   
     at sun.reflect.Delegat
i
ngMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)       at 
java.lang.reflect.Method.invoke(Method.java:601)     at 
org.springframework.jms.connection.CachingConnectionFactory$CachedSessionInvocationHandler.invoke(CachingConnectionFactory.java:348)
 at com.sun.proxy.$Proxy96.commit(Unknown Source)        at 
org.apache.james.queue.jms.JMSMailQueue.deQueue(JMSMailQueue.java:116)       
... 2 moreERROR 16:10:48 | JamesMailetContext | Exception caught in 
OutboundDelivery.run()org.apache.james.queue.api.MailQueue$MailQueueException: 
Unable to dequeue next message;  nested exception is:        
javax.jms.IllegalStateException: The Session is closed  at 
org.apache.james.queue.jms.JMSMailQueue.deQueue(JMSMailQueue.java:171)       at 
com.liverton.seemail.transport.OutboundDelivery.run(OutboundDelivery.java:655)  
     at java.lang.Thread.run(Thread.java:722)Caused by: 
javax.jms.IllegalStateException: The Session is closed       at 
org.apache.activemq.ActiveMQSession.checkClosed(ActiveMQSession.java:731)    at 
org.apache.activemq.Act
i
veMQSession.commit(ActiveMQSession.java:554)    at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)   
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)     at 
org.springframework.jms.connection.CachingConnectionFactory$CachedSessionInvocationHandler.invoke(CachingConnectionFactory.java:348)
 at com.sun.proxy.$Proxy96.commit(Unknown Source)        at 
org.apache.james.queue.jms.JMSMailQueue.deQueue(JMSMailQueue.java:116)       
... 2 more
Regards,

Johnny Minty
                                        


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to