负载下抛出 com.ibm.websphere.jtaextensions.NotSupportedException

发布于 2024-07-11 14:45:43 字数 3543 浏览 6 评论 0原文

我有一个包含 4 个 MDB 的应用程序,每个 MDB 通过 JMS 从 MQ 接收 SOAP 消息。 收到消息后,我们将 XML 处理为对象模型并进行相应处理,这始终涉及通过 Hibernate 将消息加载或保存到 Oracle 数据库。

此外,我们还有一个每分钟触发一次的石英进程,可能会也可能不会触发因此也可以使用 Hibernate 读取或写入数据库的操作。

当系统处于高负载下时,即处理大量 1k + 并可能执行由石英进程触发的一些数据库读/写操作时,我们不断看到日志中抛出以下异常。

=================================================== ============================= 在 com.integrasp.iatrade.logic.MessageContextRouting.lookup(MessageContextRouting.java:150) 在 com.integrasp.iatrade.logic.RequestResponseManager.findRequestDestination(请求 stResponseManager.java:153) 在 com.integrasp.iatrade.logic.RequestResponseManager.findRequestDestination(请求 stResponseManager.java:174) 在 com.integrasp.iatrade.logic.IOLogic.processResponse(IOLogic.java:411)< br>> 在 com.integrasp.iatrade.logic.FxOrderQuoteManager.requestQuote(FxOrderQuoteManage r.java:119) 在 com.integrasp.iatrade.logic.FxOrderQuoteManager.processRequest(FxOrderQuoteMana ger.java:682) 在 com.integrasp.iatrade.logic.FxOrderSubmissionManager.processRequest(FxOrderSubm issionManager.java:408) 在 com.integrasp.iatrade.eo.SubmitOrderRequest.process(SubmitOrderRequest.java:60) 在 com.integrasp.iatrade.ejb.BusinessLogicRegister.perform(BusinessLogicRegister.java:85) 在 com.integrasp.iatrade.ejb.mdb.OrderSubmissionBean.onMessage(OrderSubmissionBean .java:147) 在 com.ibm.ejs.jms.listener.MDBWrapper$PriviledgedOnMessage.run(MDBWrapper.java:30 2) 在 com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:63 ) 在 com.ibm.ejs.jms.listener.MDBWrapper.callOnMessage(MDBWrapper.java:271) 在 com.ibm.ejs.jms.listener.MDBWrapper.onMessage(MDBWrapper.java:240) 在 com.ibm.mq.jms.MQSession.run(MQSession.java:1593) 在 com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:970) 在 com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:891) 在 com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:656) 在 com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:623) 在 sun.reflect.GenerateMethodAccessor79.invoke(来源未知) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在 java.lang.reflect.Method.invoke(Method.java:615) 在 com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatch er.java:37) 在 com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:96) 在 com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:132) 在 com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:481) 在 com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473) 引起原因:java.lang.reflect.InitationTargetException 在 sun.reflect.GenerateMethodAccessor42.invoke(来源未知) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在 java.lang.reflect.Method.invoke(Method.java:615) 在 org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionMana gerAdapter$TransactionAdapter.registerSynchronization(WebSphereExtendedJTATransactionLookup.java:225) ... 30 更多 导致:com.ibm.websphere.jtaextensions.NotSupportedException at com.ibm.ws.jtaextensions.ExtendedJTATransactionImpl.registerSynchronizationCall backForCurrentTran(ExtendedJTATransactionImpl.java:247)

... 34 更多

任何人都可以帮助阐明 com.ibm.websphere.jtaextensions.NotSupportedException 的含义吗? IBM 文档说

“如果尝试在环境中或在该功能不可用时注册 SynchronizationCallback,则事务管理器会抛出异常。”

对我来说,这听起来像是容器拒绝启动 hibernates 调用一笔交易。 如果有人知道容器为何会抛出该消息,请告诉我。

预先感谢

卡尔

