public class DeploymentLoader extends java.lang.Object implements DeploymentFilterable
Modifier and Type | Class and Description |
---|---|
static class |
DeploymentLoader.ExternalConfiguration |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EAR_SCOPED_CDI_BEANS |
static java.lang.String |
EAR_WEBAPP_PERSISTENCE_XML_JARS |
static Logger |
logger |
static java.lang.String |
OPENEJB_ALTDD_PREFIX |
static java.lang.String |
RAR_URLS_KEY |
static java.lang.String |
URLS_KEY |
CLASSPATH_EXCLUDE, CLASSPATH_FILTER_DESCRIPTORS, CLASSPATH_FILTER_SYSTEMAPPS, CLASSPATH_INCLUDE, CLASSPATH_REQUIRE_DESCRIPTOR, DEPLOYMENTS_CLASSPATH_PROPERTY, PACKAGE_EXCLUDE, PACKAGE_INCLUDE, SEARCH_CLASSPATH_FOR_DEPLOYMENTS_PROPERTY
Constructor and Description |
---|
DeploymentLoader() |
Modifier and Type | Method and Description |
---|---|
static void |
addBeansXmls(WebModule webModule) |
protected static java.util.Collection<java.net.URL> |
addPersistenceUnits(AppModule appModule,
java.net.URL... urls) |
protected static void |
addWebFragments(WebModule webModule,
java.util.Collection<java.net.URL> urls) |
void |
addWebModule(AppModule appModule,
java.net.URL warUrl,
java.lang.ClassLoader parentClassLoader,
java.lang.String contextRoot,
java.lang.String moduleName) |
static EjbModule |
addWebModule(WebModule webModule,
AppModule appModule) |
static void |
addWebModuleDescriptors(java.net.URL baseUrl,
WebModule webModule,
AppModule appModule) |
static java.util.Map<java.lang.String,java.net.URL> |
altDDSources(java.util.Map<java.lang.String,java.net.URL> map,
boolean log)
Modifies the map passed in with all the alt dd URLs found
|
protected AppModule |
createAppModule(java.io.File jarFile,
java.lang.String jarPath) |
protected ClientModule |
createClientModule(java.net.URL clientUrl,
java.lang.String absolutePath,
java.lang.ClassLoader appClassLoader,
java.lang.String moduleName) |
protected ClientModule |
createClientModule(java.net.URL clientUrl,
java.lang.String absolutePath,
java.lang.ClassLoader appClassLoader,
java.lang.String moduleName,
boolean log) |
protected static ConnectorModule |
createConnectorModule(java.lang.String appId,
java.lang.String rarPath,
java.lang.ClassLoader parentClassLoader,
java.lang.String moduleId) |
protected static ConnectorModule |
createConnectorModule(java.lang.String appId,
java.lang.String rarPath,
java.lang.ClassLoader parentClassLoader,
java.lang.String moduleId,
java.net.URL raXmlUrl) |
protected EjbModule |
createEjbModule(java.net.URL baseUrl,
java.lang.String jarPath,
java.lang.ClassLoader classLoader) |
WebModule |
createWebModule(java.lang.String appId,
java.lang.String warPath,
java.lang.ClassLoader parentClassLoader,
java.lang.String contextRoot,
java.lang.String moduleName,
DeploymentLoader.ExternalConfiguration config) |
java.lang.Class<? extends DeploymentModule> |
discoverModuleType(java.net.URL baseUrl,
java.lang.ClassLoader classLoader,
boolean searchForDescriptorlessApplications) |
java.lang.Class<? extends DeploymentModule> |
discoverModuleType(java.net.URL baseUrl,
java.lang.ClassLoader classLoader,
java.util.Set<RequireDescriptors> requireDescriptor) |
static void |
doMerge(java.net.URL url,
CompositeBeans current,
Beans beans) |
static java.util.List<java.net.URL> |
filterWebappUrls(java.net.URL[] webUrls,
Filter filter,
java.net.URL exclusions) |
protected java.lang.String |
getContextRoot() |
static java.util.Map<java.lang.String,java.net.URL> |
getDescriptors(java.net.URL moduleUrl) |
protected java.io.File |
getFile(java.net.URL warUrl) |
protected static java.net.URL |
getFileUrl(java.io.File jarFile) |
protected java.lang.String |
getModuleName() |
protected java.lang.ClassLoader |
getOpenEJBClassLoader() |
static java.net.URL[] |
getWebappUrls(java.io.File warFile) |
static java.util.Map<java.lang.String,java.net.URL[]> |
getWebappUrlsAndRars(java.io.File warFile) |
static java.util.Map<java.lang.String,java.net.URL> |
getWebDescriptors(java.io.File warFile) |
AppModule |
load(java.io.File jarFile)
Deprecated.
|
AppModule |
load(java.io.File jarFile,
DeploymentLoader.ExternalConfiguration config) |
static java.util.Map<java.lang.String,java.net.URL> |
mapDescriptors(ResourceFinder finder) |
static void |
reloadAltDD() |
static void |
scanDir(java.io.File dir,
java.util.Map<java.lang.String,java.net.URL> files,
java.lang.String path) |
static void |
scanDir(java.io.File dir,
java.util.Map<java.lang.String,java.net.URL> files,
java.lang.String path,
boolean recursive) |
static Application |
unmarshal(java.net.URL url) |
static java.io.File |
unpack(java.io.File jarFile) |
public static final Logger logger
public static final java.lang.String OPENEJB_ALTDD_PREFIX
public static final java.lang.String EAR_WEBAPP_PERSISTENCE_XML_JARS
public static final java.lang.String EAR_SCOPED_CDI_BEANS
public static final java.lang.String RAR_URLS_KEY
public static final java.lang.String URLS_KEY
@Deprecated public AppModule load(java.io.File jarFile) throws OpenEJBException
OpenEJBException
public AppModule load(java.io.File jarFile, DeploymentLoader.ExternalConfiguration config) throws OpenEJBException
jarFile
- the app file (war, jar, ear)config
- potentially some more config, mainly used when linking to another system like tomcat to enrich the conf we can guessOpenEJBException
public static void addWebModuleDescriptors(java.net.URL baseUrl, WebModule webModule, AppModule appModule) throws OpenEJBException
OpenEJBException
protected java.lang.ClassLoader getOpenEJBClassLoader()
protected AppModule createAppModule(java.io.File jarFile, java.lang.String jarPath) throws OpenEJBException
OpenEJBException
protected ClientModule createClientModule(java.net.URL clientUrl, java.lang.String absolutePath, java.lang.ClassLoader appClassLoader, java.lang.String moduleName) throws OpenEJBException
OpenEJBException
protected ClientModule createClientModule(java.net.URL clientUrl, java.lang.String absolutePath, java.lang.ClassLoader appClassLoader, java.lang.String moduleName, boolean log) throws OpenEJBException
OpenEJBException
protected EjbModule createEjbModule(java.net.URL baseUrl, java.lang.String jarPath, java.lang.ClassLoader classLoader) throws OpenEJBException
OpenEJBException
public void addWebModule(AppModule appModule, java.net.URL warUrl, java.lang.ClassLoader parentClassLoader, java.lang.String contextRoot, java.lang.String moduleName) throws OpenEJBException
OpenEJBException
public static EjbModule addWebModule(WebModule webModule, AppModule appModule) throws OpenEJBException
OpenEJBException
public WebModule createWebModule(java.lang.String appId, java.lang.String warPath, java.lang.ClassLoader parentClassLoader, java.lang.String contextRoot, java.lang.String moduleName, DeploymentLoader.ExternalConfiguration config) throws OpenEJBException
OpenEJBException
public static java.util.List<java.net.URL> filterWebappUrls(java.net.URL[] webUrls, Filter filter, java.net.URL exclusions)
public static void addBeansXmls(WebModule webModule)
public static void doMerge(java.net.URL url, CompositeBeans current, Beans beans)
protected java.lang.String getContextRoot()
protected java.lang.String getModuleName()
public static java.util.Map<java.lang.String,java.net.URL[]> getWebappUrlsAndRars(java.io.File warFile)
public static java.net.URL[] getWebappUrls(java.io.File warFile)
protected static ConnectorModule createConnectorModule(java.lang.String appId, java.lang.String rarPath, java.lang.ClassLoader parentClassLoader, java.lang.String moduleId) throws OpenEJBException
OpenEJBException
protected static ConnectorModule createConnectorModule(java.lang.String appId, java.lang.String rarPath, java.lang.ClassLoader parentClassLoader, java.lang.String moduleId, java.net.URL raXmlUrl) throws OpenEJBException
OpenEJBException
protected static void addWebFragments(WebModule webModule, java.util.Collection<java.net.URL> urls) throws OpenEJBException
OpenEJBException
protected static java.util.Collection<java.net.URL> addPersistenceUnits(AppModule appModule, java.net.URL... urls) throws OpenEJBException
OpenEJBException
public static java.util.Map<java.lang.String,java.net.URL> getDescriptors(java.net.URL moduleUrl) throws OpenEJBException
OpenEJBException
public static java.util.Map<java.lang.String,java.net.URL> mapDescriptors(ResourceFinder finder) throws java.io.IOException
java.io.IOException
public static java.util.Map<java.lang.String,java.net.URL> altDDSources(java.util.Map<java.lang.String,java.net.URL> map, boolean log)
map
- Maplog
- booleanpublic static java.util.Map<java.lang.String,java.net.URL> getWebDescriptors(java.io.File warFile) throws java.io.IOException
java.io.IOException
protected java.io.File getFile(java.net.URL warUrl)
public static Application unmarshal(java.net.URL url) throws OpenEJBException
OpenEJBException
public static void scanDir(java.io.File dir, java.util.Map<java.lang.String,java.net.URL> files, java.lang.String path)
public static void scanDir(java.io.File dir, java.util.Map<java.lang.String,java.net.URL> files, java.lang.String path, boolean recursive)
public java.lang.Class<? extends DeploymentModule> discoverModuleType(java.net.URL baseUrl, java.lang.ClassLoader classLoader, boolean searchForDescriptorlessApplications) throws java.io.IOException, UnknownModuleTypeException
java.io.IOException
UnknownModuleTypeException
public java.lang.Class<? extends DeploymentModule> discoverModuleType(java.net.URL baseUrl, java.lang.ClassLoader classLoader, java.util.Set<RequireDescriptors> requireDescriptor) throws java.io.IOException, UnknownModuleTypeException
java.io.IOException
UnknownModuleTypeException
public static java.io.File unpack(java.io.File jarFile) throws OpenEJBException
OpenEJBException
protected static java.net.URL getFileUrl(java.io.File jarFile) throws OpenEJBException
OpenEJBException
public static void reloadAltDD()