Java 类org.apache.catalina.startup.Catalina 实例源码

项目:tomee    文件:Container.java   
private static Server createServer(final String serverXml) {
    final Catalina catalina = new Catalina() {
        // skip few init we don't need *here*
        @Override
        protected void initDirs() {
            // no-op
        }

        @Override
        protected void initStreams() {
            // no-op
        }

        @Override
        protected void initNaming() {
            // no-op
        }
    };
    catalina.setConfigFile(serverXml);
    catalina.load();
    return catalina.getServer();
}
项目:embed-apache-tomcat    文件:TomcatRuntimeImpl.java   
/**
 * @param catalina
 */
TomcatRuntimeImpl(Catalina catalina) {
    this.catalina = catalina;
    this.status = TomcatStatus.UNKNOWN;

    catalina.getServer().addLifecycleListener(new LifecycleListener() {
        @Override
        public void lifecycleEvent(LifecycleEvent event) {
            String type = event.getType().toUpperCase();
            status = TomcatStatus.valueOf(type);

            if (Lifecycle.AFTER_START_EVENT.equals(event.getType()) || Lifecycle.AFTER_STOP_EVENT.equals(event.getType())) {
                semaphore.release();
            }
        }
    });
}
项目:dhus-core    文件:TomcatServer.java   
/**
 * Initialize Tomcat inner datasets.
 */
public void init () throws TomcatException
{
   tomcatpath = configurationManager.getTomcatConfiguration ().getPath ();
   final String extractDirectory = tomcatpath;

   File extractDirectoryFile = new File (extractDirectory);
   LOGGER.info("Starting tomcat in " + extractDirectoryFile.getPath());

   try
   {
      extract (extractDirectoryFile, extractDirectory);
      // create tomcat various paths
      new File (extractDirectory, "conf").mkdirs ();
      File cfg =
         new File (ClassLoader.getSystemResource ("server.xml").toURI ());
      Files.copy (cfg, new File (extractDirectory, "conf/server.xml"));
      new File (extractDirectory, "logs").mkdirs ();
      new File (extractDirectory, "webapps").mkdirs ();
      new File (extractDirectory, "work").mkdirs ();
      File tmpDir = new File (extractDirectory, "temp");
      tmpDir.mkdirs ();

      System.setProperty ("java.io.tmpdir", tmpDir.getAbsolutePath ());
      System.setProperty ("catalina.base",
         extractDirectoryFile.getAbsolutePath ());
      System.setProperty ("catalina.home",
         extractDirectoryFile.getAbsolutePath ());

      cat = new Catalina ();
   }
   catch (Exception e)
   {
      throw new TomcatException ("Cannot initalize Tomcat environment.", e);
   }

   Runtime.getRuntime ().addShutdownHook (new TomcatShutdownHook ());
}
项目:DataHubSystem    文件:TomcatServer.java   
/**
 * Initialize Tomcat inner datasets.
 */
public void init () throws TomcatException
{
   tomcatpath = configurationManager.getTomcatConfiguration ().getPath ();
   final String extractDirectory = tomcatpath;

   File extractDirectoryFile = new File (extractDirectory);
   LOGGER.info("Starting tomcat in " + extractDirectoryFile.getPath());

   try
   {
      extract (extractDirectoryFile, extractDirectory);
      // create tomcat various paths
      new File (extractDirectory, "conf").mkdirs ();
      File cfg =
         new File (ClassLoader.getSystemResource ("server.xml").toURI ());
      Files.copy (cfg, new File (extractDirectory, "conf/server.xml"));
      new File (extractDirectory, "logs").mkdirs ();
      new File (extractDirectory, "webapps").mkdirs ();
      new File (extractDirectory, "work").mkdirs ();
      File tmpDir = new File (extractDirectory, "temp");
      tmpDir.mkdirs ();

      System.setProperty ("java.io.tmpdir", tmpDir.getAbsolutePath ());
      System.setProperty ("catalina.base",
         extractDirectoryFile.getAbsolutePath ());
      System.setProperty ("catalina.home",
         extractDirectoryFile.getAbsolutePath ());

      cat = new Catalina ();
   }
   catch (Exception e)
   {
      throw new TomcatException ("Cannot initalize Tomcat environment.", e);
   }

   Runtime.getRuntime ().addShutdownHook (new TomcatShutdownHook ());
}
项目:tomcat7    文件:StandardServer.java   
/**
 * Return the outer Catalina startup/shutdown component if present.
 */
@Override
public Catalina getCatalina() {
    return catalina;
}
项目:tomcat7    文件:StandardServer.java   
/**
 * Set the outer Catalina startup/shutdown component if present.
 */
@Override
public void setCatalina(Catalina catalina) {
    this.catalina = catalina;
}
项目:apache-tomcat-7.0.73-with-comment    文件:StandardServer.java   
/**
 * Return the outer Catalina startup/shutdown component if present.
 */
