svn commit: r1786518 - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java openjpa/pom.xml

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

svn commit: r1786518 - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java openjpa/pom.xml

cschneider-2
Author: cschneider
Date: Sat Mar 11 18:20:01 2017
New Revision: 1786518

URL: http://svn.apache.org/viewvc?rev=1786518&view=rev
Log:
[OPENJPA-2690] Update OSGi Import-Package to support Oracle CLOB/BLOB

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
    openjpa/trunk/openjpa/pom.xml

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java?rev=1786518&r1=1786517&r2=1786518&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java Sat Mar 11 18:20:01 2017
@@ -241,8 +241,8 @@ public class OracleDictionary
             // all fine
         }
 
-        oracleClob_empty_lob_Method = getMethodByReflection("oracle.sql.CLOB", "empty_lob");
-        oracleBlob_empty_lob_Method = getMethodByReflection("oracle.sql.BLOB", "empty_lob");
+        oracleClob_empty_lob_Method = getMethodByReflection("oracle.sql.CLOB", "getEmptyCLOB");
+        oracleBlob_empty_lob_Method = getMethodByReflection("oracle.sql.BLOB", "getEmptyBLOB");
         oracleClob_isEmptyLob_Method = getMethodByReflection("oracle.sql.CLOB", "isEmptyLob");
 
     }
@@ -1267,6 +1267,10 @@ public class OracleDictionary
         throws SQLException {
         if (EMPTY_CLOB != null)
             return EMPTY_CLOB;
+
+        if (oracleClob_empty_lob_Method == null)
+            return null;      
+
         try {
             return EMPTY_CLOB = (Clob) oracleClob_empty_lob_Method.invoke(null, new Object[0]);
         } catch (Exception e) {
@@ -1278,6 +1282,10 @@ public class OracleDictionary
         throws SQLException {
         if (EMPTY_BLOB != null)
             return EMPTY_BLOB;
+
+ if (oracleBlob_empty_lob_Method == null)
+            return null;
+
         try {
             return EMPTY_BLOB = (Blob) oracleBlob_empty_lob_Method.invoke(null, new Object[0]);
         } catch (Exception e) {

Modified: openjpa/trunk/openjpa/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa/pom.xml?rev=1786518&r1=1786517&r2=1786518&view=diff
==============================================================================
--- openjpa/trunk/openjpa/pom.xml (original)
+++ openjpa/trunk/openjpa/pom.xml Sat Mar 11 18:20:01 2017
@@ -121,6 +121,9 @@
                         <Private-Package />
                         <Export-Package>org.apache.openjpa.*;version=${project.version}</Export-Package>
                         <Import-Package>
+ oracle.jdbc.pool;resolution:=optional,
+ oracle.jdbc;resolution:=optional,
+ oracle.sql;resolution:=optional,
                          com.ibm.*;resolution:=optional,
                          org.postgresql.*;resolution:=optional,
                          org.apache.tools.ant.*;resolution:=optional,


Loading...