ibatis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbe...@apache.org
Subject svn commit: r702693 - in /ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis: datasource/ mapping/ transaction/
Date Wed, 08 Oct 2008 04:19:03 GMT
Author: cbegin
Date: Tue Oct  7 21:19:01 2008
New Revision: 702693

URL: http://svn.apache.org/viewvc?rev=702693&view=rev
Log:
corrected exceptions

Added:
    ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/datasource/DataSourceException.java
    ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/transaction/TransactionException.java
Modified:
    ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/datasource/JndiDataSourceFactory.java
    ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/datasource/UnpooledDataSourceFactory.java
    ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/mapping/Configuration.java

Added: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/datasource/DataSourceException.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/datasource/DataSourceException.java?rev=702693&view=auto
==============================================================================
--- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/datasource/DataSourceException.java
(added)
+++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/datasource/DataSourceException.java
Tue Oct  7 21:19:01 2008
@@ -0,0 +1,21 @@
+package org.apache.ibatis.datasource;
+
+public class DataSourceException extends RuntimeException {
+
+  public DataSourceException() {
+    super();
+  }
+
+  public DataSourceException(String message) {
+    super(message);
+  }
+
+  public DataSourceException(String message, Throwable cause) {
+    super(message, cause);
+  }
+
+  public DataSourceException(Throwable cause) {
+    super(cause);
+  }
+  
+}

Modified: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/datasource/JndiDataSourceFactory.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/datasource/JndiDataSourceFactory.java?rev=702693&r1=702692&r2=702693&view=diff
==============================================================================
--- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/datasource/JndiDataSourceFactory.java
(original)
+++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/datasource/JndiDataSourceFactory.java
Tue Oct  7 21:19:01 2008
@@ -1,7 +1,5 @@
 package org.apache.ibatis.datasource;
 
-import org.apache.ibatis.monarch.environment.EnvironmentException;
-
 import javax.naming.*;
 import javax.sql.DataSource;
 import java.util.*;
@@ -33,7 +31,7 @@
       }
 
     } catch (NamingException e) {
-      throw new EnvironmentException("There was an error configuring JndiDataSourceTransactionPool.
Cause: " + e, e);
+      throw new DataSourceException("There was an error configuring JndiDataSourceTransactionPool.
Cause: " + e, e);
     }
   }
 

Modified: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/datasource/UnpooledDataSourceFactory.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/datasource/UnpooledDataSourceFactory.java?rev=702693&r1=702692&r2=702693&view=diff
==============================================================================
--- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/datasource/UnpooledDataSourceFactory.java
(original)
+++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/datasource/UnpooledDataSourceFactory.java
Tue Oct  7 21:19:01 2008
@@ -2,7 +2,6 @@
 
 import org.apache.ibatis.jdbc.UnpooledDataSource;
 import org.apache.ibatis.reflection.MetaObject;
-import org.apache.ibatis.monarch.environment.EnvironmentException;
 
 import javax.sql.DataSource;
 import java.util.Properties;
@@ -31,7 +30,7 @@
         Object convertedValue = convertValue(metaDataSource, propertyName, value);
         metaDataSource.setValue(propertyName, convertedValue);
       } else {
-        throw new EnvironmentException("Unkown DataSource property: " + propertyName);
+        throw new DataSourceException("Unkown DataSource property: " + propertyName);
       }
     }
     if (driverProperties.size() > 0) {

Modified: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/mapping/Configuration.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/mapping/Configuration.java?rev=702693&r1=702692&r2=702693&view=diff
==============================================================================
--- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/mapping/Configuration.java
(original)
+++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/mapping/Configuration.java
Tue Oct  7 21:19:01 2008
@@ -21,7 +21,7 @@
   private boolean generatedKeysEnabled = false;
   private boolean useColumnLabel = true;
   private boolean cacheEnabled = true;
-
+  private Integer defaultStatementTimeout;
   private ExecutorType defaultExecutorType = ExecutorType.SIMPLE;
 
   private Properties variables = new Properties();
@@ -34,7 +34,6 @@
   private final Map<String, Cache> caches = new HashMap<String, Cache>();
   private final Map<String, ResultMap> resultMaps = new HashMap<String, ResultMap>();
   private final Map<String, ParameterMap> parameterMaps = new HashMap<String, ParameterMap>();
-  private Integer defaultStatementTimeout;
 
   public boolean isLazyLoadingEnabled() {
     return lazyLoadingEnabled;

Added: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/transaction/TransactionException.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/transaction/TransactionException.java?rev=702693&view=auto
==============================================================================
--- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/transaction/TransactionException.java
(added)
+++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/transaction/TransactionException.java
Tue Oct  7 21:19:01 2008
@@ -0,0 +1,21 @@
+package org.apache.ibatis.transaction;
+
+public class TransactionException extends RuntimeException {
+
+  public TransactionException() {
+    super();
+  }
+
+  public TransactionException(String message) {
+    super(message);
+  }
+
+  public TransactionException(String message, Throwable cause) {
+    super(message, cause);
+  }
+
+  public TransactionException(Throwable cause) {
+    super(cause);
+  }
+  
+}



Mime
View raw message