Application system in the websphere5.1 environment small operation, SystemOut.log files continue to play the following warming statements
[06-5-9 17:01:44:778 gmt+08:00] 3945f948 connectionman W j2ca0075w: An active transaction should exist when processing method Allocatemcwrapper.
[06-5-9 17:01:44:803 gmt+08:00] 3945f948 connectionman W j2ca0075w: An active transaction should exist when processing method INITIALIZEFORUOW.
The documentation for WebSphere is explained as follows:
***********************************************************
Cause
These messages are being produced due "unsupported" environment. When application has spun it own threads from EJB, accessing a database isn't supported (per the Java EE specification). If a Servlet is spinning its own threads and accessing a database, the Java-EE specification is isn't clear on this, so WEBSPH ERE application Server 5.0 'll allow it in this time. IBM is working with Sun to clarify this in specification, so eventually (i.e. Java EE 1.4) spun threads from a Servlet AC Cessing a database outside of a transaction would not be supported either.
Since we don ' t want to promote the usage of "naked" threads accessing, databases, we are producing the warning MESSAG Es. Although they may is filling up the logs and we feel that this 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
Java EE specification.
Solution
The temporary fix to suppress this warning messages from log file was to modify the file j2c.properties which can be found In the $WAS _home/properties directory ($WAS _home are the directory where WebSphere application Server 5.0.x is installed) and
Add the following line to the file:
False
***********************************************************
The specific reason is that the above warning is given in a WebSphere environment if you access DataSource's connection from a thread created by a non-websphere (such as a servlet). The method for eliminating this warning is referred to above.