|  |
Model for Self-Managing Java Servers
An autonomic computing model of a non-stopping, self-managing, Java-based server with self-configuration and self-healing.
Date Posted: December 15, 2003
|
|
 |
 |
|
Platform requirements
Operating systems: Any Java™-enabled platform
Software:
Installation instructions
- Install Tomcat Server, version 4.1.27.
- Copy the peri directory under TomcatHome to the webapps folder of the Tomcat installation.
- Add the following lines in the server.xml under the conf directory of the Tomcat installation in order to deploy the SMS demo Web application:
<Context path="/peri" docBase="peri" debug="4" reloadable="true" crossContext="true">
<Logger directory="peri" className="org.apache.catalina.logger.FileLogger" verbosity="4"
prefix="localhost_peri_log." suffix=".txt" timestamp="true"/>
</Context>
|
The above lines can be added just before the <Context path="/examples"... > line of server.xml.
- Add following line in the startup.bat and shutdown.bat files under the bin directory of the Tomcat installation for CATALINA_HOME variable (edit according to your Tomcat installation directory): Example: set CATALINA_HOME=C:\tomcat
This can be added as the first line in both the scripts.
- Add following line in the catalina.bat file under the bin directory of Tomcat home in order to provide SMS_HOME value: Example: set JAVA_OPTS=-DSMS_HOME=C:\SMSHome\config
The above line can be added immediately after the following lines. Example:
goto setArgs
:doneSetArgs
set JAVA_OPTS=-DSMS_HOME=C:\SMSHome\config
|
- Edit the runSMS.bat file under the bin directory of SMSHome in order to set your SMS_HOME (the place where you placed the SMSHome folder -- C:\SMSHome) and CATALINA_HOME (Tomcat installation directory) variables.
- Set the following properties in the smserver.properties file under the SMSHome\config directory:
- START_FILE to point to the start script of TomcatServer
- STOP_FILE to point to the stop script of TomcatServer
- LOG_FILE to point to the SMSDemo.log file under the bin directory of TomcatServer.
- Edit the classnotfound.healer.policy file under SMSHome\config\policies directory for SEARCH_LOCATION and COPY_LOCATION.
- SEARCH_LOCATION: Where to start the search for the JAR file containing the missing class.
- COPY_LOCATION: Copy location of the JAR file under server (tomcat) environment, from where it picks up automatically for CLASSPATH entry. For Tomcat it is <tomcat_home>\common\lib.
- Start the runSMS.bat file under <SMS_Home>. Before invoking runSMS.bat, make sure that tobeloaded.jar is not present in the <tomcat_home>\common\lib location. If this JAR is present, ClassNotFoundException CANNOT be created.
- Once the Tomcat server is started (runSMS.bat internally starts up Tomcat also), access the following URL through your browser: http://localhost:8080/peri/periServlet
You should get the ClassNotFound message on the browser.
- Wait for the SMS to search/copy the required JAR into the classpath. The Tomcat server will be restarted automatically.
- Now try the same URL again. Since the class is already loaded into classpath, you will not get the class not found message again.
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.
developerWorks is a trademark of IBM Corporation in the United States, other countries, or both.
Other company, product, or service names may be trademarks or service marks of others.
|
|
 |
|
| |
|