1 4 package com.tc.test.server.appserver.weblogic8x; 5 6 import com.tc.test.TestConfigObject; 7 import com.tc.test.server.appserver.AppServer; 8 import com.tc.test.server.appserver.AppServerInstallation; 9 import com.tc.test.server.appserver.AppServerParameters; 10 import com.tc.test.server.appserver.NewAppServerFactory; 11 import com.tc.test.server.appserver.war.DescriptorXml; 12 import com.tc.test.server.appserver.war.DtdWar; 13 import com.tc.test.server.appserver.war.War; 14 import com.tc.test.server.tcconfig.StandardTerracottaAppServerConfig; 15 16 import java.io.File ; 17 import java.net.URL ; 18 import java.util.Properties ; 19 20 24 public final class Weblogic8xAppServerFactory extends NewAppServerFactory { 25 26 public Weblogic8xAppServerFactory(ProtectedKey protectedKey, TestConfigObject config) { 28 super(protectedKey, config); 29 } 30 31 public AppServerParameters createParameters(String instanceName, Properties props) { 32 return new Weblogic8xAppServerParameters(instanceName, props, config.sessionClasspath()); 33 } 34 35 public AppServer createAppServer(AppServerInstallation installation) { 36 return new Weblogic8xAppServer((Weblogic8xAppServerInstallation) installation); 37 } 38 39 public AppServerInstallation createInstallation(URL host, File serverDir, File workingDir) throws Exception { 40 return new Weblogic8xAppServerInstallation(host, serverDir, workingDir, config.appserverMajorVersion(), config 41 .appserverMinorVersion()); 42 } 43 44 public AppServerInstallation createInstallation(File home, File workingDir) throws Exception { 45 return new Weblogic8xAppServerInstallation(home, workingDir, config.appserverMajorVersion(), config 46 .appserverMinorVersion()); 47 } 48 49 public War createWar(String appName) { 50 War war = new DtdWar(appName); 51 DescriptorXml weblogicWar = new Weblogic8xDescriptorXml(); 52 war.addContainerSpecificXml(weblogicWar.getFileName(), weblogicWar.getBytes()); 53 return war; 54 } 55 56 public StandardTerracottaAppServerConfig createTcConfig(File baseDir) { 57 return new Weblogic8xAppServerConfig(baseDir); 58 } 59 } 60 | Popular Tags |