org.apache.openejb.assembler.classic
Class Assembler

java.lang.Object
  extended by org.apache.openejb.assembler.classic.AssemblerTool
      extended by org.apache.openejb.assembler.classic.Assembler
All Implemented Interfaces:
JndiConstants, Assembler

public class Assembler
extends AssemblerTool
implements Assembler, JndiConstants


Nested Class Summary
static class Assembler.DeploymentListenerObserver
           
static class Assembler.LazyResource
           
static class Assembler.ResourceAdapterReference
           
static class Assembler.ResourceInstance
           
 
Field Summary
protected  OpenEjbConfiguration config
           
protected  OpenEjbConfigurationFactory configFactory
           
 Logger logger
           
static String OPENEJB_JPA_DEPLOY_TIME_ENHANCEMENT_PROP
           
static String OPENEJB_TIMERS_ON
           
static String OPENEJB_URL_PKG_PREFIX
           
static String PROPAGATE_APPLICATION_EXCEPTIONS
           
static String TIMER_STORE_CLASS
           
protected  SafeToolkit toolkit
           
static Class<?>[] VALIDATOR_FACTORY_INTERFACES
           
static Class<?>[] VALIDATOR_INTERFACES
           
 
Fields inherited from class org.apache.openejb.assembler.classic.AssemblerTool
props, serviceInterfaces
 
Fields inherited from interface org.apache.openejb.JndiConstants
JAVA_OPENEJB_NAMING_CONTEXT, OPENEJB_RESOURCE_JNDI_PREFIX, PERSISTENCE_UNIT_NAMING_CONTEXT, VALIDATOR_FACTORY_NAMING_CONTEXT, VALIDATOR_NAMING_CONTEXT
 
Constructor Summary
Assembler()
           
Assembler(JndiFactory jndiFactory)
           
 
Method Summary
 void addDeploymentListener(DeploymentListener deploymentListener)
           
 void bindGlobals(Map<String,Object> bindings)
           
 void build()
           
 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.
 ClassLoader createAppClassLoader(AppInfo appInfo)
           
 AppContext createApplication(AppInfo appInfo)
           
 AppContext createApplication(AppInfo appInfo, ClassLoader classLoader)
           
 AppContext createApplication(EjbJarInfo ejbJar)
           
 AppContext createApplication(EjbJarInfo ejbJar, ClassLoader classLoader)
           
 AppContext createClient(ClientInfo clientInfo)
           
 AppContext createClient(ClientInfo clientInfo, ClassLoader classLoader)
           
 void createConnectionManager(ConnectionManagerInfo serviceInfo)
           
 AppContext createConnector(ConnectorInfo connectorInfo)
           
 AppContext createConnector(ConnectorInfo connectorInfo, ClassLoader classLoader)
           
 void createContainer(ContainerInfo serviceInfo)
           
 AppContext createEjbJar(EjbJarInfo ejbJar)
           
 AppContext createEjbJar(EjbJarInfo ejbJar, ClassLoader classLoader)
           
 void createExternalContext(JndiContextInfo contextInfo)
           
 void createProxyFactory(ProxyFactoryInfo serviceInfo)
           
 void createResource(ResourceInfo serviceInfo)
           
 void createSecurityService(SecurityServiceInfo serviceInfo)
           
 void createService(ServiceInfo serviceInfo)
           
 void createTransactionManager(TransactionServiceInfo serviceInfo)
           
 AppContext createWebApp(WebAppInfo webAppInfo)
           
 AppContext createWebApp(WebAppInfo webAppInfo, ClassLoader classLoader)
           
 void destroy()
           
 void destroyApplication(AppContext appContext)
           
 void destroyApplication(AppInfo appInfo)
           
 void destroyApplication(String filePath)
           
 ContainerSystem getContainerSystem()
           
static Map<String,Object> getContext()
           
 Collection<AppInfo> getDeployedApplications()
           
protected  OpenEjbConfiguration getOpenEjbConfiguration()
           
 SecurityService getSecurityService()
           
 TransactionManager getTransactionManager()
           
 void init(Properties props)
           
 List<BeanContext> initEjbs(ClassLoader classLoader, AppInfo appInfo, AppContext appContext, Set<Injection> injections, List<BeanContext> allDeployments, String webappId)
           
static void installNaming()
           
static void installNaming(String prefix)
           
static void installNaming(String prefix, boolean clean)
           
 boolean isDeployed(String path)
           
static void logUnusedProperties(org.apache.xbean.recipe.ObjectRecipe serviceRecipe, ServiceInfo info)
           
