/** * This method is called by reestablishConnection. * Nothing needs to be done in case customize is not active (customization hasn't been applied yet). * to repair existing customizer after connection became invalid. * However if connection has been customized then * if connection is still there and deemed to be valid - clear customization. * Otherwise (or if clear fails) remove customizer and set its prevCustomizer as a new customizer, * then re-create customizer using the same session as the original one. */ protected void reestablishCustomizer() { if(customizer != null && customizer.isActive()) { if(isValid()) { // the method eats SQLException in case of a failure. customizer.clear(); } else { // It's an invalid connection - don't bother trying to clear customization. AbstractSession customizerSession = (AbstractSession)customizer.getSession(); // need this so that the new customizer has the same prevCustomizer as the old one. customizer = customizer.getPrevCustomizer(); // customizer recreated - it's the same as the original one, but not active. createCustomizer(customizerSession); } } }
/** * This method is called by reestablishConnection. * Nothing needs to be done in case customize is not active (customization hasn't been applied yet). * to repair existing customizer after connection became invalid. * However if connection has been customized then * if connection is still there and deemed to be valid - clear customization. * Otherwise (or if clear fails) remove customizer and set its prevCustomizer as a new customizer, * then re-create customizer using the same session as the original one. */ protected void reestablishCustomizer() { if(customizer != null && customizer.isActive()) { if(isValid()) { // the method eats SQLException in case of a failure. customizer.clear(); } else { // It's an invalid connection - don't bother trying to clear customization. AbstractSession customizerSession = (AbstractSession)customizer.getSession(); // need this so that the new customizer has the same prevCustomizer as the old one. customizer = customizer.getPrevCustomizer(); // customizer recreated - it's the same as the original one, but not active. createCustomizer(customizerSession); } } }
/** * This method is called by reestablishConnection. * Nothing needs to be done in case customize is not active (customization hasn't been applied yet). * to repair existing customizer after connection became invalid. * However if connection has been customized then * if connection is still there and deemed to be valid - clear customization. * Otherwise (or if clear fails) remove customizer and set its prevCustomizer as a new customizer, * then re-create customizer using the same session as the original one. */ protected void reestablishCustomizer() { if(customizer != null && customizer.isActive()) { if(isValid()) { // the method eats SQLException in case of a failure. customizer.clear(); } else { // It's an invalid connection - don't bother trying to clear customization. AbstractSession customizerSession = (AbstractSession)customizer.getSession(); // need this so that the new customizer has the same prevCustomizer as the old one. customizer = customizer.getPrevCustomizer(); // customizer recreated - it's the same as the original one, but not active. createCustomizer(customizerSession); } } } }
createCustomizer(session); try { connectInternal(login, session);
createCustomizer(session); try { connectInternal(login, session);
createCustomizer(session); try { connectInternal(login, session);