A DBCP day....
OK - I spent most of the afternoon trying to get JIRA to run in a standalone mode with the new, faster Jetty 4.1. The good thing is Jetty 4.1 loads blindingly fast (no more 30 second JBoss load times!). The bad thing is that Jetty does not support any form of connection pooling or JNDI.
So after getting it working with OFBiz' built in connection (unpooled), I then set about hacking a element for OFBiz that utilises DBCP to add pooling to Jetty. After about an hour of learning the internals of DBCP and OFBiz connection management - it works! A DBCP pool from within entityengine.xml - now that is pretty nifty.
So where's the catch? As far as I can tell DBCP doesn't support transactional datasources (XADataSource)! At all. That bites bigtime - back to the drawing board.