1 20 package org.apache.cactus.integration.ant.container.tomcat; 21 22 import java.io.IOException ; 23 24 import org.apache.tools.ant.BuildException; 25 26 31 public class Tomcat5xContainer extends AbstractCatalinaContainer 32 { 33 34 36 39 public final void init() 40 { 41 super.init(); 42 43 if (!getVersion().startsWith("5")) 44 { 45 throw new BuildException( 46 "This element doesn't support version " + getVersion() 47 + " of Tomcat"); 48 } 49 } 50 51 54 public final void startUp() 55 { 56 try 57 { 58 prepare("tomcat5x", "cactus/tomcat5x"); 59 invokeBootstrap("start"); 60 } 61 catch (IOException ioe) 62 { 63 getLog().error("Failed to startup the container", ioe); 64 throw new BuildException(ioe); 65 } 66 } 67 68 71 public final void shutDown() 72 { 73 invokeBootstrap("stop"); 74 } 75 76 } 77 | Popular Tags |