Concurrency Exceptions (2001 – 2006)
ConcurrencyException
is a development exception that is raised when a Java concurrency violation occurs. Only when a running thread is interrupted, causing the JVM to throw an InterruptedException
, is an internal exception information displayed with the error message, as shown in Example 13-2.
Format
EXCEPTION [TOPLINK – error code]: Exception name
EXCEPTION DESCRIPTION: Message
INTERNAL EXCEPTION: Message
Example 13-2 Concurrency Exception
EXCEPTION [TOPLINK – 2004]: oracle.toplink.exceptions.ConcurrencyException
EXCEPTION DESCRIPTION: Signal attempted before wait on concurrency manager.
This usually means that an attempt was made to commit or roll back a transaction before being started, or rolled back twice.
-
2001: WAIT_WAS_INTERRUPTED
-
Cause: In a multi threaded environment, one of the waiting threads was interrupted.
-
Action: Such exceptions are dependent on the application.
-
2002: WAIT_FAILURE_SERVER
-
Cause: A request for a connection from the connection pool has been forced to wait, and that wait has been interrupted.
-
Action: Such exceptions are dependent on the application.
-
2003: WAIT_FAILURE_CLIENT
-
Cause: A request for a connection from the connection pool has been forced to wait, and that wait has been interrupted.
-
Action: Such exceptions are dependent on the application.
-
2004: SIGNAL_ATTEMPTED_BEFORE_WAIT
-
Cause: A signal was attempted before a wait on concurrency manager. This usually means that an attempt was made to commit or roll back a transaction before it was started, or to rollback a transaction twice.
-
Action: Verify transactions in the application.
-
2005: WAIT_FAILURE_SEQ_DATABASE_SESSION
-
Cause: An InterruptedException
was raised while DatabaseSession
sequencing waited for a separate connection to become available.
-
Action: Examine concurrency issues involving object creation with your DatabaseSession
.
-
2006: SEQUENCING_MULTITHREAD_THRU_CONNECTION
-
Cause: Several threads attempted to concurrently obtain sequence objects from the same DatabaseSession
or ClientSession
.
-
Action: Avoid concurrent writing through the same DatabaseSession
or ClientSession
.