diff -r 72950b29569e -r 763472057819 src/org/sonews/storage/impl/DrupalDatabaseProvider.java --- a/src/org/sonews/storage/impl/DrupalDatabaseProvider.java Sun Oct 09 00:00:25 2011 +0200 +++ b/src/org/sonews/storage/impl/DrupalDatabaseProvider.java Tue Oct 18 22:50:39 2011 +0200 @@ -17,7 +17,6 @@ */ package org.sonews.storage.impl; -import java.sql.SQLException; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import org.sonews.storage.Storage; @@ -38,19 +37,14 @@ } @Override - public Storage storage(Thread thread) - throws StorageBackendException { - try { - if (!instances.containsKey(Thread.currentThread())) { - DrupalDatabase db = new DrupalDatabase(); - db.arise(); - instances.put(Thread.currentThread(), db); - return db; - } else { - return instances.get(Thread.currentThread()); - } - } catch (SQLException ex) { - throw new StorageBackendException(ex); + public Storage storage(Thread thread) throws StorageBackendException { + DrupalDatabase db = instances.get(Thread.currentThread()); + + if (db == null) { + db = new DrupalDatabase(); + instances.put(Thread.currentThread(), db); } + + return db; } -} +} \ No newline at end of file