[jbosstools-commits] JBoss Tools SVN: r43571 - workspace/akazakov/db/org.jboss.tools.common.db/src/org/jboss/tools/common/db.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Mon Sep 10 18:49:55 EDT 2012
Author: scabanovich
Date: 2012-09-10 18:49:54 -0400 (Mon, 10 Sep 2012)
New Revision: 43571
Modified:
workspace/akazakov/db/org.jboss.tools.common.db/src/org/jboss/tools/common/db/AbstractDBManager.java
Log:
JBIDE-12446
https://issues.jboss.org/browse/JBIDE-12446
Modified: workspace/akazakov/db/org.jboss.tools.common.db/src/org/jboss/tools/common/db/AbstractDBManager.java
===================================================================
--- workspace/akazakov/db/org.jboss.tools.common.db/src/org/jboss/tools/common/db/AbstractDBManager.java 2012-09-10 20:38:43 UTC (rev 43570)
+++ workspace/akazakov/db/org.jboss.tools.common.db/src/org/jboss/tools/common/db/AbstractDBManager.java 2012-09-10 22:49:54 UTC (rev 43571)
@@ -46,13 +46,19 @@
if(started) {
return;
}
- CommonDbPlugin.getDefault().getBundle().loadClass(driver).newInstance();
- Properties props = new Properties();
- url = protocol + getDBPath();
- Connection conn = DriverManager.getConnection(url + ";create=true", props);
- conn.close();
- init();
- started = true;
+ ClassLoader l = Thread.currentThread().getContextClassLoader();
+ try {
+ CommonDbPlugin.getDefault().getBundle().loadClass(driver).newInstance();
+ Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
+ Properties props = new Properties();
+ url = protocol + getDBPath();
+ Connection conn = DriverManager.getConnection(url + ";create=true", props);
+ conn.close();
+ init();
+ started = true;
+ } finally {
+ Thread.currentThread().setContextClassLoader(l);
+ }
}
public EntityManager getEntityManager() {
More information about the jbosstools-commits
mailing list