I have an application containing 4 MDB's each of which receives SOAP messages over JMS from MQ. Once the messages have been received we process the XML into an object model and process accordingly which always involves either loading or saving messages to an Oracle database via Hibernate.

Additionally we have a quartz process with fires every minute that may or may not trigger so actions which could also read or write to the database using Hibernate.

When the system in under high load, i.e. processing large numbers 1k + and potentially performing some database read/writes triggered by our quartz process we keep seeing the following exception be thrown in our logs.

===============================================================================
at com.integrasp.iatrade.logic.MessageContextRouting.lookup(MessageContextRouting. java:150)
at com.integrasp.iatrade.logic.RequestResponseManager.findRequestDestination(Reque stResponseManager.java:153) at com.integrasp.iatrade.logic.RequestResponseManager.findRequestDestination(Reque stResponseManager.java:174)
at com.integrasp.iatrade.logic.IOLogic.processResponse(IOLogic.java:411)< br /> at com.integrasp.iatrade.logic.FxOrderQuoteManager.requestQuote(FxOrderQuoteManage r.java:119)
at com.integrasp.iatrade.logic.FxOrderQuoteManager.processRequest(FxOrderQuoteMana ger.java:682)
at com.integrasp.iatrade.logic.FxOrderSubmissionManager.processRequest(FxOrderSubm issionManager.java:408)
at com.integrasp.iatrade.eo.SubmitOrderRequest.process(SubmitOrderRequest.java:60)
at com.integrasp.iatrade.ejb.BusinessLogicRegister.perform(BusinessLogicRegister.j ava:85)
at com.integrasp.iatrade.ejb.mdb.OrderSubmissionBean.onMessage(OrderSubmissionBean .java:147)
at com.ibm.ejs.jms.listener.MDBWrapper$PriviledgedOnMessage.run(MDBWrapper.java:30 2)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:63 )
at com.ibm.ejs.jms.listener.MDBWrapper.callOnMessage(MDBWrapper.java:271)
at com.ibm.ejs.jms.listener.MDBWrapper.onMessage(MDBWrapper.java:240)
at com.ibm.mq.jms.MQSession.run(MQSession.java:1593)
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:970)
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSessio n.java:891)
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:656)
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:623)
at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatch er.java:37)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:96)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:132)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:481)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionMana gerAdapter$TransactionAdapter.registerSynchronization(WebSphereExtendedJTATransa ctionLookup.java:225)
... 30 more
Caused by: com.ibm.websphere.jtaextensions.NotSupportedException
at com.ibm.ws.jtaextensions.ExtendedJTATransactionImpl.registerSynchronizationCall backForCurrentTran(ExtendedJTATransactionImpl.java:247)

... 34 more

Could any body help to shed come light on what com.ibm.websphere.jtaextensions.NotSupportedException means. The IBM documentation says

"The exception is thrown by the transaction manager if an attempt is made to register a SynchronizationCallback in an environment or at a time when this function is not available. "

Which to me sounds like the container is rejecting hibernates call to start a transaction. If anybody has any idea on why the container could be throwing the message please let me know.

Thanks in advance

Karl

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

她如夕阳 2024-07-18 14:45:43

如果您确实需要高负载,我会删除您的应用程序和数据库之间的 Hibernate 层。 如果没有 Hibernate,您将拥有更少的活动部件和更多的控制权。

这是我能给你的唯一建议。

If you really need high load I would remove the Hibernate layer between your app and the database. Without Hibernate you have less moving parts and more control.

That is the only advice I can give you.

当梦初醒 2024-07-18 14:45:43

如果有人感兴趣的话,那就是一个线程在事务超时时尝试同步事务。

我曾假设如果事务超时,那么线程将被杀死,但事实并非如此。

卡尔

If anyone was interested it was a thread that was trying to sync the transaction when the transaction had timed out.

I had assumed that if the transaction timeout then the thread would have been killed however this was not the case.

karl

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文