static void mergeServices(AppInfo appInfo)
           
static org.apache.xbean.recipe.ObjectRecipe prepareRecipe(ServiceInfo info)
           
 void removeContainer(String containerId)
           
 void removeDeploymentListener(DeploymentListener deploymentListener)
           
static void setContext(Map<String,Object> map)
           
 void startEjbs(boolean start, List<BeanContext> allDeployments)
           
 
Methods inherited from class org.apache.openejb.assembler.classic.AssemblerTool
checkImplementation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPENEJB_URL_PKG_PREFIX

public static final String OPENEJB_URL_PKG_PREFIX

logger

public final Logger logger

OPENEJB_JPA_DEPLOY_TIME_ENHANCEMENT_PROP

public static final String OPENEJB_JPA_DEPLOY_TIME_ENHANCEMENT_PROP
See Also:
Constant Field Values

PROPAGATE_APPLICATION_EXCEPTIONS

public static final String PROPAGATE_APPLICATION_EXCEPTIONS
See Also:
Constant Field Values

TIMER_STORE_CLASS

public static final String TIMER_STORE_CLASS
See Also:
Constant Field Values

OPENEJB_TIMERS_ON

public static final String OPENEJB_TIMERS_ON
See Also:
Constant Field Values

VALIDATOR_FACTORY_INTERFACES

public static final Class<?>[] VALIDATOR_FACTORY_INTERFACES

VALIDATOR_INTERFACES

public static final Class<?>[] VALIDATOR_INTERFACES

configFactory

protected OpenEjbConfigurationFactory configFactory

toolkit

protected SafeToolkit toolkit

config

protected OpenEjbConfiguration config
Constructor Detail

Assembler

public Assembler()

Assembler

public Assembler(JndiFactory jndiFactory)
Method Detail

getContainerSystem

public ContainerSystem getContainerSystem()
Specified by:
getContainerSystem in interface Assembler

getTransactionManager

public TransactionManager getTransactionManager()
Specified by:
getTransactionManager in interface Assembler

getSecurityService

public SecurityService getSecurityService()
Specified by:
getSecurityService in interface Assembler

addDeploymentListener

public void addDeploymentListener(DeploymentListener deploymentListener)

removeDeploymentListener

public void removeDeploymentListener(DeploymentListener deploymentListener)

init

public void init(Properties props)
          throws OpenEJBException
Specified by:
init in interface Assembler
Throws:
OpenEJBException

installNaming

public static void installNaming()

installNaming

public static void installNaming(String prefix)

installNaming

public static void installNaming(String prefix,
                                 boolean clean)

setContext

public static void setContext(Map<String,Object> map)

getContext

public static Map<String,Object> getContext()

build

public void build()
           throws OpenEJBException
Specified by:
build in interface Assembler
Throws:
OpenEJBException

getOpenEjbConfiguration

protected OpenEjbConfiguration getOpenEjbConfiguration()
                                                throws OpenEJBException
Throws:
OpenEJBException

buildContainerSystem

public void buildContainerSystem(OpenEjbConfiguration configInfo)
                          throws Exception
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.

This method leverage the other assemble and apply methods which can be used independently.

Assembles and returns the 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
 

Parameters:
configInfo - OpenEjbConfiguration
Throws:
Exception - if there was a problem constructing the ContainerSystem.
See Also:
OpenEjbConfiguration

isDeployed

public boolean isDeployed(String path)

getDeployedApplications

public Collection<AppInfo> getDeployedApplications()

createApplication

public AppContext createApplication(EjbJarInfo ejbJar)
                             throws NamingException,
                                    IOException,
                                    OpenEJBException
Throws:
NamingException
IOException
OpenEJBException

createEjbJar

public AppContext createEjbJar(EjbJarInfo ejbJar)
                        throws NamingException,
                               IOException,
                               OpenEJBException
Throws:
NamingException
IOException
OpenEJBException

createApplication

public AppContext createApplication(EjbJarInfo ejbJar,
                                    ClassLoader classLoader)
                             throws NamingException,
                                    IOException,
                                    OpenEJBException
Throws:
NamingException
IOException
OpenEJBException

createEjbJar

public AppContext createEjbJar(EjbJarInfo ejbJar,
                               ClassLoader classLoader)
                        throws NamingException,
                               IOException,
                               OpenEJBException
Throws:
NamingException
IOException
OpenEJBException

createClient

public AppContext createClient(ClientInfo clientInfo)
                        throws NamingException,
                               IOException,
                               OpenEJBException
