This should be fixed in all cvs versions. It was a jetty bug.
thank you very much!
I'm encountering the same "Interrupted while requesting permit!" error with JBoss3.0.1/Jetty connecting to a MSSQLServer datasource. My question is "is there a way to get the fix, without stepping up to the very latest-and-greatest code in CVS?".
Apologies in advance if this is the wrong forum, or just a stupid question, but I've read the developer and cvs guides and faqs and haven't been able to figure out how to get this fix...
I've tried pulling and building the latest from cvs - this gives me JBoss 4.0.0.alpha (which is a little too bleeding edge for me). I've pulled and built the JBoss_3_0_1 label from cvs. This build appears to be exactly the same as the 3.0.1 release (as I would expect) and exhibits the problem. Is there any way to get this fix against the (presumably stable) 3.0.1 codebase?
Once again, sorry if this is a dumb question - and any pointers will be greatly appreciated.
I think you want to
cvs ... co -rBranch_3_0 jboss-all
to get the latest on the 3.0 branch (nearly 3.0.2)
You can also try the 3.2 branch (... -rBranch_3_2 ...) but it is nearly the same as 4.0... but it does have waaaaaay simpler datasource configuration.
Both of these should get releases in the next couple of days.
David - thanks very much for the pointer! That was exactly what I needed...
Unfortunately (for me at least) the 3.0 Branch (3.0.2RC1) seems to exhibit the same problem. After a little digging (and copious printlns) I'm fairly certain the basic problem is caused by the executing Thread being interrupted at some point, and not being 'reset' (by having it's interrupted() method invoked). This causes the method call to FIFOSemaphore.attempt() in InternalManagedConnectionPool to fail fast - leading to the ResourceException being thrown. I verified that calling interrupted() on the current Thread before calling the FIFOSemaphore.attempt() method appears to solve (or at least mask) the problem.
Following David's lead of it being a Jetty problem I did a diff between the latest code and the Branch_3_0 code, then did a search for any new calls to interrupted(). Sure enough, found one in the org.mortbay.util.ThreadPool class (in the main loop of the run() method). Adding this single line to the 3_0 codebase ThreadPool class appears to resolve the problem.
So, I suppose I can get past my problem by simply making this single line change and rebuilding, but is there any way I can help ensure this change makes it into the 3.0.2 release? (Assuming that whoever is 'responsible' for the Jetty code agrees that the change is appropriate?) SourceForge appears to be down right now, when it comes back I'll take a look at submitting a Patch - hopefully that's the right approach.
On a side note, I'm surprised that only a few people seem to have encountered this problem. I'm getting it consistently within a few minutes of running our application.
Anyway, thanks again David for your help - it was just what I needed.
Please submit a patch!