1 4 package com.tc.test.server.appserver.jboss4x; 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.DtdWar; 12 import com.tc.test.server.appserver.war.War; 13 import com.tc.test.server.tcconfig.StandardTerracottaAppServerConfig; 14 15 import java.io.File ; 16 import java.net.URL ; 17 import java.util.Properties ; 18 19 23 public final class JBoss4xAppServerFactory extends NewAppServerFactory { 24 25 public JBoss4xAppServerFactory(ProtectedKey protectedKey, TestConfigObject config) { 27 super(protectedKey, config); 28 } 29 30 public AppServerParameters createParameters(String instanceName, Properties props) { 31 return new JBoss4xAppServerParameters(instanceName, props, config.sessionClasspath()); 32 } 33 34 public AppServer createAppServer(AppServerInstallation installation) { 35 return new JBoss4xAppServer((JBoss4xAppServerInstallation) installation); 36 } 37 38 public AppServerInstallation createInstallation(URL host, File serverDir, File workingDir) throws Exception { 39 return new JBoss4xAppServerInstallation(host, serverDir, workingDir, config.appserverMajorVersion(), config.appserverMinorVersion()); 40 } 41 42 public AppServerInstallation createInstallation(File home, File workingDir) throws Exception { 43 return new JBoss4xAppServerInstallation(home, workingDir, config.appserverMajorVersion(), config.appserverMinorVersion()); 44 } 45 46 public War createWar(String appName) { 47 return new DtdWar(appName); 48 } 49 50 public StandardTerracottaAppServerConfig createTcConfig(File baseDir) { 51 return new JBoss4xAppServerConfig(baseDir); 52 } 53 } 54 | Popular Tags |