|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openejb.assembler.AssemblerTool
This class provides a set of utility methods for constructing various artifacts in the container system from org.openejb.assembler configuration classes. This class is used as an independent tool or is extended to create specialized assemblers as is the case with the org.openejb.assembler.Assembler which bootstraps the core container system extracting the configuration from a single XML file and building the container system from a complete graph of conf objects. The methods in this class are not interdependent and other then a SafeToolKit variable they are stateless (the class has no instance variables).
Assembler
,
Assembler
,
OpenEjbConfigurationFactory
Nested Class Summary | |
static class |
AssemblerTool.RoleMapping
This class encapsulates a mapping between a collection of logical roles and each of those roles equivalent physical security roles in the target environment. |
Field Summary | |
protected static HashMap |
codebases
|
static Class |
CONNECTION_MANAGER
|
static Class |
CONNECTOR
|
static Class |
CONTAINER
|
protected static Messages |
messages
|
static Class |
PROXY_FACTORY
|
static Class |
SECURITY_SERVICE
|
protected static SafeToolkit |
toolkit
|
static Class |
TRANSACTION_SERVICE
|
Constructor Summary | |
AssemblerTool()
|
Method Summary | |
void |
applyMethodPermissions(CoreDeploymentInfo deployment,
MethodPermissionInfo[] permissions)
This method applies a set of method permissions to a deploymentInfo object, so that the container can verify that a specific physical security role has access to a specific method. |
void |
applyMethodPermissions(CoreDeploymentInfo deployment,
MethodPermissionInfo[] permissions,
AssemblerTool.RoleMapping roleMapping)
This method applies a set of method permissions and RoleMapping to a deploymentInfo object, so that the container can verify that a specific physical security role has access to a specific method. |
void |
applyProperties(Object target,
Properties props)
This method will automatically attempt to invoke an init(Properties ) method on the target object, passing in the properties and an argument. |
void |
applyProxyFactory(IntraVmServerInfo ivmInfo)
This method constructs a ProxyFactory from teh IntraVmServerInfo conf class and automatically registers that ProxyFactory with the ProxyManager as the default proxy. |
MethodPermissionInfo |
applyRoleMappings(MethodPermissionInfo methodPermission,
AssemblerTool.RoleMapping roleMapping)
|
void |
applySecurityRoleReference(CoreDeploymentInfo deployment,
EnterpriseBeanInfo beanInfo,
AssemblerTool.RoleMapping roleMapping)
Maps the security role references used by enterprise beans to their associated physical in the target environment. |
void |
applyTransactionAttributes(CoreDeploymentInfo deploymentInfo,
MethodTransactionInfo[] mtis)
This method applies the transaction attributed described by the collection of MethodTransactionInfo object to the org.openejb.core.DeploymentInfo objects. |
javax.resource.spi.ConnectionManager |
assembleConnectionManager(ConnectionManagerInfo cmInfo)
This class will assemble a ConnectionManager instace from a ConnectionManagerInfo configuration object. |
Container |
assembleContainer(ContainerInfo containerInfo)
This method can construct a Container of any kind based on information in the ContainerInfo object: StatefulContainer, StatelessContainer, or EntityContainer In addition to constructing the containers, this method also constructs all the deployments declared in the containerInfo object and adds them to the containers It constructs the deployment Info object using the assembleDeploymentInfo method. |
void |
assembleContainers(ContainerSystem containerSystem,
ContainerSystemInfo containerSystemInfo)
When given a complete ContainerSystemInfo object, this method, will construct all the containers (entity, stateful, stateless) and add those containers to the ContainerSystem. |
CoreDeploymentInfo |
assembleDeploymentInfo(EnterpriseBeanInfo beanInfo)
This method assembles a org.openejb.core.DeploymentInfo object from a EnterpriseBeanInfo configuration object of anyone of three types: EntityBeanInfo, StatelessBeanInfo, or StatefulBeanInfo. |
javax.resource.spi.ManagedConnectionFactory |
assembleManagedConnectionFactory(ManagedConnectionFactoryInfo mngedConFactInfo)
This method will assemble a ManagedConnectionFactory instance from a ManagedConnecitonFactoryInfo configuration object. |
InitialContext |
assembleRemoteJndiContext(JndiContextInfo context)
|
SecurityService |
assembleSecurityService(SecurityServiceInfo securityInfo)
This method assembles the SecurityService from the SecuirtyServiceInfo configuration object. |
TransactionManager |
assembleTransactionManager(TransactionServiceInfo txInfo)
This method assembles the TransactionManager from the TransactionServiceInfo configuration object. |
protected void |
bindJndiBeanRefs(EnterpriseBeanInfo bean,
IvmContext root)
|
protected void |
bindJndiEnvEntries(EnterpriseBeanInfo bean,
IvmContext root)
|
protected void |
bindJndiResourceRefs(EnterpriseBeanInfo bean,
IvmContext root)
|
protected void |
checkImplementation(Class intrfce,
Class factory,
String serviceType,
String serviceName)
|
protected CoreDeploymentInfo |
createDeploymentInfoObject(Context root,
String did,
Class homeClass,
Class remoteClass,
Class beanClass,
Class pkClass,
byte componentType)
This method creates the DeploymentInfo class and sets the JNDI context at the same time. |
void |
handleException(String errorCode)
|
void |
handleException(String errorCode,
Object arg0)
|
void |
handleException(String errorCode,
Object arg0,
Object arg1)
|
void |
handleException(String errorCode,
Object arg0,
Object arg1,
Object arg2)
|
void |
handleException(String errorCode,
Object arg0,
Object arg1,
Object arg2,
Object arg3)
|
void |
logWarning(String errorCode)
|
void |
logWarning(String errorCode,
Object arg0)
|
void |
logWarning(String errorCode,
Object arg0,
Object arg1)
|
void |
logWarning(String errorCode,
Object arg0,
Object arg1,
Object arg2)
|
void |
logWarning(String errorCode,
Object arg0,
Object arg1,
Object arg2,
Object arg3)
|
protected String |
prefixForBinding(String name)
|
protected Method[] |
resolveMethodInfo(MethodInfo methodInfo,
CoreDeploymentInfo di)
Returns all the Method objects specified by a MethodInfo object for a specific bean deployment. |
protected void |
resolveMethods(Vector methods,
Class intrface,
MethodInfo mi)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Class PROXY_FACTORY
public static final Class SECURITY_SERVICE
public static final Class TRANSACTION_SERVICE
public static final Class CONTAINER
public static final Class CONNECTION_MANAGER
public static final Class CONNECTOR
protected static Messages messages
protected static SafeToolkit toolkit
protected static HashMap codebases
Constructor Detail |
public AssemblerTool()
Method Detail |
public void assembleContainers(ContainerSystem containerSystem, ContainerSystemInfo containerSystemInfo) throws Exception
ContainerSystem
using the
information from the ContainerManagerInfo
object passed in.
containerSystem
- the system to which the container should be added.containerSystemInfo
- defines the contain system,its containers, and deployments.
Exception
- if there was a problem constructing the ContainerManager.ContainerSystem
,
ContainerManagerInfo
public Container assembleContainer(ContainerInfo containerInfo) throws OpenEJBException
containerInfo
- describes a Container and its deployments.
OpenEJBException
ContainerInfo
public InitialContext assembleRemoteJndiContext(JndiContextInfo context) throws OpenEJBException
OpenEJBException
public CoreDeploymentInfo assembleDeploymentInfo(EnterpriseBeanInfo beanInfo) throws SystemException, OpenEJBException
beanInfo
- describes the enterprise bean deployment to be assembled.
SystemException
OpenEJBException
protected CoreDeploymentInfo createDeploymentInfoObject(Context root, String did, Class homeClass, Class remoteClass, Class beanClass, Class pkClass, byte componentType) throws SystemException
SystemException
public javax.resource.spi.ConnectionManager assembleConnectionManager(ConnectionManagerInfo cmInfo) throws OpenEJBException, Exception
cmInfo
- describes the ConnectionManager to be assembled.
OpenEJBException
Exception
ConnectionManagerInfo
public javax.resource.spi.ManagedConnectionFactory assembleManagedConnectionFactory(ManagedConnectionFactoryInfo mngedConFactInfo) throws OpenEJBException, Exception
mngedConFactInfo
- describes the the ManagedConnectionFactory to be created.
OpenEJBException
Exception
ManagedConnectionFactoryInfo
public SecurityService assembleSecurityService(SecurityServiceInfo securityInfo) throws OpenEJBException, Exception
securityInfo
- describes the SecurityService to be assembled.
OpenEJBException
Exception
SecurityServiceInfo
public TransactionManager assembleTransactionManager(TransactionServiceInfo txInfo) throws OpenEJBException, Exception
txInfo
- describes the TransactionService to be assembled. The Transaction
manager is obtained from this service.
OpenEJBException
Exception
TransactionServiceInfo
public void applyProxyFactory(IntraVmServerInfo ivmInfo) throws OpenEJBException
ivmInfo
- the IntraVmServerInfo configuration object that describes the ProxyFactory
OpenEJBException
IntraVmServerInfo
public void applyProperties(Object target, Properties props) throws InvocationTargetException, IllegalAccessException, NoSuchMethodException
target
- the object that will have its init(Properties) method invokedprops
-
InvocationTargetException
IllegalAccessException
NoSuchMethodException
public void applyTransactionAttributes(CoreDeploymentInfo deploymentInfo, MethodTransactionInfo[] mtis)
deploymentInfo
- the deployment to which the transaction attributes are appliedMethodTransactionInfo
public void applySecurityRoleReference(CoreDeploymentInfo deployment, EnterpriseBeanInfo beanInfo, AssemblerTool.RoleMapping roleMapping)
deployment
- the DeploymentInfo object to which the mapping should be applied.beanInfo
- the EnterpiseBeanInfo object which contains the securityRoleReferencesroleMapping
- the RoleMapping object which contains the logical to physical security roles.EnterpriseBeanInfo
,
AssemblerTool.RoleMapping
public void applyMethodPermissions(CoreDeploymentInfo deployment, MethodPermissionInfo[] permissions)
deployment
- the DeploymentInfo object to which the Method Permissions should be applied.permissions
- the Method Permission to be applied to the deployment.MethodPermissionInfo
public void applyMethodPermissions(CoreDeploymentInfo deployment, MethodPermissionInfo[] permissions, AssemblerTool.RoleMapping roleMapping)
deployment
- the DeploymentInfo object to which the Method Permissions should be applied.permissions
- the Method Permission to be applied to the deployment.roleMapping
- the encapsulation of logical roles and their corresponding physical role mappings.MethodPermissionInfo
,
AssemblerTool.RoleMapping
public MethodPermissionInfo applyRoleMappings(MethodPermissionInfo methodPermission, AssemblerTool.RoleMapping roleMapping)
protected Method[] resolveMethodInfo(MethodInfo methodInfo, CoreDeploymentInfo di)
CoreDeploymentInfo
,
MethodInfo
protected void resolveMethods(Vector methods, Class intrface, MethodInfo mi) throws SecurityException
SecurityException
CoreDeploymentInfo
,
MethodInfo
protected void bindJndiResourceRefs(EnterpriseBeanInfo bean, IvmContext root) throws OpenEJBException
OpenEJBException
protected void bindJndiBeanRefs(EnterpriseBeanInfo bean, IvmContext root)
protected void bindJndiEnvEntries(EnterpriseBeanInfo bean, IvmContext root)
protected String prefixForBinding(String name)
protected void checkImplementation(Class intrfce, Class factory, String serviceType, String serviceName) throws OpenEJBException
OpenEJBException
public void handleException(String errorCode, Object arg0, Object arg1, Object arg2, Object arg3) throws OpenEJBException
OpenEJBException
public void handleException(String errorCode, Object arg0, Object arg1, Object arg2) throws OpenEJBException
OpenEJBException
public void handleException(String errorCode, Object arg0, Object arg1) throws OpenEJBException
OpenEJBException
public void handleException(String errorCode, Object arg0) throws OpenEJBException
OpenEJBException
public void handleException(String errorCode) throws OpenEJBException
OpenEJBException
public void logWarning(String errorCode, Object arg0, Object arg1, Object arg2, Object arg3)
public void logWarning(String errorCode, Object arg0, Object arg1, Object arg2)
public void logWarning(String errorCode, Object arg0, Object arg1)
public void logWarning(String errorCode, Object arg0)
public void logWarning(String errorCode)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |