tibco.ems.illegalstateexception illegal use of receive() from multiple threads

http://eai.ittoolbox.com/groups/technical-functional/tibco-l/error-when-attempting-to-receive-a-message-4632560

Hi All,
Can you please just why I get this error always?
This error occur too oftenly and I had to restart our Tibco service to fix this issue.

Is this error due to heavy load on TIBCO Service or Is our TIBCO loosing connection with EMS?

Here is the log which I see in Admin console.
There was an error when attempting to receive a message.javax.jms.IllegalStateException: Illegal use of receive() from multiple threads at com.tibco.tibjms.TibjmsxSessionImp._receive(Tibjms xSessionImp.java:1892) at com.tibco.tibjms.TibjmsMessageConsumer._receive(Ti bjmsMessageConsumer.java:240) at com.tibco.tibjms.TibjmsMessageConsumer.receive(Tib jmsMessageConsumer.java:440) at com.tibco.plugin.jms.JMSAbstractGetMessageActivity $JMSMessageGetter.getEvent(JMSAbstractGetMessageAc tivity.java:926) at com.tibco.plugin.jms.JMSAbstractGetMessageActivity $JMSMessageGetter.run(JMSAbstractGetMessageActivit y.java:799)

Here is one possible explanation:
jms session and derived objects (message consumers,message producers) are not supposed to be used by many thread concurrently.
This is what might happen in your application and result is this IlegalState exception at the end.
Maybe jms sender is invoked after one message is delivered by jms receiver. And jms sender does use same Connection (and same session) as jms receiver.
Or a Get Message is performed using same Connection (and same session)
make activities Jms sender /Get Message be synchronized using a lock/critical section.
This will ensure one thread at a time use the jms object.

Other suggestion: increase value of parameter MaxSessions of process starter Jms receiver

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值