简体   繁体   English

EJB - 容器管理事务日志 (TOMEE)

[英]EJB - Container Managed Transaction Logging (TOMEE)

I am using TOMEE(apache-tomee-7.1.1-webprofile) for development purpose to deploy J2EE application and I want to know how the transaction is working in TOMEE with my application.我出于开发目的使用 TOMEE(apache-tomee-7.1.1-webprofile) 来部署 J2EE 应用程序,我想知道事务在 TOMEE 中如何与我的应用程序一起工作。

Environment环境

  • EJB 3.x EJB 3.x
  • OPENJPA 2.x OPENJPA 2.x
  • Oracle Oracle

Question问题

  1. How to enable logging for Transaction related stuffs to know in TOMEE logs.如何在 TOMEE 日志中启用事务相关内容的日志记录。

  2. My business methods are included @TransactionAttribute annotations (NotSupported, RequiresNew) so I want to know what's happening in those method Transaction in details.我的业务方法包含@TransactionAttribute 注释(NotSupported、RequiresNew),所以我想详细了解这些方法 Transaction 中发生了什么。

    Is there any way to know the Transaction in details?有没有办法详细了解交易?

I don't have tomee but you can increase the logging in your app or in the tomcat server logs我没有 tomee 但您可以在您的应用程序或 tomcat 服务器日志中增加日志记录

you can increase the logging level in tomcat server logs <tomcat_install_dir>/conf/logging.properties您可以在 tomcat 服务器日志<tomcat_install_dir>/conf/logging.properties中提高日志记录级别

add lines添加行

log4j.category.Transaction=DEBUG
log4j.category.openjpa=INFO

see links for more info查看链接了解更多信息
http://tomee.apache.org/tomee-8.0/docs/tomee-logging.html http://tomee.apache.org/tomee-8.0/docs/tomee-logging.html
http://tomee.apache.org/tomee-7.1/examples/testing-transactions.html http://tomee.apache.org/tomee-7.1/examples/testing-transactions.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM