openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fayw...@apache.org
Subject svn commit: r707214 - in /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc: kernel/JDBCStoreManager.java sql/DBDictionary.java sql/SybaseDictionary.java
Date Wed, 22 Oct 2008 22:12:38 GMT
Author: faywang
Date: Wed Oct 22 15:12:37 2008
New Revision: 707214

URL: http://svn.apache.org/viewvc?rev=707214&view=rev
Log:
OPENJPA-745: streamline the fix to be consistent with the fix
in OPENJPA-750

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SybaseDictionary.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java?rev=707214&r1=707213&r2=707214&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java
Wed Oct 22 15:12:37 2008
@@ -916,10 +916,8 @@
         try {
             // connect if the connection is currently null, or if
             // the connection has been closed out from under us
-            if (_conn == null){
+            if (_conn == null)
                 _conn = connectInternal();
-                _dict.initializeSettings(_conn);
-            }
             if (ref)
                 _conn.ref();
         } catch (SQLException se) {

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java?rev=707214&r1=707213&r2=707214&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
Wed Oct 22 15:12:37 2008
@@ -4562,8 +4562,4 @@
     				length));
     	return name;
     }
-    
-    public void initializeSettings(Connection conn) 
-        throws SQLException {
-    }
-}
+}
\ No newline at end of file

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SybaseDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SybaseDictionary.java?rev=707214&r1=707213&r2=707214&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SybaseDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SybaseDictionary.java
Wed Oct 22 15:12:37 2008
@@ -266,11 +266,7 @@
 
     public Connection decorate(Connection conn)
         throws SQLException {
-        return new SybaseConnection(super.decorate(conn));
-    }
-    
-    public void initializeSettings(Connection conn)
-        throws SQLException {
+        conn = super.decorate(conn);
         // In order for Sybase to raise the truncation exception when the 
         // string length is greater than the column length for Char, VarChar, 
         // Binary, VarBinary, the "set string_rtruncation on" must be executed. 
@@ -281,6 +277,7 @@
             stmnt.execute();
             stmnt.close();
         }
+        return new SybaseConnection(conn);
     }
 
     /**



Mime
View raw message