For some time now, the JMS transport that's used by WSO2 ESB suffers from a major limitation. That's to log the following stack trace repetitively if the broker goes offline. And worse is that the JMS transport will not re-connect although the broker comes online. The result is the disk will fill up with lots of logs.
2011-04-05 10:08:45,830 [-] [jms-Worker-18] ERROR ServiceTaskManager Error acquiring a JMS connection to : QueueConnectionFactory using JNDI properties : {java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory, java.naming.provider.url=tcp://localhost:61616, interface=SimpleStockQuoteServicePortType, transport.jms.ConnectionFactoryType=queue, serviceType=proxy}javax.jms.JMSException: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:280)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:224)
at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:172)
at org.apache.axis2.transport.jms.JMSUtils.createConnection(JMSUtils.java:554)
at org.apache.axis2.transport.jms.ServiceTaskManager$MessageListenerTask.createConnection(ServiceTaskManager.java:809)
at org.apache.axis2.transport.jms.ServiceTaskManager$MessageListenerTask.getConnection(ServiceTaskManager.java:691)
at org.apache.axis2.transport.jms.ServiceTaskManager$MessageListenerTask.receiveMessage(ServiceTaskManager.java:489)
at org.apache.axis2.transport.jms.ServiceTaskManager$MessageListenerTask.run(ServiceTaskManager.java:414)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:173)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:525)
at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:435)
at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:401)
at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:260)
When re-connect you should see the following log.
[2011-04-05 14:57:00,580] INFO - ServiceTaskManager Reconnection attempt : 2 for service :StockQuoteProxy was successful!
This is a major improvement if you plan to use the JMS transport in production. This improvement will be available with the next release of WSO2 ESB and AS.
0 comments:
Post a Comment