gpt4 book ai didi

java - Websphere Runtime事务超时问题

转载 作者:行者123 更新时间:2023-12-01 17:56:27 25 4
gpt4 key购买 nike

我们使用两个应用程序服务器,Jboss 和 Websphere (v8.5.5.11)。我们在本地平台中使用jboss,但开发服务器使用Websphere。我想更改运行时的事务超时。在Jboss上工作正常,但在websphere上不行。如何为websphere线程设置事务超时。

JtaTransactionManager  tm = (JtaTransactionManager) SpringApplicationContext.getContext().getBean(PlatformTransactionManager.class);
tm.getUserTransaction().setTransactionTimeout(timeout);

最佳答案

下面是获取 WebSphere Application Server 事务管理器以设置线程上的事务超时(以秒为单位)的示例,

com.ibm.tx.jta.TransactionManagerFactory.getTransactionManager().setTransactionTimeout(timeout);

关于java - Websphere Runtime事务超时问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60708163/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com