Package org.jboss.system.server

Examples of org.jboss.system.server.ServerConfig


/*     */
/* 128 */       this.log.debug("Processing classpath: " + unit.getName() + " codebase=" + codebase + " archives=" + archives);
/* 129 */       VirtualFile codebaseFile = unit.getRoot();
/* 130 */       if (!".".equals(codebase))
/*     */       {
/* 132 */         ServerConfig config = ServerConfigLocator.locate();
/* 133 */         URL codeBaseURL = new URL(config.getServerHomeURL(), codebase);
/* 134 */         codebaseFile = VFS.getVirtualFile(codeBaseURL, "");
/*     */       }
/*     */
/* 137 */       if (codebaseFile == null) {
/* 138 */         throw new DeploymentException("Cannot use classpath without a root: " + unit.getName());
View Full Code Here


/* 359 */         return;
/*     */       }
/*     */
/*     */     }
/*     */
/* 364 */     ServerConfig config = getConfig();
/*     */
/* 367 */     if (this.started) {
/* 368 */       throw new IllegalStateException("already started");
/*     */     }
/* 370 */     ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
/*     */     try
/*     */     {
/* 374 */       ClassLoader myCL = getClass().getClassLoader();
/* 375 */       Thread.currentThread().setContextClassLoader(myCL);
/*     */
/* 378 */       StopWatch watch = new StopWatch(true);
/*     */
/* 381 */       this.startDate = new Date();
/*     */
/* 384 */       this.shutdownHook = new ShutdownHook();
/* 385 */       this.shutdownHook.setDaemon(true);
/*     */       try
/*     */       {
/* 389 */         Runtime.getRuntime().addShutdownHook(this.shutdownHook);
/* 390 */         this.log.debug("Shutdown hook added " + this.shutdownHook);
/*     */       }
/*     */       catch (Exception e)
/*     */       {
/* 394 */         this.log.warn("Failed to add shutdown hook; ignoring", e);
/*     */       }
/*     */
/* 398 */       doStart(watch);
/*     */
/* 401 */       ClassLoader cl = Thread.currentThread().getContextClassLoader();
/*     */       try
/*     */       {
/* 405 */         for (Bootstrap bootstrap : this.bootstraps)
/*     */         {
/* 407 */           Thread.currentThread().setContextClassLoader(bootstrap.getClass().getClassLoader());
/* 408 */           bootstrap.start(this);
/* 409 */           this.startedBootstraps.add(0, bootstrap);
/*     */         }
/*     */       }
/*     */       finally
/*     */       {
/* 414 */         Thread.currentThread().setContextClassLoader(cl);
/*     */       }
/*     */
/* 417 */       if (config.isInstallLifeThread())
/*     */       {
/* 419 */         this.log.debug("Installing life thread " + this.lifeThread);
/* 420 */         this.lifeThread = new LifeThread();
/* 421 */         this.lifeThread.start();
/*     */       }
View Full Code Here

TOP

Related Classes of org.jboss.system.server.ServerConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.