i'll have a look but that one looks very strange to me. any more specifics about how to reproduce ? or why you think your suggestion fixes the problem ?
the Session.getConnection() is a bit tricky because the contract of that method changed between version 3.0 and 3.1 of hibernate. In hibernate 3.1 that method transfers responsibility of closing the connection. So it should be used with care.
I produced the bug with jbpm-starters-kit-3.1-beta2 on windows with a sun jdk1.4.2_03.
Just try a monitoring->search instances function, you will have a Search error null result caused by a NullPointerException.
The problem is caused by getConnection() method in DbPersistenceService class. Initialy there's a situation where both persistenceServiceFactory.getDataSource() and session are null so the whole method returns null. I'll keep investigating...