diff -r 72950b29569e -r f04253b2d6c1 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 Sun Oct 30 22:10:43 2011 +0100 @@ -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