net.sourceforge.addam.ddlrun
Class ServletContainerUpgrader
java.lang.Object
net.sourceforge.addam.ddlrun.ServletContainerUpgrader
- All Implemented Interfaces:
- EventListener, ServletContextListener, RunLogger
public class ServletContainerUpgrader
- extends Object
- implements ServletContextListener, RunLogger
- Since:
- Mar 25, 2005
- Author:
- TIM3
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sCtx
ServletContext sCtx
errorLog
FileWriter errorLog
scriptsExecuted
private int scriptsExecuted
dbversion
protected String dbversion
ServletContainerUpgrader
public ServletContainerUpgrader()
contextInitialized
public void contextInitialized(ServletContextEvent event)
- kicks off an UpgradeRunner - requires a configured DataSource and a
configured upgrade folder and upgrade script
- Specified by:
contextInitialized
in interface ServletContextListener
logRunScript
public void logRunScript(String script,
long time)
throws Exception
- Specified by:
logRunScript
in interface RunLogger
- Throws:
Exception
logRunComplete
public void logRunComplete(String group,
long time)
throws Exception
- Specified by:
logRunComplete
in interface RunLogger
- Throws:
Exception
logRunFailure
public void logRunFailure(String group,
String script,
Exception e)
throws Exception
- Specified by:
logRunFailure
in interface RunLogger
- Throws:
Exception
log
private void log(ServletContext sCtx,
String message,
FileWriter errorLog,
Exception e)
throws IOException
- Throws:
IOException
getErrorLogFileWriter
private FileWriter getErrorLogFileWriter(ServletContext sCtx)
- Parameters:
sCtx
-
- Returns:
- To Do:
- defer creation of file until actual writing error
contextDestroyed
public void contextDestroyed(ServletContextEvent event)
- does nothing; required for ServletContextListener implementation
- Specified by:
contextDestroyed
in interface ServletContextListener
Copyright © 2005-2006 ADDAM Project Team. All Rights Reserved.