tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdan...@apache.org
Subject svn commit: r450938 - /incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/DASImpl.java
Date Thu, 28 Sep 2006 17:51:05 GMT
Author: bdaniel
Date: Thu Sep 28 10:51:05 2006
New Revision: 450938

URL: http://svn.apache.org/viewvc?view=rev&rev=450938
Log:
TUSCANY-277 Throw an exception if we get a null Connection object

Modified:
    incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/DASImpl.java

Modified: incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/DASImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/DASImpl.java?view=diff&rev=450938&r1=450937&r2=450938
==============================================================================
--- incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/DASImpl.java
(original)
+++ incubator/tuscany/java/das/rdb/src/main/java/org/apache/tuscany/das/rdb/impl/DASImpl.java
Thu Sep 28 10:51:05 2006
@@ -152,11 +152,12 @@
         } catch (NamingException e) {
             throw new RuntimeException(e);
         }
-        try {
-            // TODO - I think we should rename this getDataSourceURL?
+        try {          
             DataSource ds = (DataSource) ctx.lookup(configWrapper.getConfig().getConnectionInfo().getDataSource());
             try {
                 connection = ds.getConnection();
+                if ( connection == null ) 
+                	throw new RuntimeException("Could not obtain a Connection from DataSource");
                 connection.setAutoCommit(false);
                 setConnection(connection);
             } catch (SQLException e) {



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message