com.atomikos.icatch.ws.j2ee
Class ApplicationClasspathRecoveryListener
java.lang.Object
com.atomikos.icatch.ws.j2ee.ApplicationClasspathRecoveryListener
- All Implemented Interfaces:
- EventListener, javax.servlet.ServletContextListener
public abstract class ApplicationClasspathRecoveryListener
- extends Object
- implements javax.servlet.ServletContextListener
A context listener for recovery of application-specific participants. By adding
a listener to your J2EE web application you can avoid having to put your
custom participant classes in the core server classpath of your application
server.
A listener should be configured with the following context parameters:
com.atomikos.icatch.log_base_dir |
(Full) path to an existing folder where the log files for the
J2EE web application's participants should be put. If not specified then the
full path of the installed application's WEB-INF folder will be taken.
Please make sure that you use a unique log folder for each deployed
application! |
com.atomikos.icatch.log_base_name |
Base name of the log files generated and maintained for the J2EE web
application. If not specified then the default name 'participants' will be
taken. |
com.atomikos.icatch.checkpoint_interval |
The interval (in number of log writes) after which purging of old log
entries should happen. Defaults to 500. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG_DIR_PARAMETER_NAME
public static final String LOG_DIR_PARAMETER_NAME
- Name of the context parameter that indicates the location of the logging
folder where activities of this application are logged.
- See Also:
- Constant Field Values
LOG_FILE_PARAMETER_NAME
public static final String LOG_FILE_PARAMETER_NAME
- Name of the context parameter that indicates the base name of the log
files for this application.
- See Also:
- Constant Field Values
LOG_CHECKPOINT_PARAMETER_NAME
public static final String LOG_CHECKPOINT_PARAMETER_NAME
- Name of the context parameter that indicates the checkpoint interval for
purging old log entries. The interval is expressed as a number of log
writes after which purging happens.
- See Also:
- Constant Field Values
listenerRegistered
protected static boolean listenerRegistered
ApplicationClasspathRecoveryListener
public ApplicationClasspathRecoveryListener()
getLogDir
protected static String getLogDir(javax.servlet.ServletContext context)
getLogFile
protected static String getLogFile(javax.servlet.ServletContext context)
getCheckpointInterval
protected static long getCheckpointInterval(javax.servlet.ServletContext context)
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent context)
- Specified by:
contextDestroyed
in interface javax.servlet.ServletContextListener
- See Also:
ServletContextListener.contextDestroyed(javax.servlet.ServletContextEvent)
createApplicationClasspathResourceTSListener
protected abstract ApplicationClasspathResourceTSListener createApplicationClasspathResourceTSListener(String resourceName,
String logDir,
String fileName,
long interval)
createAndRegisterResourceIfNotRegisteredAlready
protected abstract void createAndRegisterResourceIfNotRegisteredAlready(String logDir,
String fileName,
long interval)
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent context)
- Specified by:
contextInitialized
in interface javax.servlet.ServletContextListener
- See Also:
ServletContextListener.contextInitialized(javax.servlet.ServletContextEvent)
Copyright © 2012. All Rights Reserved.