Throws:
NamingException
IOException
OpenEJBException

createClient

public AppContext createClient(ClientInfo clientInfo,
                               ClassLoader classLoader)
                        throws NamingException,
                               IOException,
                               OpenEJBException
Throws:
NamingException
IOException
OpenEJBException

createConnector

public AppContext createConnector(ConnectorInfo connectorInfo)
                           throws NamingException,
                                  IOException,
                                  OpenEJBException
Throws:
NamingException
IOException
OpenEJBException

createConnector

public AppContext createConnector(ConnectorInfo connectorInfo,
                                  ClassLoader classLoader)
                           throws NamingException,
                                  IOException,
                                  OpenEJBException
Throws:
NamingException
IOException
OpenEJBException

createWebApp

public AppContext createWebApp(WebAppInfo webAppInfo)
                        throws NamingException,
                               IOException,
                               OpenEJBException
Throws:
NamingException
IOException
OpenEJBException

createWebApp

public AppContext createWebApp(WebAppInfo webAppInfo,
                               ClassLoader classLoader)
                        throws NamingException,
                               IOException,
                               OpenEJBException
Throws:
NamingException
IOException
OpenEJBException

createApplication

public AppContext createApplication(AppInfo appInfo)
                             throws OpenEJBException,
                                    IOException,
                                    NamingException
Throws:
OpenEJBException
IOException
NamingException

createApplication

public AppContext createApplication(AppInfo appInfo,
                                    ClassLoader classLoader)
                             throws OpenEJBException,
                                    IOException,
                                    NamingException
Throws:
OpenEJBException
IOException
NamingException

mergeServices

public static void mergeServices(AppInfo appInfo)
                          throws URISyntaxException
Throws:
URISyntaxException

bindGlobals

public void bindGlobals(Map<String,Object> bindings)
                 throws NamingException
Throws:
NamingException

initEjbs

public List<BeanContext> initEjbs(ClassLoader classLoader,
                                  AppInfo appInfo,
                                  AppContext appContext,
                                  Set<Injection> injections,
                                  List<BeanContext> allDeployments,
                                  String webappId)
                           throws OpenEJBException
Throws:
OpenEJBException

startEjbs

public void startEjbs(boolean start,
                      List<BeanContext> allDeployments)
               throws OpenEJBException
Throws:
OpenEJBException

destroy

public void destroy()
Specified by:
destroy in interface Assembler

destroyApplication

public void destroyApplication(String filePath)
                        throws UndeployException,
                               NoSuchApplicationException
Throws:
UndeployException
NoSuchApplicationException

destroyApplication

public void destroyApplication(AppContext appContext)
                        throws UndeployException
Throws:
UndeployException

destroyApplication

public void destroyApplication(AppInfo appInfo)
                        throws UndeployException
Throws:
UndeployException

createAppClassLoader

public ClassLoader createAppClassLoader(AppInfo appInfo)
                                 throws OpenEJBException,
                                        IOException
Throws:
OpenEJBException
IOException

createExternalContext

public void createExternalContext(JndiContextInfo contextInfo)
                           throws OpenEJBException
Throws:
OpenEJBException

createContainer

public void createContainer(ContainerInfo serviceInfo)
                     throws OpenEJBException
Throws:
OpenEJBException

removeContainer

public void removeContainer(String containerId)

createService

public void createService(ServiceInfo serviceInfo)
                   throws OpenEJBException
Throws:
OpenEJBException

createProxyFactory

public void createProxyFactory(ProxyFactoryInfo serviceInfo)
                        throws OpenEJBException
Throws:
OpenEJBException

createResource

public void createResource(ResourceInfo serviceInfo)
                    throws OpenEJBException
Throws:
OpenEJBException

createConnectionManager

public void createConnectionManager(ConnectionManagerInfo serviceInfo)
                             throws OpenEJBException
Throws:
OpenEJBException

createSecurityService

public void createSecurityService(SecurityServiceInfo serviceInfo)
                           throws OpenEJBException
Throws:
OpenEJBException

createTransactionManager

public void createTransactionManager(TransactionServiceInfo serviceInfo)
                              throws OpenEJBException
Throws:
OpenEJBException

logUnusedProperties

public static void logUnusedProperties(org.apache.xbean.recipe.ObjectRecipe serviceRecipe,
                                       ServiceInfo info)

prepareRecipe

public static org.apache.xbean.recipe.ObjectRecipe prepareRecipe(ServiceInfo info)


Copyright © 1999–2015 The Apache Software Foundation. All rights reserved.