@Override
public Catalina getCatalina() {
    return catalina;
}
项目:apache-tomcat-7.0.73-with-comment    文件:StandardServer.java   
/**
 * Set the outer Catalina startup/shutdown component if present.
 */
@Override
public void setCatalina(Catalina catalina) {
    this.catalina = catalina;
}
项目:lazycat    文件:StandardServer.java   
/**
 * Return the outer Catalina startup/shutdown component if present.
 */
@Override
public Catalina getCatalina() {
    return catalina;
}
项目:lazycat    文件:StandardServer.java   
/**
 * Set the outer Catalina startup/shutdown component if present.
 */
@Override
public void setCatalina(Catalina catalina) {
    this.catalina = catalina;
}
项目:class-guard    文件:StandardServer.java   
/**
 * Return the outer Catalina startup/shutdown component if present.
 */
@Override
public Catalina getCatalina() {
    return catalina;
}
项目:class-guard    文件:StandardServer.java   
/**
 * Set the outer Catalina startup/shutdown component if present.
 */
@Override
public void setCatalina(Catalina catalina) {
    this.catalina = catalina;
}
项目:apache-tomcat-7.0.57    文件:StandardServer.java   
/**
 * Return the outer Catalina startup/shutdown component if present.
 */
@Override
public Catalina getCatalina() {
    return catalina;
}
项目:apache-tomcat-7.0.57    文件:StandardServer.java   
/**
 * Set the outer Catalina startup/shutdown component if present.
 */
@Override
public void setCatalina(Catalina catalina) {
    this.catalina = catalina;
}
项目:apache-tomcat-7.0.57    文件:StandardServer.java   
/**
 * Return the outer Catalina startup/shutdown component if present.
 */
@Override
public Catalina getCatalina() {
    return catalina;
}
项目:apache-tomcat-7.0.57    文件:StandardServer.java   
/**
 * Set the outer Catalina startup/shutdown component if present.
 */
@Override
public void setCatalina(Catalina catalina) {
    this.catalina = catalina;
}
项目:WBSAirback    文件:StandardServer.java   
/**
 * Return the outer Catalina startup/shutdown component if present.
 */
@Override
public Catalina getCatalina() {
    return catalina;
}
项目:WBSAirback    文件:StandardServer.java   
/**
 * Set the outer Catalina startup/shutdown component if present.
 */
@Override
public void setCatalina(Catalina catalina) {
    this.catalina = catalina;
}
项目:embed-apache-tomcat    文件:SafeServerImpl.java   
@Override
public Catalina getCatalina() {
    return null;
}
项目:embed-apache-tomcat    文件:SafeServerImpl.java   
@Override
public void setCatalina(Catalina catalina) {
    throw new UnsupportedOperationException("Catalina can't be changed at runtime");
}
项目:tomcat7    文件:Server.java   
/**
 * Return the outer Catalina startup/shutdown component if present.
 */
public Catalina getCatalina();
项目:tomcat7    文件:Server.java   
/**
 * Set the outer Catalina startup/shutdown component if present.
 */
public void setCatalina(Catalina catalina);
项目:apache-tomcat-7.0.73-with-comment    文件:Server.java   
/**
 * Return the outer Catalina startup/shutdown component if present.
 */
public Catalina getCatalina();
项目:apache-tomcat-7.0.73-with-comment    文件:Server.java   
/**
 * Set the outer Catalina startup/shutdown component if present.
 */
public void setCatalina(Catalina catalina);
项目:lazycat    文件:Server.java   
/**
 * Return the outer Catalina startup/shutdown component if present.
 */
public Catalina getCatalina();
项目:lazycat    文件:Server.java   
/**
 * Set the outer Catalina startup/shutdown component if present.
 */
public void setCatalina(Catalina catalina);
项目:class-guard    文件:Server.java   
/**
 * Return the outer Catalina startup/shutdown component if present.
 */
public Catalina getCatalina();
项目:class-guard    文件:Server.java   
/**
 * Set the outer Catalina startup/shutdown component if present.
 */
public void setCatalina(Catalina catalina);
项目:apache-tomcat-7.0.57    文件:Server.java   
/**
 * Return the outer Catalina startup/shutdown component if present.
 */
public Catalina getCatalina();
项目:apache-tomcat-7.0.57    文件:Server.java   
/**
 * Set the outer Catalina startup/shutdown component if present.
 */
public void setCatalina(Catalina catalina);
项目:apache-tomcat-7.0.57    文件:Server.java   
/**
 * Return the outer Catalina startup/shutdown component if present.
 */
public Catalina getCatalina();
项目:apache-tomcat-7.0.57    文件:Server.java   
/**
 * Set the outer Catalina startup/shutdown component if present.
 */
public void setCatalina(Catalina catalina);
项目:WBSAirback    文件:Server.java   
/**
 * Return the outer Catalina startup/shutdown component if present.
 */
public Catalina getCatalina();
项目:WBSAirback    文件:Server.java   
/**
 * Set the outer Catalina startup/shutdown component if present.
 */
public void setCatalina(Catalina catalina);