/** * Stop this component and implement the requirements * of {@link org.apache.catalina.util.LifecycleBase#stopInternal()}. * * @exception LifecycleException if this component detects a fatal error * that prevents this component from being used */ @Override protected synchronized void stopInternal() throws LifecycleException { setState(LifecycleState.STOPPING); close() ; }
/** * Start this component and implement the requirements * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}. * * @exception LifecycleException if this component detects a fatal error * that prevents this component from being used */ @Override protected synchronized void startInternal() throws LifecycleException { try { open() ; } catch (SQLException e) { throw new LifecycleException(e); } setState(LifecycleState.STARTING); }
@Override public void log(Request request, Response response, long time) { if (!getState().isAvailable()) { return; while (numberOfTries>0) { try { open(); ps.setTimestamp(3, new Timestamp(getCurrentTimeMillis())); ps.setString(4, query); ps.setInt(5, status); close();
final String EMPTY = "" ; getNext().invoke(request, response); while (numberOfTries>0) { try { open(); ps.setTimestamp(3, new Timestamp(getCurrentTimeMillis())); ps.setString(4, query); ps.setInt(5, status); close();
/** * This method is invoked by Tomcat on each query. * * @param request The Request object. * @param response The Response object. * * @exception IOException Should not be thrown. * @exception ServletException Database SQLException is wrapped * in a ServletException. */ @Override public void invoke(Request request, Response response) throws IOException, ServletException { getNext().invoke(request, response); }
/** * Invoked by tomcat on shutdown. The database connection is closed here. * * @exception LifecycleException Can be thrown on lifecycle * inconsistencies or on database errors (as a wrapped SQLException). */ public void stop() throws LifecycleException { if (!started) throw new LifecycleException (MESSAGES.valveNotStarted()); lifecycle.fireLifecycleEvent(STOP_EVENT, null); started = false; close() ; }
/** * Invoked by Tomcat on startup. The database connection is set here. * * @exception LifecycleException Can be thrown on lifecycle * inconsistencies or on database errors (as a wrapped SQLException). */ public void start() throws LifecycleException { if (started) throw new LifecycleException (sm.getString("accessLogValve.alreadyStarted")); lifecycle.fireLifecycleEvent(START_EVENT, null); started = true; try { open() ; } catch (SQLException e) { throw new LifecycleException(e); } }
ps.setString(1, remoteHost); ps.setString(2, user); ps.setTimestamp(3, new Timestamp(getCurrentTimeMillis())); ps.setString(4, query); ps.setInt(5, status);
@Override public void log(Request request, Response response, long time) { if (!getState().isAvailable()) { return; while (numberOfTries>0) { try { open(); ps.setTimestamp(3, new Timestamp(getCurrentTimeMillis())); ps.setString(4, query); ps.setInt(5, status); close();
final String EMPTY = "" ; getNext().invoke(request, response); while (numberOfTries>0) { try { open(); ps.setTimestamp(3, new Timestamp(getCurrentTimeMillis())); ps.setString(4, query); ps.setInt(5, status); close();
/** * This method is invoked by Tomcat on each query. * * @param request The Request object. * @param response The Response object. * * @exception IOException Should not be thrown. * @exception ServletException Database SQLException is wrapped * in a ServletException. */ @Override public void invoke(Request request, Response response) throws IOException, ServletException { getNext().invoke(request, response); }
/** * Invoked by tomcat on shutdown. The database connection is closed here. * * @exception LifecycleException Can be thrown on lifecycle * inconsistencies or on database errors (as a wrapped SQLException). */ public void stop() throws LifecycleException { if (!started) throw new LifecycleException (sm.getString("accessLogValve.notStarted")); lifecycle.fireLifecycleEvent(STOP_EVENT, null); started = false; close() ; }
/** * Invoked by Tomcat on startup. The database connection is set here. * * @exception LifecycleException Can be thrown on lifecycle * inconsistencies or on database errors (as a wrapped SQLException). */ public void start() throws LifecycleException { if (started) throw new LifecycleException (sm.getString("accessLogValve.alreadyStarted")); lifecycle.fireLifecycleEvent(START_EVENT, null); started = true; try { open() ; } catch (SQLException e) { throw new LifecycleException(e); } }
@Override public void log(Request request, Response response, long time) { if (!getState().isAvailable()) { return; while (numberOfTries>0) { try { open(); ps.setTimestamp(3, new Timestamp(getCurrentTimeMillis())); ps.setString(4, query); ps.setInt(5, status); close();
throws IOException, ServletException { getNext().invoke(request, response); while (numberOfTries>0) { try { open(); ps.setTimestamp(3, new Timestamp(getCurrentTimeMillis())); ps.setString(4, query); ps.setInt(5, status); close();
/** * Stop this component and implement the requirements * of {@link org.apache.catalina.util.LifecycleBase#stopInternal()}. * * @exception LifecycleException if this component detects a fatal error * that prevents this component from being used */ @Override protected synchronized void stopInternal() throws LifecycleException { setState(LifecycleState.STOPPING); close() ; }
/** * Start this component and implement the requirements * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}. * * @exception LifecycleException if this component detects a fatal error * that prevents this component from being used */ @Override protected synchronized void startInternal() throws LifecycleException { try { open() ; } catch (SQLException e) { throw new LifecycleException(e); } setState(LifecycleState.STARTING); }
/** * This method is invoked by Tomcat on each query. * * @param request The Request object. * @param response The Response object. * * @exception IOException Should not be thrown. * @exception ServletException Database SQLException is wrapped * in a ServletException. */ @Override public void invoke(Request request, Response response) throws IOException, ServletException { getNext().invoke(request, response); }
/** * Invoked by tomcat on shutdown. The database connection is closed here. * * @exception LifecycleException Can be thrown on lifecycle * inconsistencies or on database errors (as a wrapped SQLException). */ public void stop() throws LifecycleException { if (!started) throw new LifecycleException (sm.getString("accessLogValve.notStarted")); lifecycle.fireLifecycleEvent(STOP_EVENT, null); started = false; close() ; }
/** * Invoked by Tomcat on startup. The database connection is set here. * * @exception LifecycleException Can be thrown on lifecycle * inconsistencies or on database errors (as a wrapped SQLException). */ public void start() throws LifecycleException { if (started) throw new LifecycleException (MESSAGES.valveAlreadyStarted()); lifecycle.fireLifecycleEvent(START_EVENT, null); started = true; try { open() ; } catch (SQLException e) { throw new LifecycleException(e); } }