/** * Return the method for the WebLogic JDBC connection wrapper vendorConnection. */ protected Method getVendorConnectionMethod() { if ((this.vendorConnectionMethod == null) && (!getWebLogicConnectionClass().equals(void.class))) { try { this.vendorConnectionMethod = PrivilegedAccessHelper.getDeclaredMethod(getWebLogicConnectionClass(), "getVendorConnection", new Class[0]); } catch (NoSuchMethodException exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, exception); } } return this.vendorConnectionMethod; }
/** * Return the method for the WebLogic connection clearStatementCache method. */ protected Method getClearStatementCacheMethod() { if ((this.clearStatementCacheMethod == null) && (!getWebLogicConnectionClass().equals(void.class))) { try { this.clearStatementCacheMethod = PrivilegedAccessHelper.getDeclaredMethod(getWebLogicConnectionClass(), "clearStatementCache", new Class[0]); } catch (NoSuchMethodException exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, SessionLog.SERVER, exception); } } return this.clearStatementCacheMethod; }
/** * Return the method for the WebLogic connection clearStatementCache method. */ protected Method getClearStatementCacheMethod() { if ((this.clearStatementCacheMethod == null) && (!getWebLogicConnectionClass().equals(void.class))) { try { this.clearStatementCacheMethod = PrivilegedAccessHelper.getDeclaredMethod(getWebLogicConnectionClass(), "clearStatementCache", new Class[0]); } catch (NoSuchMethodException exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, SessionLog.SERVER, exception); } } return this.clearStatementCacheMethod; }
/** * Return the method for the WebLogic connection clearStatementCache method. */ protected Method getClearStatementCacheMethod() { if ((this.clearStatementCacheMethod == null) && (!getWebLogicConnectionClass().equals(void.class))) { try { this.clearStatementCacheMethod = PrivilegedAccessHelper.getDeclaredMethod(getWebLogicConnectionClass(), "clearStatementCache", new Class[0]); } catch (NoSuchMethodException exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, exception); } } return this.clearStatementCacheMethod; }
/** * Return the method for the WebLogic JDBC connection wrapper vendorConnection. */ protected Method getVendorConnectionMethod() { if ((this.vendorConnectionMethod == null) && (!getWebLogicConnectionClass().equals(void.class))) { try { this.vendorConnectionMethod = PrivilegedAccessHelper.getDeclaredMethod(getWebLogicConnectionClass(), "getVendorConnection", new Class[0]); } catch (NoSuchMethodException exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, SessionLog.SERVER, exception); } } return this.vendorConnectionMethod; }
/** * Return the method for the WebLogic JDBC connection wrapper vendorConnection. */ protected Method getVendorConnectionMethod() { if ((this.vendorConnectionMethod == null) && (!getWebLogicConnectionClass().equals(void.class))) { try { this.vendorConnectionMethod = PrivilegedAccessHelper.getDeclaredMethod(getWebLogicConnectionClass(), "getVendorConnection", new Class[0]); } catch (NoSuchMethodException exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, SessionLog.SERVER, exception); } } return this.vendorConnectionMethod; }
/** * Unwraps the WebSphere JDBC connection wrapping using the WebLogic API reflectively. */ @Override public Connection unwrapConnection(Connection connection) { if (getWebsphereConnectionClass().isInstance(connection) && getVendorConnectionMethod() != null) { try { return (Connection) PrivilegedAccessHelper.invokeMethod(getVendorConnectionMethod(), null, new Object[]{connection}); } catch (IllegalAccessException exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, exception); } catch (InvocationTargetException exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, exception); } } return super.unwrapConnection(connection); }
/** * Unwraps the WebLogic JDBC connection wrapping using the WebLogic API reflectively. */ @Override public Connection unwrapConnection(Connection connection) { if (getWebLogicConnectionClass().isInstance(connection) && getVendorConnectionMethod() != null) { try { return (Connection) PrivilegedAccessHelper.invokeMethod(getVendorConnectionMethod(), connection); } catch (IllegalAccessException exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, SessionLog.SERVER, exception); } catch (InvocationTargetException exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, SessionLog.SERVER, exception); } } return super.unwrapConnection(connection); }
/** * Unwraps the WebLogic JDBC connection wrapping using the WebLogic API reflectively. */ @Override public Connection unwrapConnection(Connection connection) { if (getWebLogicConnectionClass().isInstance(connection) && getVendorConnectionMethod() != null) { try { return (Connection) PrivilegedAccessHelper.invokeMethod(getVendorConnectionMethod(), connection); } catch (IllegalAccessException exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, exception); } catch (InvocationTargetException exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, exception); } } return super.unwrapConnection(connection); }
/** * INTERNAL: Set the WLS version number through reflection. */ public void initializeServerNameAndVersion() { try { Class clazz = PrivilegedAccessHelper.getClassForName("weblogic.version"); Method method = PrivilegedAccessHelper.getMethod(clazz, "getBuildVersion", null, false); this.serverNameAndVersion = (String) PrivilegedAccessHelper.invokeMethod(method, null, null); } catch (Exception exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, exception); } }
/** * Return the class (interface) for the WebSphere JDBC connection wrapper. */ protected Class getWebsphereUtilClass() { if (this.websphereUtilClass == null) { try { this.websphereUtilClass = (Class) getDatabaseSession().getPlatform().convertObject("com.ibm.ws.rsadapter.jdbc.WSJdbcUtil", Class.class); } catch (Throwable exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, SessionLog.SERVER, exception); this.websphereUtilClass = void.class; } } return this.websphereUtilClass; }
/** * Return the class (interface) for the WebLogic JDBC connection wrapper. */ protected Class getWebLogicConnectionClass() { if (this.weblogicConnectionClass == null) { try { this.weblogicConnectionClass = (Class) getDatabaseSession().getPlatform().convertObject("weblogic.jdbc.extensions.WLConnection", Class.class); } catch (Throwable exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, SessionLog.SERVER, exception); this.weblogicConnectionClass = void.class; } } return this.weblogicConnectionClass; }
/** * Return the class (interface) for the WebSphere JDBC connection wrapper. */ protected Class getWebsphereConnectionClass() { if (this.websphereConnectionClass == null) { try { this.websphereConnectionClass = (Class) getDatabaseSession().getPlatform().convertObject("com.ibm.ws.rsadapter.jdbc.WSJdbcConnection", Class.class); } catch (Throwable exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, exception); this.websphereConnectionClass = void.class; } } return this.websphereConnectionClass; }
/** * Return the class (interface) for the WebLogic JDBC connection wrapper. */ protected Class getWebLogicConnectionClass() { if (this.weblogicConnectionClass == null) { try { this.weblogicConnectionClass = (Class) getDatabaseSession().getPlatform().convertObject("weblogic.jdbc.extensions.WLConnection", Class.class); } catch (Throwable exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, SessionLog.SERVER, exception); this.weblogicConnectionClass = void.class; } } return this.weblogicConnectionClass; }
/** * Return the class (interface) for the WebSphere JDBC connection wrapper. */ protected Class getWebsphereUtilClass() { if (this.websphereUtilClass == null) { try { this.websphereUtilClass = (Class) getDatabaseSession().getPlatform().convertObject("com.ibm.ws.rsadapter.jdbc.WSJdbcUtil", Class.class); } catch (Throwable exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, exception); this.websphereUtilClass = void.class; } } return this.websphereUtilClass; }
/** * Return the class (interface) for the WebSphere JDBC connection wrapper. */ protected Class getWebsphereConnectionClass() { if (this.websphereConnectionClass == null) { try { this.websphereConnectionClass = (Class) getDatabaseSession().getPlatform().convertObject("com.ibm.ws.rsadapter.jdbc.WSJdbcConnection", Class.class); } catch (Throwable exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, SessionLog.SERVER, exception); this.websphereConnectionClass = void.class; } } return this.websphereConnectionClass; }
/** * Return the class (interface) for the WebSphere JDBC connection wrapper. */ protected Class getWebsphereUtilClass() { if (this.websphereUtilClass == null) { try { this.websphereUtilClass = (Class) getDatabaseSession().getPlatform().convertObject("com.ibm.ws.rsadapter.jdbc.WSJdbcUtil", Class.class); } catch (Throwable exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, SessionLog.SERVER, exception); this.websphereUtilClass = void.class; } } return this.websphereUtilClass; }
/** * Return the class (interface) for the WebSphere JDBC connection wrapper. */ protected Class getWebsphereConnectionClass() { if (this.websphereConnectionClass == null) { try { this.websphereConnectionClass = (Class) getDatabaseSession().getPlatform().convertObject("com.ibm.ws.rsadapter.jdbc.WSJdbcConnection", Class.class); } catch (Throwable exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, SessionLog.SERVER, exception); this.websphereConnectionClass = void.class; } } return this.websphereConnectionClass; }
/** * INTERNAL: Set the WLS version number through reflection. */ public void initializeServerNameAndVersion() { try { Class clazz = PrivilegedAccessHelper.getClassForName("weblogic.version"); Method method = PrivilegedAccessHelper.getMethod(clazz, "getReleaseBuildVersion", null, false); this.serverNameAndVersion = (String) PrivilegedAccessHelper.invokeMethod(method, null, null); this.shouldClearStatementCache = Helper.compareVersions(this.serverNameAndVersion, "10.3.4") < 0; } catch (Exception exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, SessionLog.SERVER, exception); } }
/** * INTERNAL: Set the WLS version number through reflection. */ public void initializeServerNameAndVersion() { try { Class clazz = PrivilegedAccessHelper.getClassForName("weblogic.version"); Method method = PrivilegedAccessHelper.getMethod(clazz, "getReleaseBuildVersion", null, false); this.serverNameAndVersion = (String) PrivilegedAccessHelper.invokeMethod(method, null, null); this.shouldClearStatementCache = Helper.compareVersions(this.serverNameAndVersion, "10.3.4") < 0; } catch (Exception exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, SessionLog.SERVER, exception); } }