public class ConfigurationFactory extends java.lang.Object implements OpenEjbConfigurationFactory
Modifier and Type | Class and Description |
---|---|
static class |
ConfigurationFactory.Chain |
static class |
ConfigurationFactory.ProxyBeanClassUpdate |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ADDITIONAL_DEPLOYMENTS |
static java.lang.String |
OPENEJB_JDBC_DATASOURCE_CREATOR |
protected static java.lang.String |
VALIDATION_SKIP_PROPERTY |
Constructor and Description |
---|
ConfigurationFactory() |
ConfigurationFactory(boolean offline) |
ConfigurationFactory(boolean offline,
ConfigurationFactory.Chain deployerChain,
OpenEjbConfiguration configuration) |
ConfigurationFactory(boolean offline,
DynamicDeployer preAutoConfigDeployer) |
ConfigurationFactory(boolean offline,
DynamicDeployer preAutoConfigDeployer,
OpenEjbConfiguration configuration) |
ConfigurationFactory(boolean offline,
OpenEjbConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
AppInfo |
configureApplication(AppModule appModule) |
AppInfo |
configureApplication(java.lang.ClassLoader classLoader,
java.lang.String id,
java.util.List<java.io.File> jarFiles)
embedded usage
|
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) |
<T extends ServiceInfo> |
configureService(java.lang.Class<? extends T> type) |
<T extends ServiceInfo> |
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.
|
<T extends ServiceInfo> |
configureService(Service service,
java.lang.Class<? extends T> infoType)
This is the major piece of code that configures services.
|
<T extends ServiceInfo> |
configureService(java.lang.String id,
java.lang.Class<? extends T> type) |
ContainerInfo |
createContainerInfo(Container container) |
static void |
fillOpenEjb(Openejb openejb,
java.util.Properties sysProps) |
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) |
java.util.ArrayList<java.io.File> |
getModulesFromClassPath(java.util.List<java.io.File> declaredApps,
java.lang.ClassLoader classLoader) |
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.
|
OpenEjbConfiguration |
getOpenEjbConfiguration(java.io.File configuartionFile) |
OpenEjbConfiguration |
getOpenEjbConfiguration(Openejb providedConf) |
protected static java.util.Properties |
getOverrides(java.util.Properties properties,
java.lang.String serviceId,
java.lang.String serviceType) |
protected java.util.List<java.lang.String> |
getResourceIds() |
protected java.util.List<java.lang.String> |
getResourceIds(java.lang.String type) |
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) |
boolean |
isOffline() |
static boolean |
isResourceType(java.lang.String service,
java.util.List<java.lang.String> types,
java.lang.String type) |
AppModule |
loadApplication(java.lang.ClassLoader classLoader,
java.lang.String id,
java.util.List<java.io.File> jarFiles) |
static void |
loadPropertiesDeclaredConfiguration(Openejb openejb) |
static java.net.URI[] |
resolveClasspath(java.lang.String rawstring)
Takes a raw unparsed string expected to be in jvm classpath syntax
and parses it, producing a collection of URIs representing the absolute
file paths of the classpath to be created.
|
static java.util.List<ResourceInfo> |
sort(java.util.List<ResourceInfo> infos,
java.lang.String prefix) |
protected static java.lang.Object |
toConfigDeclaration(java.lang.String name,
java.lang.String value) |
static java.lang.Object |
toConfigDeclaration(java.lang.String id,
java.net.URI uri) |
static java.util.List<HandlerChainInfo> |
toHandlerChainInfo(HandlerChains chains) |
public static final java.lang.String OPENEJB_JDBC_DATASOURCE_CREATOR
public static final java.lang.String ADDITIONAL_DEPLOYMENTS
protected static final java.lang.String VALIDATION_SKIP_PROPERTY
public ConfigurationFactory()
public ConfigurationFactory(boolean offline)
public ConfigurationFactory(boolean offline, DynamicDeployer preAutoConfigDeployer)
public ConfigurationFactory(boolean offline, OpenEjbConfiguration configuration)
public ConfigurationFactory(boolean offline, DynamicDeployer preAutoConfigDeployer, OpenEjbConfiguration configuration)
public ConfigurationFactory(boolean offline, ConfigurationFactory.Chain deployerChain, OpenEjbConfiguration configuration)
public boolean isOffline()
public static java.util.List<HandlerChainInfo> toHandlerChainInfo(HandlerChains chains)
public void init(java.util.Properties props) throws OpenEJBException
init
in interface OpenEjbConfigurationFactory
OpenEJBException
protected void install(ContainerInfo serviceInfo) throws OpenEJBException
OpenEJBException
protected void install(ResourceInfo serviceInfo) throws OpenEJBException
OpenEJBException
public OpenEjbConfiguration getOpenEjbConfiguration(java.io.File configuartionFile) throws OpenEJBException
OpenEJBException
public OpenEjbConfiguration getOpenEjbConfiguration(Openejb providedConf) throws OpenEJBException
OpenEJBException
public OpenEjbConfiguration getOpenEjbConfiguration() throws OpenEJBException
getOpenEjbConfiguration
in interface OpenEjbConfigurationFactory
OpenEJBException
public java.util.ArrayList<java.io.File> getModulesFromClassPath(java.util.List<java.io.File> declaredApps, java.lang.ClassLoader classLoader)
public ContainerInfo createContainerInfo(Container container) throws OpenEJBException
OpenEJBException
public static void loadPropertiesDeclaredConfiguration(Openejb openejb)
public static void fillOpenEjb(Openejb openejb, java.util.Properties sysProps)
protected static java.lang.Object toConfigDeclaration(java.lang.String name, java.lang.String value) throws java.net.URISyntaxException, OpenEJBException
java.net.URISyntaxException
OpenEJBException
public static java.lang.Object toConfigDeclaration(java.lang.String id, java.net.URI uri) throws OpenEJBException
OpenEJBException
public AppInfo configureApplication(java.io.File jarFile) throws OpenEJBException
OpenEJBException
public AppInfo configureApplication(java.lang.ClassLoader classLoader, java.lang.String id, java.util.List<java.io.File> jarFiles) throws OpenEJBException
classLoader
- classloaderid
- id supplied from embedded properties or nulljarFiles
- list of ejb modulesOpenEJBException
- on errorpublic AppModule loadApplication(java.lang.ClassLoader classLoader, java.lang.String id, java.util.List<java.io.File> jarFiles) throws OpenEJBException
OpenEJBException
public EjbJarInfo configureApplication(EjbJar ejbJar) throws OpenEJBException
OpenEJBException
public EjbJarInfo configureApplication(EjbModule ejbModule) throws OpenEJBException
OpenEJBException
public ClientInfo configureApplication(ClientModule clientModule) throws OpenEJBException
OpenEJBException
public ConnectorInfo configureApplication(ConnectorModule connectorModule) throws OpenEJBException
OpenEJBException
public WebAppInfo configureApplication(WebModule webModule) throws OpenEJBException
OpenEJBException
public AppInfo configureApplication(AppModule appModule) throws OpenEJBException
OpenEJBException
public <T extends ServiceInfo> T configureService(java.lang.Class<? extends T> type) throws OpenEJBException
OpenEJBException
public <T extends ServiceInfo> T configureService(Service service, java.lang.Class<? extends T> infoType) throws OpenEJBException
T
- infoTypeservice
- ServiceinfoType
- ClassOpenEJBException
- On errorpublic static java.net.URI[] resolveClasspath(java.lang.String rawstring) throws java.io.IOException
rawstring
- unparsed string in "classpath" syntaxjava.io.IOException
- if path cannot be resolved or file referenced does not existpublic <T extends ServiceInfo> T configureService(java.lang.String id, java.lang.Class<? extends T> type) throws OpenEJBException
OpenEJBException
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
type
- Class TserviceId
- StringdeclaredProperties
- PropertiesproviderId
- StringserviceType
- StringOpenEJBException
protected static java.util.Properties getSystemProperties(java.lang.String serviceId, java.lang.String serviceType)
protected static java.util.Properties getOverrides(java.util.Properties properties, java.lang.String serviceId, java.lang.String serviceType)
protected static java.lang.Class<? extends ContainerInfo> getContainerInfoType(java.lang.String ctype)
protected java.util.List<java.lang.String> getResourceIds()
protected java.util.List<java.lang.String> getResourceIds(java.lang.String type)
public java.util.List<java.lang.String> getResourceIds(java.lang.String type, java.util.Properties required)
protected ResourceInfo getResourceInfo(java.lang.String id)
public static boolean isResourceType(java.lang.String service, java.util.List<java.lang.String> types, java.lang.String type)
protected java.util.List<java.lang.String> getContainerIds()
protected java.util.List<ContainerInfo> getContainerInfos()
public static java.util.List<ResourceInfo> sort(java.util.List<ResourceInfo> infos, java.lang.String prefix)