[Mulgara-svn] r515 - branches/nw-interface/src/jar/driver/java/org/mulgara/server/driver
pag at mulgara.org
pag at mulgara.org
Mon Nov 5 04:40:44 UTC 2007
Author: pag
Date: 2007-11-04 22:40:44 -0600 (Sun, 04 Nov 2007)
New Revision: 515
Modified:
branches/nw-interface/src/jar/driver/java/org/mulgara/server/driver/SessionFactoryFinder.java
Log:
Cleaned up a nested try/catch to properly manage exceptions
Modified: branches/nw-interface/src/jar/driver/java/org/mulgara/server/driver/SessionFactoryFinder.java
===================================================================
--- branches/nw-interface/src/jar/driver/java/org/mulgara/server/driver/SessionFactoryFinder.java 2007-11-05 04:39:57 UTC (rev 514)
+++ branches/nw-interface/src/jar/driver/java/org/mulgara/server/driver/SessionFactoryFinder.java 2007-11-05 04:40:44 UTC (rev 515)
@@ -170,19 +170,16 @@
// Use reflection to create the SessionFactory
try {
- try {
- return (SessionFactory)Reflect.newInstance(Class.forName(className), serverURI);
- } catch (RuntimeException ie) {
- Throwable originalEx = ie.getCause();
- // check if the exception thrown indicates we should retry
- Throwable e = originalEx.getCause();
- if (!(e instanceof NonRemoteSessionException)) {
- throw new SessionFactoryFinderException("Couldn't create session factory for " + serverURI, e);
- }
- // tell the calling code
- throw (NonRemoteSessionException)originalEx;
+ return (SessionFactory)Reflect.newInstance(Class.forName(className), serverURI);
+ } catch (RuntimeException ie) {
+ Throwable originalEx = ie.getCause();
+ // check if the exception thrown indicates we should retry
+ Throwable e = originalEx.getCause();
+ if (!(e instanceof NonRemoteSessionException)) {
+ throw new SessionFactoryFinderException("Couldn't create session factory for " + serverURI, e);
}
-
+ // tell the calling code
+ throw (NonRemoteSessionException)originalEx;
} catch (Exception e) {
throw new SessionFactoryFinderException("Couldn't create session factory for " + serverURI, e);
}
More information about the Mulgara-svn
mailing list