org.apache.openejb.config
Class DeploymentLoader
java.lang.Object
org.apache.openejb.config.DeploymentLoader
- All Implemented Interfaces:
- DeploymentFilterable
public class DeploymentLoader
- extends Object
- implements DeploymentFilterable
- Version:
- $Revision: 1174232 $ $Date: 2011-09-22 15:58:24 +0000 (Thu, 22 Sep 2011) $
|
Method Summary |
protected static void |
addPersistenceUnits(AppModule appModule,
URL... urls)
|
protected void |
addWebModule(AppModule appModule,
URL warUrl,
ClassLoader parentClassLoader,
String contextRoot,
String moduleName)
|
static Map<String,URL> |
altDDSources(Map<String,URL> map,
boolean log)
Modifies the map passed in with all the alt dd URLs found |
protected AppModule |
createAppModule(File jarFile,
String jarPath)
|
protected ClientModule |
createClientModule(URL clientUrl,
String absolutePath,
ClassLoader appClassLoader,
String moduleName)
|
protected ClientModule |
createClientModule(URL clientUrl,
String absolutePath,
ClassLoader appClassLoader,
String moduleName,
boolean log)
|
protected static ConnectorModule |
createConnectorModule(String appId,
String rarPath,
ClassLoader parentClassLoader,
String moduleId)
|
protected EjbModule |
createEjbModule(URL baseUrl,
String jarPath,
ClassLoader classLoader,
String moduleId)
|
protected WebModule |
createWebModule(String appId,
String warPath,
ClassLoader parentClassLoader,
String contextRoot,
String moduleName)
|
Class<? extends DeploymentModule> |
discoverModuleType(URL baseUrl,
ClassLoader classLoader,
boolean searchForDescriptorlessApplications)
|
Class<? extends DeploymentModule> |
discoverModuleType(URL baseUrl,
ClassLoader classLoader,
Set<RequireDescriptors> requireDescriptor)
|
protected String |
getContextRoot()
|
static Map<String,URL> |
getDescriptors(URL moduleUrl)
|
protected File |
getFile(URL warUrl)
|
protected static URL |
getFileUrl(File jarFile)
|
protected String |
getModuleName()
|
static URL[] |
getWebappUrls(File warFile)
|
protected Map<String,URL> |
getWebDescriptors(File warFile)
|
AppModule |
load(File jarFile)
|
static void |
scanDir(File dir,
Map<String,URL> files,
String path)
|
static
|
unmarshal(Class<T> type,
String descriptor,
URL url)
|
protected static File |
unpack(File jarFile)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
public static final Logger logger
DeploymentLoader
public DeploymentLoader()
load
public AppModule load(File jarFile)
throws OpenEJBException
- Throws:
OpenEJBException
createAppModule
protected AppModule createAppModule(File jarFile,
String jarPath)
throws OpenEJBException
- Throws:
OpenEJBException
createClientModule
protected ClientModule createClientModule(URL clientUrl,
String absolutePath,
ClassLoader appClassLoader,
String moduleName)
throws OpenEJBException
- Throws:
OpenEJBException
createClientModule
protected ClientModule createClientModule(URL clientUrl,
String absolutePath,
ClassLoader appClassLoader,
String moduleName,
boolean log)
throws OpenEJBException
- Throws:
OpenEJBException
createEjbModule
protected EjbModule createEjbModule(URL baseUrl,
String jarPath,
ClassLoader classLoader,
String moduleId)
throws OpenEJBException
- Throws:
OpenEJBException
addWebModule
protected void addWebModule(AppModule appModule,
URL warUrl,
ClassLoader parentClassLoader,
String contextRoot,
String moduleName)
throws OpenEJBException
- Throws:
OpenEJBException
createWebModule
protected WebModule createWebModule(String appId,
String warPath,
ClassLoader parentClassLoader,
String contextRoot,
String moduleName)
throws OpenEJBException
- Throws:
OpenEJBException
getContextRoot
protected String getContextRoot()
getModuleName
protected String getModuleName()
getWebappUrls
public static URL[] getWebappUrls(File warFile)
createConnectorModule
protected static ConnectorModule createConnectorModule(String appId,
String rarPath,
ClassLoader parentClassLoader,
String moduleId)
throws OpenEJBException
- Throws:
OpenEJBException
addPersistenceUnits
protected static void addPersistenceUnits(AppModule appModule,
URL... urls)
throws OpenEJBException
- Throws:
OpenEJBException
getDescriptors
public static Map<String,URL> getDescriptors(URL moduleUrl)
throws OpenEJBException
- Throws:
OpenEJBException
altDDSources
public static Map<String,URL> altDDSources(Map<String,URL> map,
boolean log)
- Modifies the map passed in with all the alt dd URLs found
- Parameters:
map - log -
- Returns:
- the same map instance updated with alt dds
getWebDescriptors
protected Map<String,URL> getWebDescriptors(File warFile)
throws IOException
- Throws:
IOException
getFile
protected File getFile(URL warUrl)
unmarshal
public static <T> T unmarshal(Class<T> type,
String descriptor,
URL url)
throws OpenEJBException
- Throws:
OpenEJBException
scanDir
public static void scanDir(File dir,
Map<String,URL> files,
String path)
discoverModuleType
public Class<? extends DeploymentModule> discoverModuleType(URL baseUrl,
ClassLoader classLoader,
boolean searchForDescriptorlessApplications)
throws IOException,
UnknownModuleTypeException
- Throws:
IOException
UnknownModuleTypeException
discoverModuleType
public Class<? extends DeploymentModule> discoverModuleType(URL baseUrl,
ClassLoader classLoader,
Set<RequireDescriptors> requireDescriptor)
throws IOException,
UnknownModuleTypeException
- Throws:
IOException
UnknownModuleTypeException
unpack
protected static File unpack(File jarFile)
throws OpenEJBException
- Throws:
OpenEJBException
getFileUrl
protected static URL getFileUrl(File jarFile)
throws OpenEJBException
- Throws:
OpenEJBException
Copyright © 1999-2011 The Apache Software Foundation. All Rights Reserved.