首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >hibernate 4 jta webpshere

hibernate 4 jta webpshere
EN

Stack Overflow用户
提问于 2013-11-28 07:04:56
回答 1查看 766关注 0票数 0

谁有一个很好的例子,如何使用hibernate 4.2设置Wepsphere 8。我们没有使用EJB。

在hibernate.properties中使用以下配置时

hibernate.transaction.jta.platform=org.hibernate.service.jta.platform.internal.WebSphereExtendedJtaPlatform

在没有其他属性的情况下,我们在执行两阶段提交(数据库和MQ)时会收到以下消息

11/27/13 17:30:20:330EST 00000024 LocalTranCoor W WLTC0032W:清理LocalTransactionContainment时回滚了一个或多个本地事务资源。

如果我们将hibernate.properties更改为以下内容

hibernate.transaction.factory_class=org.hibernate.engine.transaction.internal.jta.JtaTransactionFactory hibernate.transaction.jta.platform=org.hibernate.service.jta.platform.internal.WebSphereExtendedJtaPlatform

我们收到以下消息: org.hibernate.engine.transaction.internal.jta.JtaTransaction afterAfterCompletion HHH000426:如果启用了缓存,则应设置休眠te.transaction.manager_lookup_class

这也会导致: 11/27/13 14:31:18:526 EST 00000035 SystemErr R org.hibernate.exception.GenericJDBCException: causes using next() 11/27/13 14:31:18:527 EST 00000035 SystemErr R at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54) 11/27/13 14:31:18:527 EST 00000035 SystemErr R at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)

EN

回答 1

Stack Overflow用户

发布于 2013-12-07 04:48:23

我们找到了答案。如果我们设置将factory_class设置为org.hibernate.engine.transaction.internal.jta.JtaTransactionFactory.然后,我们受到webpshere中的JTA设置的约束,这将使事务超时。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20254819

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档