public class Assembler extends AssemblerTool implements Assembler, JndiConstants
Modifier and Type | Class and Description |
---|---|
static class |
Assembler.DeploymentListenerObserver |
static class |
Assembler.LazyResource |
static class |
Assembler.ResourceAdapterReference |
static class |
Assembler.ResourceInstance |
Modifier and Type | Field and Description |
---|---|
protected OpenEjbConfiguration |
config |
protected OpenEjbConfigurationFactory |
configFactory |
Logger |
logger |
static java.lang.String |
OPENEJB_JPA_DEPLOY_TIME_ENHANCEMENT_PROP |
static java.lang.String |
OPENEJB_TIMERS_ON |
static java.lang.String |
OPENEJB_URL_PKG_PREFIX |
static java.lang.String |
PROPAGATE_APPLICATION_EXCEPTIONS |
java.lang.String |
resourceDestroyTimeout |
boolean |
threadStackOnTimeout |
static java.lang.String |
TIMER_STORE_CLASS |
protected SafeToolkit |
toolkit |
static java.lang.Class<?>[] |
VALIDATOR_FACTORY_INTERFACES |
static java.lang.Class<?>[] |
VALIDATOR_INTERFACES |
props, serviceInterfaces
JAVA_OPENEJB_NAMING_CONTEXT, OPENEJB_RESOURCE_JNDI_PREFIX, PERSISTENCE_UNIT_NAMING_CONTEXT, VALIDATOR_FACTORY_NAMING_CONTEXT, VALIDATOR_NAMING_CONTEXT
Constructor and Description |
---|
Assembler() |
Assembler(JndiFactory jndiFactory) |
Modifier and Type | Method and Description |
---|---|
void |
addDeploymentListener(DeploymentListener deploymentListener) |
void |
bindGlobals(java.util.Map<java.lang.String,java.lang.Object> bindings) |
void |
build()
Gets the configuration from
OpenEjbConfigurationFactory
and builds the ContainerSystem and fire ContainerSystemPostCreate
event. |
void |
buildContainerSystem(OpenEjbConfiguration configInfo)
When given a complete OpenEjbConfiguration graph this method
will construct an entire container system and return a reference to that
container system, as ContainerSystem instance.
|
java.lang.ClassLoader |
createAppClassLoader(AppInfo appInfo) |
AppContext |
createApplication(AppInfo appInfo) |
AppContext |
createApplication(AppInfo appInfo,
java.lang.ClassLoader classLoader) |
AppContext |
createApplication(EjbJarInfo ejbJar) |
AppContext |
createApplication(EjbJarInfo ejbJar,
java.lang.ClassLoader classLoader) |
AppContext |
createClient(ClientInfo clientInfo) |
AppContext |
createClient(ClientInfo clientInfo,
java.lang.ClassLoader classLoader) |
void |
createConnectionManager(ConnectionManagerInfo serviceInfo) |
AppContext |
createConnector(ConnectorInfo connectorInfo) |
AppContext |
createConnector(ConnectorInfo connectorInfo,
java.lang.ClassLoader classLoader) |
void |
createContainer(ContainerInfo serviceInfo) |
AppContext |
createEjbJar(EjbJarInfo ejbJar) |
AppContext |
createEjbJar(EjbJarInfo ejbJar,
java.lang.ClassLoader classLoader) |
void |
createExternalContext(JndiContextInfo contextInfo) |
void |
createProxyFactory(ProxyFactoryInfo serviceInfo) |
void |
createResource(java.util.Collection<ServiceInfo> infos,
ResourceInfo serviceInfo) |
void |
createResource(ResourceInfo serviceInfo)
Deprecated.
|
void |
createSecurityService(SecurityServiceInfo serviceInfo) |
void |
createService(ServiceInfo serviceInfo) |
void |
createTransactionManager(TransactionServiceInfo serviceInfo) |
AppContext |
createWebApp(WebAppInfo webAppInfo) |
AppContext |
createWebApp(WebAppInfo webAppInfo,
java.lang.ClassLoader classLoader) |
void |
destroy()
Destroys the container system and all associated resources.
|
void |
destroyApplication(AppContext appContext)
Deprecated.
|
void |
destroyApplication(AppInfo appInfo) |
void |
destroyApplication(java.lang.String filePath) |
AppInfo |
getAppInfo(java.lang.String path) |
ContainerSystem |
getContainerSystem()
Gets the configured
ContainerSystem instance. |
static java.util.Map<java.lang.String,java.lang.Object> |
getContext() |
java.util.Collection<AppInfo> |
getDeployedApplications() |
protected OpenEjbConfiguration |
getOpenEjbConfiguration() |
SecurityService |
getSecurityService()
Gets the system wide configured
SecurityService instance. |
TransactionManager |
getTransactionManager()
Gets the system wide configured
TransactionManager instance. |
void |
init(java.util.Properties props)
Initialize the assembler with the given properties.
|
java.util.List<BeanContext> |
initEjbs(java.lang.ClassLoader classLoader,
AppInfo appInfo,
AppContext appContext,
java.util.Set<Injection> injections,
java.util.List<BeanContext> allDeployments,
java.lang.String webappId) |
static void |
installNaming() |
static void |
installNaming(java.lang.String prefix) |
static void |
installNaming(java.lang.String prefix,
boolean clean) |
boolean |
isDeployed(java.lang.String path) |
static void |
logUnusedProperties(ObjectRecipe serviceRecipe,
ServiceInfo info) |
static void |
mergeServices(AppInfo appInfo) |
static ObjectRecipe |
prepareRecipe(ServiceInfo info) |
void |
removeContainer(java.lang.String containerId) |
void |
removeDeploymentListener(DeploymentListener deploymentListener) |
ResourceInfo |
removeResourceInfo(java.lang.String name) |
static void |
setContext(java.util.Map<java.lang.String,java.lang.Object> map) |
void |
startEjbs(boolean start,
java.util.List<BeanContext> allDeployments) |
checkImplementation
public static final java.lang.String OPENEJB_URL_PKG_PREFIX
public static final java.lang.String OPENEJB_JPA_DEPLOY_TIME_ENHANCEMENT_PROP
public static final java.lang.String PROPAGATE_APPLICATION_EXCEPTIONS
public static final java.lang.String TIMER_STORE_CLASS
public static final java.lang.String OPENEJB_TIMERS_ON
public static final java.lang.Class<?>[] VALIDATOR_FACTORY_INTERFACES
public static final java.lang.Class<?>[] VALIDATOR_INTERFACES
public final Logger logger
public final java.lang.String resourceDestroyTimeout
public final boolean threadStackOnTimeout
protected OpenEjbConfigurationFactory configFactory
protected SafeToolkit toolkit
protected OpenEjbConfiguration config
public Assembler()
public Assembler(JndiFactory jndiFactory)
public ContainerSystem getContainerSystem()
Assembler
ContainerSystem
instance.getContainerSystem
in interface Assembler
ContainerSystem
instancepublic TransactionManager getTransactionManager()
Assembler
TransactionManager
instance.getTransactionManager
in interface Assembler
TransactionManager
instance.public SecurityService getSecurityService()
Assembler
SecurityService
instance.getSecurityService
in interface Assembler
SecurityService
instance.public void addDeploymentListener(DeploymentListener deploymentListener)
public void removeDeploymentListener(DeploymentListener deploymentListener)
public void init(java.util.Properties props) throws OpenEJBException
Assembler
init
in interface Assembler
props
- initialization propertiesOpenEJBException
- if the initialization phase faces an exceptionpublic static void installNaming()
public static void installNaming(java.lang.String prefix)
public static void installNaming(java.lang.String prefix, boolean clean)
public static void setContext(java.util.Map<java.lang.String,java.lang.Object> map)
public static java.util.Map<java.lang.String,java.lang.Object> getContext()
public void build() throws OpenEJBException
Assembler
OpenEjbConfigurationFactory
and builds the ContainerSystem
and fire ContainerSystemPostCreate
event.build
in interface Assembler
OpenEJBException
- if the build phase faces an exceptionprotected OpenEjbConfiguration getOpenEjbConfiguration() throws OpenEJBException
OpenEJBException
public void buildContainerSystem(OpenEjbConfiguration configInfo) throws java.lang.Exception
CoreContainerSystem
using the
information from the OpenEjbConfiguration
object passed in.
This method performs the following actions(in order): 1 Assembles ProxyFactory 2 Assembles External JNDI Contexts 3 Assembles TransactionService 4 Assembles SecurityService 5 Assembles ConnectionManagers 6 Assembles Connectors 7 Assembles Containers 8 Assembles Applications
configInfo
- OpenEjbConfigurationjava.lang.Exception
- if there was a problem constructing the ContainerSystem.OpenEjbConfiguration
public AppInfo getAppInfo(java.lang.String path)
public boolean isDeployed(java.lang.String path)
public java.util.Collection<AppInfo> getDeployedApplications()
public AppContext createApplication(EjbJarInfo ejbJar) throws javax.naming.NamingException, java.io.IOException, OpenEJBException
javax.naming.NamingException
java.io.IOException
OpenEJBException
public AppContext createEjbJar(EjbJarInfo ejbJar) throws javax.naming.NamingException, java.io.IOException, OpenEJBException
javax.naming.NamingException
java.io.IOException
OpenEJBException
public AppContext createApplication(EjbJarInfo ejbJar, java.lang.ClassLoader classLoader) throws javax.naming.NamingException, java.io.IOException, OpenEJBException
javax.naming.NamingException
java.io.IOException
OpenEJBException
public AppContext createEjbJar(EjbJarInfo ejbJar, java.lang.ClassLoader classLoader) throws javax.naming.NamingException, java.io.IOException, OpenEJBException
javax.naming.NamingException
java.io.IOException
OpenEJBException
public AppContext createClient(ClientInfo clientInfo) throws javax.naming.NamingException, java.io.IOException, OpenEJBException
javax.naming.NamingException
java.io.IOException
OpenEJBException
public AppContext createClient(ClientInfo clientInfo, java.lang.ClassLoader classLoader) throws javax.naming.NamingException, java.io.IOException, OpenEJBException
javax.naming.NamingException
java.io.IOException
OpenEJBException
public AppContext createConnector(ConnectorInfo connectorInfo) throws javax.naming.NamingException, java.io.IOException, OpenEJBException
javax.naming.NamingException
java.io.IOException
OpenEJBException
public AppContext createConnector(ConnectorInfo connectorInfo, java.lang.ClassLoader classLoader) throws javax.naming.NamingException, java.io.IOException, OpenEJBException
javax.naming.NamingException
java.io.IOException
OpenEJBException
public AppContext createWebApp(WebAppInfo webAppInfo) throws javax.naming.NamingException, java.io.IOException, OpenEJBException
javax.naming.NamingException
java.io.IOException
OpenEJBException
public AppContext createWebApp(WebAppInfo webAppInfo, java.lang.ClassLoader classLoader) throws javax.naming.NamingException, java.io.IOException, OpenEJBException
javax.naming.NamingException
java.io.IOException
OpenEJBException
public AppContext createApplication(AppInfo appInfo) throws OpenEJBException, java.io.IOException, javax.naming.NamingException
OpenEJBException
java.io.IOException
javax.naming.NamingException
public AppContext createApplication(AppInfo appInfo, java.lang.ClassLoader classLoader) throws OpenEJBException, java.io.IOException, javax.naming.NamingException
OpenEJBException
java.io.IOException
javax.naming.NamingException
public static void mergeServices(AppInfo appInfo) throws java.net.URISyntaxException
java.net.URISyntaxException
public void bindGlobals(java.util.Map<java.lang.String,java.lang.Object> bindings) throws javax.naming.NamingException
javax.naming.NamingException
public java.util.List<BeanContext> initEjbs(java.lang.ClassLoader classLoader, AppInfo appInfo, AppContext appContext, java.util.Set<Injection> injections, java.util.List<BeanContext> allDeployments, java.lang.String webappId) throws OpenEJBException
OpenEJBException
public void startEjbs(boolean start, java.util.List<BeanContext> allDeployments) throws OpenEJBException
OpenEJBException
public void destroy()
Assembler
public ResourceInfo removeResourceInfo(java.lang.String name)
public void destroyApplication(java.lang.String filePath) throws UndeployException, NoSuchApplicationException
@Deprecated public void destroyApplication(AppContext appContext) throws UndeployException
UndeployException
public void destroyApplication(AppInfo appInfo) throws UndeployException
UndeployException
public java.lang.ClassLoader createAppClassLoader(AppInfo appInfo) throws OpenEJBException, java.io.IOException
OpenEJBException
java.io.IOException
public void createExternalContext(JndiContextInfo contextInfo) throws OpenEJBException
OpenEJBException
public void createContainer(ContainerInfo serviceInfo) throws OpenEJBException
OpenEJBException
public void removeContainer(java.lang.String containerId)
public void createService(ServiceInfo serviceInfo) throws OpenEJBException
OpenEJBException
public void createProxyFactory(ProxyFactoryInfo serviceInfo) throws OpenEJBException
OpenEJBException
@Deprecated public void createResource(ResourceInfo serviceInfo) throws OpenEJBException
OpenEJBException
public void createResource(java.util.Collection<ServiceInfo> infos, ResourceInfo serviceInfo) throws OpenEJBException
OpenEJBException
public void createConnectionManager(ConnectionManagerInfo serviceInfo) throws OpenEJBException
OpenEJBException
public void createSecurityService(SecurityServiceInfo serviceInfo) throws OpenEJBException
OpenEJBException
public void createTransactionManager(TransactionServiceInfo serviceInfo) throws OpenEJBException
OpenEJBException
public static void logUnusedProperties(ObjectRecipe serviceRecipe, ServiceInfo info)
public static ObjectRecipe prepareRecipe(ServiceInfo info)