J2CA0075W 处理方法 allocateMCWrapper 时应该存在活动的事务
2006-05-24 12:04
260 查看
应用系统在websphere5.1环境小运行,SystemOut.log 文件不断打出以下warming语句
[06-5-9 17:01:44:778 GMT+08:00] 3945f948 ConnectionMan W J2CA0075W: 处理方法 allocateMCWrapper 时应该存在活动的事务。
[06-5-9 17:01:44:803 GMT+08:00] 3945f948 ConnectionMan W J2CA0075W: 处理方法 initializeForUOW 时应该存在活动的事务。
websphere的文档解释如下:
***********************************************************
Cause
These messages are being produced due to an "unsupported" environment. When application has spun its own threads from an EJB, accessing a database is not supported (per the J2EE specification). If a Servlet is spinning its own threads and accessing a database, the J2EE specification is not clear on this, so WebSphere Application Server 5.0 will allow it at this time. IBM is working with Sun to clarify this in the specification, so eventually (i.e. J2EE 1.4) spun threads from a Servlet accessing a database outside of a transaction will not be supported either.
Since we don't want to promote the usage of these "naked" threads accessing databases, we are producing the warning messages. Although they may be filling up the logs, we feel that these are necessary to warn the user that they are doing something not in-line with the intended usage. Customers should consider changing their application to comply with the
J2EE specification.
Solution
The temporary fix to suppress these warning messages from log file is to modify the file j2c.properties which can be found in the $WAS_HOME/properties directory ($WAS_HOME is the directory where WebSphere Application Server 5.0.x is installed) and
add the following line to the file:
false
***********************************************************
具体原因就是在websphere环境下如果从非WebSphere创建的线程(如servlet)中访问datasource的Connection的话,将给出以上警告。消除该警告的方法参考上文的方法。
[06-5-9 17:01:44:778 GMT+08:00] 3945f948 ConnectionMan W J2CA0075W: 处理方法 allocateMCWrapper 时应该存在活动的事务。
[06-5-9 17:01:44:803 GMT+08:00] 3945f948 ConnectionMan W J2CA0075W: 处理方法 initializeForUOW 时应该存在活动的事务。
websphere的文档解释如下:
***********************************************************
Cause
These messages are being produced due to an "unsupported" environment. When application has spun its own threads from an EJB, accessing a database is not supported (per the J2EE specification). If a Servlet is spinning its own threads and accessing a database, the J2EE specification is not clear on this, so WebSphere Application Server 5.0 will allow it at this time. IBM is working with Sun to clarify this in the specification, so eventually (i.e. J2EE 1.4) spun threads from a Servlet accessing a database outside of a transaction will not be supported either.
Since we don't want to promote the usage of these "naked" threads accessing databases, we are producing the warning messages. Although they may be filling up the logs, we feel that these are necessary to warn the user that they are doing something not in-line with the intended usage. Customers should consider changing their application to comply with the
J2EE specification.
Solution
The temporary fix to suppress these warning messages from log file is to modify the file j2c.properties which can be found in the $WAS_HOME/properties directory ($WAS_HOME is the directory where WebSphere Application Server 5.0.x is installed) and
add the following line to the file:
false
***********************************************************
具体原因就是在websphere环境下如果从非WebSphere创建的线程(如servlet)中访问datasource的Connection的话,将给出以上警告。消除该警告的方法参考上文的方法。
相关文章推荐
- J2CA0075W 处理方法 allocateMCWrapper 时应该存在活动的事务
- J2CA0075W 处理方法 allocateMCWrapper 时应该存在活动的事务
- 【javaweb:事务控制】事务控制两个方法在插入存在主从表关系的数据时应该注意的顺序问题!
- MySQL不支持事务处理的解决方法
- 几个常用得事务处理方法
- 利用ASP实现事务处理的方法-转
- 实现业务逻辑的几种不同方法,及其优缺点 事务脚本、表模块、活动记录、领域模型
- 常见事务并发问题以及处理方法
- ORA-06519: 检测到活动的自治事务处理,已经回退
- Android开发中的SQLite事务处理,即beginTransaction()方法
- 事务处理方法备忘
- .net 事务嵌套存储过程事务的处理方法
- SQL Server在存储过程中编写事务处理代码的方法
- Hibernate的事务处理机制和flush方法的用法
- 利用ASP实现事务处理的方法
- 利用ASP实现事务处理的方法
- MySQL不支持事务处理的解决方法
- 数据库'tempdb' 的事务日志已满处理方法
- spring 事务处理中,同一个类中:A方法(无事务)调B方法(有事务),事务不生效问题
- spring事务处理:调用一个方法前的事务处理过程