1 23 24 package com.sun.enterprise.instance; 25 26 import com.sun.enterprise.config.ConfigException; 27 28 29 32 public class InstanceFactory { 33 34 40 public static AppsManager createAppsManager(String serverId) 41 throws ConfigException 42 { 43 InstanceEnvironment env = new InstanceEnvironment(serverId); 44 return new AppsManager(env); 45 } 46 47 53 public static AppsManager createAppsManager(String installRoot, 54 String serverId) throws ConfigException 55 { 56 return createAppsManager(installRoot, serverId, true); 57 } 58 59 65 public static AppsManager createAppsManager(String installRoot, 66 String serverId, boolean useBackupServerXml) throws ConfigException 67 { 68 InstanceEnvironment env = new InstanceEnvironment(installRoot,serverId); 69 return new AppsManager(env, useBackupServerXml); 70 } 71 72 82 public static AppsManager createAppsManager(InstanceEnvironment env, 83 boolean useBackupServerXml) throws ConfigException { 84 85 return new AppsManager(env, useBackupServerXml); 86 } 87 88 public static EjbModulesManager createEjbModuleManager(String serverId) 89 throws ConfigException 90 { 91 InstanceEnvironment env = new InstanceEnvironment(serverId); 92 return new EjbModulesManager(env); 93 } 94 95 public static EjbModulesManager createEjbModuleManager(String installRoot, 96 String serverId) throws ConfigException 97 { 98 return createEjbModuleManager(installRoot, serverId, true); 99 } 100 101 public static EjbModulesManager createEjbModuleManager(String installRoot, 102 String serverId, boolean useBackupServerXml) throws ConfigException 103 { 104 InstanceEnvironment env = new InstanceEnvironment(installRoot,serverId); 105 return new EjbModulesManager(env, useBackupServerXml); 106 } 107 108 118 public static EjbModulesManager createEjbModuleManager( 119 InstanceEnvironment env, boolean useBackupServerXml) 120 throws ConfigException { 121 122 return new EjbModulesManager(env, useBackupServerXml); 123 } 124 125 public static ConnectorModulesManager createConnectorModulesManager(String serverId) 126 throws ConfigException 127 { 128 InstanceEnvironment env = new InstanceEnvironment(serverId); 129 return new ConnectorModulesManager(env); 130 } 131 132 133 public static ConnectorModulesManager createConnectorModuleManager( 135 InstanceEnvironment env, boolean useBackupServerXml) 136 throws ConfigException { 137 return new ConnectorModulesManager(env, useBackupServerXml); 138 } 139 140 public static WebModulesManager createWebModuleManager(String serverId) 142 throws ConfigException 143 { 144 InstanceEnvironment env = new InstanceEnvironment(serverId); 145 return new WebModulesManager(env); 146 } 147 148 149 public static WebModulesManager createWebModuleManager(String installRoot, 150 String serverId) throws ConfigException 151 { 152 return createWebModuleManager(installRoot, serverId, true); 153 } 154 155 public static WebModulesManager createWebModuleManager(String installRoot, 156 String serverId, boolean useBackupServerXml) throws ConfigException 157 { 158 InstanceEnvironment env = new InstanceEnvironment(installRoot,serverId); 159 return new WebModulesManager(env, useBackupServerXml); 160 } 161 162 public static AppclientModulesManager createAppclientModulesManager(String serverId) 163 throws ConfigException 164 { 165 InstanceEnvironment env = new InstanceEnvironment(serverId); 166 return new AppclientModulesManager(env); 167 } 168 169 public static AppclientModulesManager createAppclientModulesManager(InstanceEnvironment env) 170 throws ConfigException 171 { 172 return new AppclientModulesManager(env); 173 } 174 175 } 176 | Popular Tags |