Package org.jboss.system.server

Examples of org.jboss.system.server.ServerLoader


/* 139 */       File file = new File(homeDir);
/* 140 */       homeURL = file.toURL().toString();
/* 141 */       this.props.setProperty("jboss.home.url", homeURL);
/*     */     }
/*     */
/* 145 */     ServerLoader loader = new ServerLoader(this.props);
/*     */
/* 151 */     if (this.bootURL != null)
/*     */     {
/* 153 */       if (this.bootURL.getProtocol().equals("file"))
/*     */       {
/* 155 */         File dir = new File(this.bootURL.getFile());
/* 156 */         if (dir.exists())
/*     */         {
/* 159 */           loader.addURL(dir.toURL());
/*     */
/* 162 */           File[] jars = dir.listFiles(new JarFilter());
/*     */
/* 164 */           for (int j = 0; (jars != null) && (j < jars.length); j++)
/*     */           {
/* 166 */             loader.addURL(jars[j].getCanonicalFile().toURL());
/*     */           }
/*     */         }
/*     */       }
/*     */       else
/*     */       {
/* 172 */         loader.addURL(this.bootURL);
/*     */       }
/*     */
/*     */     }
/*     */
/* 177 */     for (int i = 0; i < this.bootLibraries.size(); i++)
/*     */     {
/* 179 */       loader.addLibrary((String)this.bootLibraries.get(i));
/*     */     }
/*     */
/* 183 */     loader.addEndorsedJars();
/*     */
/* 186 */     loader.addLibrary(this.concurrentLib);
/*     */
/* 189 */     for (int i = 0; i < this.extraLibraries.size(); i++)
/*     */     {
/* 191 */       loader.addLibrary((String)this.extraLibraries.get(i));
/*     */     }
/*     */
/* 195 */     for (int i = 0; i < this.extraClasspath.size(); i++)
/*     */     {
/* 197 */       loader.addURL((URL)this.extraClasspath.get(i));
/*     */     }
/*     */
/* 201 */     ClassLoader parentCL = Thread.currentThread().getContextClassLoader();
/* 202 */     this.server = loader.load(parentCL);
/*     */
/* 205 */     this.server.init(this.props);
/*     */
/* 208 */     this.server.start();
/*     */   }
View Full Code Here

TOP

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

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.