Piotr,
I'm guessing that at some point, the message you sent to the jbi
endpoint ends up in another Camel route. ServiceMix has a thread pool
per component, so in order to process the exchange in the second Camel
route, it needs another thread from the pool, where all threads are
already waiting on sendSync.
We should probably improve the servicemix-camel component to use send()
instead of sendSync() whenever possible. For now, you should try to
increase the size of the thread pools by modifying
conf/servicemix.properties (for a global increase of thread pool size)
or by looking at http://servicemix.apache.org/thread-pools.html for a
more targeted tuning.
Regards,
Gert
Piotr Jagielski wrote:
Hi,
I have some servicemix-camel service unit which uses following route:
jms queue -> jbi endpoint
After launching some long-running tests, following error occured :
Exception in thread "ActiveMQ Transport: tcp:///127.0.0.1:41368"
java.lang.ArrayIndexOutOfBoundsException: 28515
>---at
org.apache.activemq.openwire.OpenWireFormat.getFromUnmarshallCache(OpenWireFormat.java:513)
>---at
org.apache.activemq.openwire.v2.BaseDataStreamMarshaller.tightUnmarsalCachedObject(BaseDataStreamMarshaller.java:137)
>---at
org.apache.activemq.openwire.v2.ConnectionInfoMarshaller.tightUnmarshal(ConnectionInfoMarshaller.java:69)
>---at
org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(OpenWireFormat.java:347)
>---at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:273)
>---at
org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:156)
>---at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:136)
>---at java.lang.Thread.run(Thread.java:595)
This exception is not itself a problem, but when i looked at thread
dump, it appeared that ToJbiProcessor hung on DeliveryChannel.sendSync :
"DefaultMessageListenerContainer-1776" prio=1 tid=0x00002aaaaea39ee0
nid=0x4547 in Object.wait() [0x00000000539d3000..0x00000000539d4e40]
at java.lang.Object.wait(Native Method)
- waiting on <0x00002afd9884a428> (a
org.apache.servicemix.jbi.messaging.InOutImpl)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.waitForExchange(DeliveryChannelImpl.java:699)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:472)
- locked <0x00002afd9884a428> (a
org.apache.servicemix.jbi.messaging.InOutImpl)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:442)
at
org.apache.servicemix.camel.ToJbiProcessor.process(ToJbiProcessor.java:76)
at
org.apache.servicemix.camel.JbiEndpoint$1.process(JbiEndpoint.java:46)
at org.apache.camel.util.ProducerCache.send(ProducerCache.java:67)
at org.apache.camel.CamelTemplate.send(CamelTemplate.java:107)
at org.apache.camel.CamelTemplate.send(CamelTemplate.java:57)
Is it possible to set some timeout while calling
DeliveryChannel.sendSync?
Or shall I set timeout on jms transaction manager to rollback whole
transaction? (How to do this?)
Should I post this on servicemix-user too?
Regards,
Piotr