|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openejb.alt.assembler.classic.AssemblerTool
This class provides a set of utility methods for constructing various artifacts in the container system from org.openejb.alt.assembler.classic 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.alt.assembler.classic.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
Inner 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 java.util.HashMap |
codebases
|
static java.lang.Class |
CONNECTION_MANAGER
|
static java.lang.Class |
CONNECTOR
|
static java.lang.Class |
CONTAINER
|
static java.lang.Class |
PROXY_FACTORY
|
static java.lang.Class |
SECURITY_SERVICE
|
protected static SafeToolkit |
toolkit
|
static java.lang.Class |
TRANSACTION_SERVICE
|
Constructor Summary | |
AssemblerTool()
|
Method Summary | |
(package private) static void |
|
void |
applyMethodPermissions(DeploymentInfo 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(DeploymentInfo 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(java.lang.Object target,
java.util.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(DeploymentInfo 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(DeploymentInfo 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. |
DeploymentInfo |
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. |
javax.naming.InitialContext |
assembleRemoteJndiContext(JndiContextInfo context)
|
SecurityService |
assembleSecurityService(SecurityServiceInfo securityInfo)
This method assembles the SecurityService from the SecuirtyServiceInfo configuration object. |
javax.transaction.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(java.lang.Class intrfce,
java.lang.Class factory,
java.lang.String serviceType,
java.lang.String serviceName)
|
protected DeploymentInfo |
createDeploymentInfoObject(javax.naming.Context root,
java.lang.Object did,
java.lang.Class homeClass,
java.lang.Class remoteClass,
java.lang.Class beanClass,
java.lang.Class pkClass,
byte componentType)
This method creates the DeploymentInfo class and sets the JNDI context at the same time. |
void |
handleException(java.lang.String errorCode)
|
void |
handleException(java.lang.String errorCode,
java.lang.Object arg0)
|
void |
handleException(java.lang.String errorCode,
java.lang.Object arg0,
java.lang.Object arg1)
|
void |
handleException(java.lang.String errorCode,
java.lang.Object arg0,
java.lang.Object arg1,
java.lang.Object arg2)
|
void |
handleException(java.lang.String errorCode,
java.lang.Object arg0,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3)
|
void |
logWarning(java.lang.String errorCode)
|
void |
logWarning(java.lang.String errorCode,
java.lang.Object arg0)
|
void |
logWarning(java.lang.String errorCode,
java.lang.Object arg0,
java.lang.Object arg1)
|
void |
logWarning(java.lang.String errorCode,
java.lang.Object arg0,
java.lang.Object arg1,
java.lang.Object arg2)
|
void |
logWarning(java.lang.String errorCode,
java.lang.Object arg0,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3)
|
protected java.lang.String |
prefixForBinding(java.lang.String name)
|
protected java.lang.reflect.Method[] |
resolveMethodInfo(MethodInfo methodInfo,
DeploymentInfo di)
Returns all the Method objects specified by a MethodInfo object for a specific bean deployment. |
protected void |
resolveMethods(java.util.Vector methods,
java.lang.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 java.lang.Class PROXY_FACTORY
public static final java.lang.Class SECURITY_SERVICE
public static final java.lang.Class TRANSACTION_SERVICE
public static final java.lang.Class CONTAINER
public static final java.lang.Class CONNECTION_MANAGER
public static final java.lang.Class CONNECTOR
protected static SafeToolkit toolkit
protected static java.util.HashMap codebases
Constructor Detail |
public AssemblerTool()
Method Detail |
static void()
public void assembleContainers(ContainerSystem containerSystem, ContainerSystemInfo containerSystemInfo) throws java.lang.Exception
ContainerManager
for the 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.throws
- Exception if there was a problem constructing the ContainerManager.java.lang.Exception
- org.openejb.core.ContainerManager
,
ContainerSystem
,
ContainerManagerInfo
public Container assembleContainer(ContainerInfo containerInfo) throws OpenEJBException
containerInfo
- describes a Container and its deployments.ContainerInfo
,
public javax.naming.InitialContext assembleRemoteJndiContext(JndiContextInfo context) throws OpenEJBException
public DeploymentInfo assembleDeploymentInfo(EnterpriseBeanInfo beanInfo) throws SystemException, OpenEJBException
beanInfo
- describes the enterprise bean deployment to be assembled.the
- DeploymentInfo object that was assembled from the beanInfo configuration.protected DeploymentInfo createDeploymentInfoObject(javax.naming.Context root, java.lang.Object did, java.lang.Class homeClass, java.lang.Class remoteClass, java.lang.Class beanClass, java.lang.Class pkClass, byte componentType) throws SystemException
public javax.resource.spi.ConnectionManager assembleConnectionManager(ConnectionManagerInfo cmInfo) throws OpenEJBException, java.lang.Exception
cmInfo
- describes the ConnectionManager to be assembled.ConnectionManagerInfo
public javax.resource.spi.ManagedConnectionFactory assembleManagedConnectionFactory(ManagedConnectionFactoryInfo mngedConFactInfo) throws OpenEJBException, java.lang.Exception
mngedConFactInfo
- describes the the ManagedConnectionFactory to be created.ManagedConnectionFactoryInfo
public SecurityService assembleSecurityService(SecurityServiceInfo securityInfo) throws OpenEJBException, java.lang.Exception
securityInfo
- describes the SecurityService to be assembled.SecurityServiceInfo
public javax.transaction.TransactionManager assembleTransactionManager(TransactionServiceInfo txInfo) throws OpenEJBException, java.lang.Exception
txInfo
- describes the TransactionService to be assembled. The Transaction
manager is obtained from this service.TransactionServiceInfo
public void applyProxyFactory(IntraVmServerInfo ivmInfo) throws OpenEJBException
ivmInfo
- the IntraVmServerInfo configuration object that describes the ProxyFactoryIntraVmServerInfo
public void applyProperties(java.lang.Object target, java.util.Properties props) throws java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException, java.lang.NoSuchMethodException
target
- the object that will have its init(Properties) method invokedthe
- properties argument for the init(Properties) method.public void applyTransactionAttributes(DeploymentInfo deploymentInfo, MethodTransactionInfo[] mtis)
deploymentInfo
- the deployment to which the transaction attributes are appliedMethodTransactionInfo
- describes the transaction attributes for the enterprise bean(s)MethodTransactionInfo
,
org.openejb.core.DeploymentInfo.setMethodTransactionAttribute()
public void applySecurityRoleReference(DeploymentInfo 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
,
org.openejb.core.DepoymentInfo.addSecurityRoleReference()
public void applyMethodPermissions(DeploymentInfo 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
,
org.openejb.core.DeploymentInfo.appendMethodPermissions()
public void applyMethodPermissions(DeploymentInfo 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
,
org.openejb.core.DeploymentInfo.appendMethodPermissions()
public MethodPermissionInfo applyRoleMappings(MethodPermissionInfo methodPermission, AssemblerTool.RoleMapping roleMapping)
protected java.lang.reflect.Method[] resolveMethodInfo(MethodInfo methodInfo, DeploymentInfo di)
DeploymentInfo
,
MethodInfo
protected void resolveMethods(java.util.Vector methods, java.lang.Class intrface, MethodInfo mi) throws java.lang.SecurityException
DeploymentInfo
,
MethodInfo
protected void bindJndiResourceRefs(EnterpriseBeanInfo bean, IvmContext root) throws OpenEJBException
protected void bindJndiBeanRefs(EnterpriseBeanInfo bean, IvmContext root)
protected void bindJndiEnvEntries(EnterpriseBeanInfo bean, IvmContext root)
protected java.lang.String prefixForBinding(java.lang.String name)
protected void checkImplementation(java.lang.Class intrfce, java.lang.Class factory, java.lang.String serviceType, java.lang.String serviceName) throws OpenEJBException
public void handleException(java.lang.String errorCode, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3) throws OpenEJBException
public void handleException(java.lang.String errorCode, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2) throws OpenEJBException
public void handleException(java.lang.String errorCode, java.lang.Object arg0, java.lang.Object arg1) throws OpenEJBException
public void handleException(java.lang.String errorCode, java.lang.Object arg0) throws OpenEJBException
public void handleException(java.lang.String errorCode) throws OpenEJBException
public void logWarning(java.lang.String errorCode, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
public void logWarning(java.lang.String errorCode, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2)
public void logWarning(java.lang.String errorCode, java.lang.Object arg0, java.lang.Object arg1)
public void logWarning(java.lang.String errorCode, java.lang.Object arg0)
public void logWarning(java.lang.String errorCode)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |