mirror of
https://github.com/apache/openjpa.git
synced 2025-02-08 02:59:42 +00:00
OPENJPA-542
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@649221 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
31c47a6c04
commit
fe45f77f03
@ -20,6 +20,7 @@ package org.apache.openjpa.jdbc.sql;
|
|||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
import java.security.AccessController;
|
||||||
import java.sql.Blob;
|
import java.sql.Blob;
|
||||||
import java.sql.Clob;
|
import java.sql.Clob;
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
@ -45,9 +46,9 @@ import org.apache.openjpa.jdbc.schema.Index;
|
|||||||
import org.apache.openjpa.jdbc.schema.PrimaryKey;
|
import org.apache.openjpa.jdbc.schema.PrimaryKey;
|
||||||
import org.apache.openjpa.jdbc.schema.Sequence;
|
import org.apache.openjpa.jdbc.schema.Sequence;
|
||||||
import org.apache.openjpa.jdbc.schema.Table;
|
import org.apache.openjpa.jdbc.schema.Table;
|
||||||
import org.apache.openjpa.jdbc.sql.Select;
|
|
||||||
import org.apache.openjpa.lib.jdbc.DelegatingDatabaseMetaData;
|
import org.apache.openjpa.lib.jdbc.DelegatingDatabaseMetaData;
|
||||||
import org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement;
|
import org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement;
|
||||||
|
import org.apache.openjpa.lib.util.J2DoPrivHelper;
|
||||||
import org.apache.openjpa.lib.util.Localizer;
|
import org.apache.openjpa.lib.util.Localizer;
|
||||||
import org.apache.openjpa.util.StoreException;
|
import org.apache.openjpa.util.StoreException;
|
||||||
|
|
||||||
@ -1002,7 +1003,8 @@ public class OracleDictionary
|
|||||||
return EMPTY_CLOB;
|
return EMPTY_CLOB;
|
||||||
try {
|
try {
|
||||||
return EMPTY_CLOB = (Clob) Class.forName("oracle.sql.CLOB",true,
|
return EMPTY_CLOB = (Clob) Class.forName("oracle.sql.CLOB",true,
|
||||||
Thread.currentThread().getContextClassLoader()).
|
AccessController.doPrivileged(J2DoPrivHelper
|
||||||
|
.getContextClassLoaderAction())).
|
||||||
getMethod("empty_lob", new Class[0]).
|
getMethod("empty_lob", new Class[0]).
|
||||||
invoke(null, new Object[0]);
|
invoke(null, new Object[0]);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@ -1016,7 +1018,8 @@ public class OracleDictionary
|
|||||||
return EMPTY_BLOB;
|
return EMPTY_BLOB;
|
||||||
try {
|
try {
|
||||||
return EMPTY_BLOB = (Blob) Class.forName("oracle.sql.BLOB",true,
|
return EMPTY_BLOB = (Blob) Class.forName("oracle.sql.BLOB",true,
|
||||||
Thread.currentThread().getContextClassLoader()).
|
AccessController.doPrivileged(J2DoPrivHelper
|
||||||
|
.getContextClassLoaderAction())).
|
||||||
getMethod("empty_lob", new Class[0]).
|
getMethod("empty_lob", new Class[0]).
|
||||||
invoke(null, new Object[0]);
|
invoke(null, new Object[0]);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -781,9 +781,9 @@ public abstract class J2DoPrivHelper {
|
|||||||
*
|
*
|
||||||
* @return ClassLoader
|
* @return ClassLoader
|
||||||
*/
|
*/
|
||||||
public static final PrivilegedAction getContextClassLoaderAction() {
|
public static final PrivilegedAction<ClassLoader> getContextClassLoaderAction() {
|
||||||
return new PrivilegedAction() {
|
return new PrivilegedAction<ClassLoader>() {
|
||||||
public Object run() {
|
public ClassLoader run() {
|
||||||
return Thread.currentThread().getContextClassLoader();
|
return Thread.currentThread().getContextClassLoader();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user