[KARAF-1572] JDBC Lock without using long running transactions
[KARAF-2633] Prevent deadlocks with classloaders on JDK 6