I get Interrupted while requesting permit what does it mean.
It means JBoss will not let you allocate a connection, jboss has a semaphore that controls access to the connection pool.
To gain access to the connection pool you need a "permit".
The most likely reason for this message is a transaction rollback. At transaction rollback, JBoss interrupts the thread to break code out of
wait()
operations or blocking I/O operations.
Too few connections in the pool
If you have too few connections in the pool, threads will accumulate at the semaphore. Eventually, the waits will become so long that a transaction timeout occurs.
Note: You are more likely to see No managed connections available before this message.
The transaction already timed out
JBoss timed out the transaction, but you caught the exception. You then tried to do more work (e.g. get a db connection) which won't be allowed.
Don't do this, you must let the invocation fallback to the transaction boundary,
where you can then choose to retry it or report the problem.
The most likely reason for a timeout is due to resources not responding.
e.g. database waits, entity bean locks, etc.
Comments