/** * Connect to the database. * Exceptions are caught and re-thrown as EclipseLink exceptions. */ protected void connectInternal(Login login, AbstractSession session) throws DatabaseException { try{ this.datasourceConnection = login.connectToDatasource(this, session); this.isConnected = true; if(this.customizer != null) { customizer.customize(); } }catch (DatabaseException ex){ //Set the accessor to ensure the retry code has an opportunity to retry. ex.setAccessor(this); throw ex; } }
/** * Connect to the database. * Exceptions are caught and re-thrown as EclipseLink exceptions. */ protected void connectInternal(Login login, AbstractSession session) throws DatabaseException { try{ this.datasourceConnection = login.connectToDatasource(this, session); this.isConnected = true; if(this.customizer != null) { customizer.customize(); } }catch (DatabaseException ex){ //Set the accessor to ensure the retry code has an oportunity to retry. ex.setAccessor(this); throw ex; } }
/** * Connect to the database. * Exceptions are caught and re-thrown as EclipseLink exceptions. */ protected void connectInternal(Login login, AbstractSession session) throws DatabaseException { try{ this.datasourceConnection = login.connectToDatasource(this, session); this.isConnected = true; if(this.customizer != null) { customizer.customize(); } }catch (DatabaseException ex){ //Set the accessor to ensure the retry code has an opportunity to retry. ex.setAccessor(this); throw ex; } }
Connection conn = null; try { conn = (Connection) getReadLogin().connectToDatasource(null, this); DatabaseMetaData dmd = conn.getMetaData(); vendorNameAndVersion = dmd.getDatabaseProductName() + dmd.getDatabaseMajorVersion() + dmd.getDatabaseProductVersion();
conn = (Connection) getReadLogin().connectToDatasource(null, this);
Connection conn = null; try{ conn = (Connection)getReadLogin().connectToDatasource(null,this);