IBM®
Skip to main content
    United States change      Terms of use
 
 
Select a scope:    
     Home      Products      Services & industry solutions      Support & downloads      My account     
alphaWorks  >  Java technology  >  

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
OverviewRequirementsDownload FAQs Forum Reviews

Platform requirements

Operating systems: Any Java™-enabled platform

Software:

Installation instructions

  1. Install Tomcat Server, version 4.1.27.
  2. Copy the peri directory under TomcatHome to the webapps folder of the Tomcat installation.
  3. 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.

  4. 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.

  5. 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
    
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. 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.

  11. Wait for the SMS to search/copy the required JAR into the classpath. The Tomcat server will be restarted automatically.
  12. 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.

Download now Download now

Related technologies

For platform(s):
Java

For topics:
configuration, automation, administration


Related resources

developerWorks Article: Model for Self-Managing Java Serve

developerWorks Java zone

Java tutorials

Open source projects

Press Articles

 

    About IBM Privacy Contact