/** * INTERNAL: * Instantiate the Driver. */ protected void instantiateDriver() throws DatabaseException { try { if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){ try{ this.driver = (Driver)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(this.driverClass)); }catch (PrivilegedActionException ex){ if (ex.getCause() instanceof IllegalAccessException){ throw (IllegalAccessException)ex.getCause(); }else if (ex.getCause() instanceof InstantiationException){ throw (InstantiationException)ex.getCause(); } throw (RuntimeException)ex.getCause(); } }else{ this.driver = (Driver)PrivilegedAccessHelper.newInstanceFromClass(this.driverClass); } } catch (InstantiationException ie) { this.clearDriverClassAndDriver(); throw DatabaseException.configurationErrorNewInstanceInstantiationException(ie, driverClass); } catch (IllegalAccessException iae) { this.clearDriverClassAndDriver(); throw DatabaseException.configurationErrorNewInstanceIllegalAccessException(iae, driverClass); } }
/** * INTERNAL: * Instantiate the Driver. */ protected void instantiateDriver() throws DatabaseException { try { if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){ try{ this.driver = (Driver)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(this.driverClass)); }catch (PrivilegedActionException ex){ if (ex.getCause() instanceof IllegalAccessException){ throw (IllegalAccessException)ex.getCause(); }else if (ex.getCause() instanceof InstantiationException){ throw (InstantiationException)ex.getCause(); } throw (RuntimeException)ex.getCause(); } }else{ this.driver = (Driver)PrivilegedAccessHelper.newInstanceFromClass(this.driverClass); } } catch (InstantiationException ie) { this.clearDriverClassAndDriver(); throw DatabaseException.configurationErrorNewInstanceInstantiationException(ie, driverClass); } catch (IllegalAccessException iae) { this.clearDriverClassAndDriver(); throw DatabaseException.configurationErrorNewInstanceIllegalAccessException(iae, driverClass); } }
/** * INTERNAL: * Instantiate the Driver. * @return void */ protected void instantiateDriver() throws DatabaseException { try { if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){ try{ this.driver = (Driver)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(this.driverClass)); }catch (PrivilegedActionException ex){ if (ex.getCause() instanceof IllegalAccessException){ throw (IllegalAccessException)ex.getCause(); }else if (ex.getCause() instanceof InstantiationException){ throw (InstantiationException)ex.getCause(); } throw (RuntimeException)ex.getCause(); } }else{ this.driver = (Driver)PrivilegedAccessHelper.newInstanceFromClass(this.driverClass); } } catch (InstantiationException ie) { this.clearDriverClassAndDriver(); throw DatabaseException.configurationErrorNewInstanceInstantiationException(ie, driverClass); } catch (IllegalAccessException iae) { this.clearDriverClassAndDriver(); throw DatabaseException.configurationErrorNewInstanceIllegalAccessException(iae, driverClass); } }