I’m reading Jboss source code 4.0.4, However, I’ve a question about below field
to my understanding, this field is set only when before returning one connection in InternalManagedConnectionPool.getConnection() method, (twice called there, at line 247 and 193)
while the hasPermit() method is only called at line 283 and 337 in the method of returnConnection,
so, it looks to me it's always true when checked, so what's the purpose of first set it to true and then to check whether it's true?
is there a possibility that it's not true when calling hasPermit()?
meanwhile, is it possible that somehow from line 337-342, the permits.release() are actually not called due to some kind of error? ideally the cl instance will not be hold by multiple threads.... not sure if it can be an issue. if it's somehow possible, then the cl instance, which i think is 'BaseConnectionEventListener.permit' is not thread safe??
// release semaphore
2. one actual problem,
we've an app running in many machines, they connect to oracle 11g database, when our db get some issues and restarted, some app machines will keep getting below exception for about 40 minutes after db recover; so finally we restarted the apps... any ideas about why?
'No ManagedConnections available within configured blocking timeout..'