diff -r 4653fc7609e7 -r 6e16e3bee1ca src/org/sonews/storage/impl/DrupalDatabaseProvider.java --- a/src/org/sonews/storage/impl/DrupalDatabaseProvider.java Sun Oct 09 01:22:18 2011 +0200 +++ b/src/org/sonews/storage/impl/DrupalDatabaseProvider.java Tue Oct 11 00:38:41 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