如何在 jboss-seam 中设置休眠会话超时?
如何在 JBOSS-SEAM 中设置休眠会话超时?
我有一个上传接口,在服务器端有一个 for ,可以从文件中逐行读取。每行都插入数据库中,导入大约 4.000 行后,连接丢失并返回以下错误:
11:04:00,750 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_58] - Abort of action id -3f57feaf:d6b:4f0adc25:946 在多个时调用其中的线程处于活动状态。 11:04:00,750 警告 [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.CheckedAction_2] - CheckedAction::check - 原子操作 -3f57feaf:d6b:4f0adc25:946 中止,1 个线程处于活动状态! 11:04:02,766 警告 [JDBCExceptionReporter] SQL 错误:0,SQLState:null 11:04:02,766 错误 [JDBCExceptionReporter] 事务未激活:tx=TransactionImple < ac,BasicAction:-3f57feaf:d6b:4f0adc25:946状态:ActionStatus.ABORTED>; - 嵌套可抛出:(javax.resource.ResourceException:事务未激活:tx=TransactionImple < ac,BasicAction:-3f57feaf:d6b:4f0adc25:946状态:ActionStatus.ABORTED >) 11:04:03,562 错误 [ImportarArquivoTransacaoBusiness] 导入 linha 4007 do arquivo ITA_COM_49925225000148_20111226_00193.txt 数据库时出错。
HOW DO I SET THE HIBERNATE SESSION TIMEOUT IN JBOSS-SEAM?
I Have an upload interface with a for in server side that read line by line from a file. Each line is inserted in database and after import around 4.000 lines the connection is lost and the following erros is returned:
11:04:00,750 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_58] - Abort of action id -3f57feaf:d6b:4f0adc25:946 invoked while multiple threads active within it.
11:04:00,750 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.CheckedAction_2] - CheckedAction::check - atomic action -3f57feaf:d6b:4f0adc25:946 aborting with 1 threads active!
11:04:02,766 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
11:04:02,766 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f57feaf:d6b:4f0adc25:946 status: ActionStatus.ABORTED >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f57feaf:d6b:4f0adc25:946 status: ActionStatus.ABORTED >)
11:04:03,562 ERROR [ImportarArquivoTransacaoBusiness] Erro ao importar a linha 4007 do arquivo ITA_COM_49925225000148_20111226_00193.txt para o DB.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
“休眠会话超时”不存在。
您遇到的情况实际上是事务超时。
在 JBoss 中,您可以在
conf/jboss-service.xml
配置文件中进行设置。有关详细信息,请参阅此处。A "hibernate session timeout" doesn't exist.
What you are experiencing is actually a transaction timeout.
In JBoss you set this in the
conf/jboss-service.xml
configuration file. See here for details.