org.apache.openejb.config
Class ConfigurationFactory
java.lang.Object
org.apache.openejb.config.ConfigurationFactory
- All Implemented Interfaces:
- OpenEjbConfigurationFactory
public class ConfigurationFactory
- extends java.lang.Object
- implements OpenEjbConfigurationFactory
Method Summary |
AppInfo |
configureApplication(AppModule appModule)
|
AppInfo |
configureApplication(java.lang.ClassLoader classLoader,
java.lang.String id,
java.util.List<java.io.File> jarFiles)
|
ClientInfo |
configureApplication(ClientModule clientModule)
|
ConnectorInfo |
configureApplication(ConnectorModule connectorModule)
|
EjbJarInfo |
configureApplication(EjbJar ejbJar)
|
EjbJarInfo |
configureApplication(EjbModule ejbModule)
|
AppInfo |
configureApplication(java.io.File jarFile)
|
WebAppInfo |
configureApplication(WebModule webModule)
|
|
configureService(java.lang.Class<? extends T> type)
|
|
configureService(java.lang.Class<? extends T> type,
java.lang.String serviceId,
java.util.Properties declaredProperties,
java.lang.String providerId,
java.lang.String serviceType)
Resolving the provider for a particular service follows this algorithm:
1. |
|
configureService(Service service,
java.lang.Class<? extends T> infoType)
This is the major piece of code that configures servics
It merges the data from the declaration
with the data from the openejb.xml file (say )
The end result is a canonical (i.e. |
|
configureService(java.lang.String id,
java.lang.Class<? extends T> type)
|
ContainerInfo |
createContainerInfo(Container container)
|
protected java.util.List<java.lang.String> |
getContainerIds()
|
protected java.util.List<ContainerInfo> |
getContainerInfos()
|
protected static java.lang.Class<? extends ContainerInfo> |
getContainerInfoType(java.lang.String ctype)
|
OpenEjbConfiguration |
getOpenEjbConfiguration()
Main loop that gets executed when OpenEJB starts up
Reads config files and produces the basic "AST"
the assembler needs to actually build the contianer system
This method is called by the Assembler once at startup. |
protected java.util.List<java.lang.String> |
getResourceIds()
|
protected java.util.List<java.lang.String> |
getResourceIds(java.lang.String type)
|
protected java.util.List<java.lang.String> |
getResourceIds(java.lang.String type,
java.util.Properties required)
|
protected ResourceInfo |
getResourceInfo(java.lang.String id)
|
protected static java.util.Properties |
getSystemProperties(java.lang.String serviceId,
java.lang.String serviceType)
|
void |
init(java.util.Properties props)
|
protected void |
install(ContainerInfo serviceInfo)
|
protected void |
install(ResourceInfo serviceInfo)
|
protected java.lang.Object |
toConfigDeclaration(java.lang.String name,
java.lang.String value)
|
java.lang.Object |
toConfigDeclaration(java.lang.String id,
java.net.URI uri)
|
static java.util.List<HandlerChainInfo> |
toHandlerChainInfo(HandlerChains chains)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VALIDATION_SKIP_PROPERTY
protected static final java.lang.String VALIDATION_SKIP_PROPERTY
- See Also:
- Constant Field Values
ConfigurationFactory
public ConfigurationFactory()
ConfigurationFactory
public ConfigurationFactory(boolean offline)
ConfigurationFactory
public ConfigurationFactory(boolean offline,
DynamicDeployer preAutoConfigDeployer)
ConfigurationFactory
public ConfigurationFactory(boolean offline,
OpenEjbConfiguration configuration)
ConfigurationFactory
public ConfigurationFactory(boolean offline,
DynamicDeployer preAutoConfigDeployer,
OpenEjbConfiguration configuration)
toHandlerChainInfo
public static java.util.List<HandlerChainInfo> toHandlerChainInfo(HandlerChains chains)
init
public void init(java.util.Properties props)
throws OpenEJBException
- Specified by:
init
in interface OpenEjbConfigurationFactory
- Throws:
OpenEJBException
install
protected void install(ContainerInfo serviceInfo)
throws OpenEJBException
- Throws:
OpenEJBException
install
protected void install(ResourceInfo serviceInfo)
throws OpenEJBException
- Throws:
OpenEJBException
getOpenEjbConfiguration
public OpenEjbConfiguration getOpenEjbConfiguration()
throws OpenEJBException
- Main loop that gets executed when OpenEJB starts up
Reads config files and produces the basic "AST"
the assembler needs to actually build the contianer system
This method is called by the Assembler once at startup.
- Specified by:
getOpenEjbConfiguration
in interface OpenEjbConfigurationFactory
- Returns:
-
- Throws:
OpenEJBException
createContainerInfo
public ContainerInfo createContainerInfo(Container container)
throws OpenEJBException
- Throws:
OpenEJBException
toConfigDeclaration
protected java.lang.Object toConfigDeclaration(java.lang.String name,
java.lang.String value)
throws java.net.URISyntaxException,
OpenEJBException
- Throws:
java.net.URISyntaxException
OpenEJBException
toConfigDeclaration
public java.lang.Object toConfigDeclaration(java.lang.String id,
java.net.URI uri)
throws OpenEJBException
- Throws:
OpenEJBException
configureApplication
public AppInfo configureApplication(java.io.File jarFile)
throws OpenEJBException
- Throws:
OpenEJBException
configureApplication
public AppInfo configureApplication(java.lang.ClassLoader classLoader,
java.lang.String id,
java.util.List<java.io.File> jarFiles)
throws OpenEJBException
- Throws:
OpenEJBException
configureApplication
public EjbJarInfo configureApplication(EjbJar ejbJar)
throws OpenEJBException
- Throws:
OpenEJBException
configureApplication
public EjbJarInfo configureApplication(EjbModule ejbModule)
throws OpenEJBException
- Throws:
OpenEJBException
configureApplication
public ClientInfo configureApplication(ClientModule clientModule)
throws OpenEJBException
- Throws:
OpenEJBException
configureApplication
public ConnectorInfo configureApplication(ConnectorModule connectorModule)
throws OpenEJBException
- Throws:
OpenEJBException
configureApplication
public WebAppInfo configureApplication(WebModule webModule)
throws OpenEJBException
- Throws:
OpenEJBException
configureApplication
public AppInfo configureApplication(AppModule appModule)
throws OpenEJBException
- Throws:
OpenEJBException
configureService
public <T extends ServiceInfo> T configureService(java.lang.Class<? extends T> type)
throws OpenEJBException
- Throws:
OpenEJBException
configureService
public <T extends ServiceInfo> T configureService(Service service,
java.lang.Class<? extends T> infoType)
throws OpenEJBException
- This is the major piece of code that configures servics
It merges the data from the declaration
with the data from the openejb.xml file (say )
The end result is a canonical (i.e. flattened) ServiceInfo
The ServiceInfo will be of a specific type (ContainerInfo, ResourceInfo, etc)
- Type Parameters:
T
- - Parameters:
service
- infoType
-
- Returns:
-
- Throws:
OpenEJBException
configureService
public <T extends ServiceInfo> T configureService(java.lang.String id,
java.lang.Class<? extends T> type)
throws OpenEJBException
- Throws:
OpenEJBException
configureService
public <T extends ServiceInfo> T configureService(java.lang.Class<? extends T> type,
java.lang.String serviceId,
java.util.Properties declaredProperties,
java.lang.String providerId,
java.lang.String serviceType)
throws OpenEJBException
- Resolving the provider for a particular service follows this algorithm:
1. Attempt to load the provider specified by the 'providerId'.
2. If this fails, throw NoSuchProviderException
3. If providerId is null, attempt to load the specified provider using the 'serviceId' as the 'providerId'
4. If this fails, check the hardcoded defaults for a default providerId using the supplied 'type'
5. If this fails, throw NoSuchProviderException
- Throws:
OpenEJBException
getSystemProperties
protected static java.util.Properties getSystemProperties(java.lang.String serviceId,
java.lang.String serviceType)
getContainerInfoType
protected static java.lang.Class<? extends ContainerInfo> getContainerInfoType(java.lang.String ctype)
getResourceIds
protected java.util.List<java.lang.String> getResourceIds()
getResourceIds
protected java.util.List<java.lang.String> getResourceIds(java.lang.String type)
getResourceIds
protected java.util.List<java.lang.String> getResourceIds(java.lang.String type,
java.util.Properties required)
getResourceInfo
protected ResourceInfo getResourceInfo(java.lang.String id)
getContainerIds
protected java.util.List<java.lang.String> getContainerIds()
getContainerInfos
protected java.util.List<ContainerInfo> getContainerInfos()
Copyright © 1999-2011 The Apache OpenEJB development community. All Rights Reserved.