The J2CA0075W message is logged when an application has
created its own thread from a servlet and subsequently uses that thread to
obtain a J2C connection.
The Enterprise Java Bean (EJB) 2.0 and 2.1 specifications prohibit an
EJB from managing threads. This includes starting, stopping, suspending
and resuming threads.
EJB 2.0, Section 24.1.2 and EJB 2.1, Section 25.1.2 state the
following:
Programming Restrictions
The enterprise bean must not attempt to manage threads. The enterprise
bean must not attempt to start, stop, suspend, or resume a thread; or to
change a thread’s priority or name. The enterprise bean must not attempt
to manage thread groups.
For a servlet, the J2EE 1.3 and 1.4 specifications allow web components to
create and manage threads, however, the execution and behavior of these
threads must be tightly monitored by the application, not the application
server. The specifications state the following:
J2EE 1.3 and J2EE 1.4:
J2EE.4.2.1.1 Transaction Requirements
If a web component creates a thread, the J2EE platform must ensure that
the newly created thread is not associated with any JTA transaction.
J2EE.4.2.3 Transactions and Threads
JTA transactions should be started and completed in the thread in which
the service method is called. Additional threads that are created for any
purpose should not attempt to start JTA transactions.
Since both the application server and the application cannot use or start
a JTA transaction on a newly created thread, the thread does not have a
transaction context associated with it.
It is in the absence of a transaction that the J2CA0075W warning
message is logged. The application server will not create an LTC (local
transaction containment) either. This is because the thread was created by
the application and is not managed by the WebSphere® Application Server
runtime.
|