|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openejb.alt.assembler.classic.AssemblerTool
public class 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
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 java.util.HashMap |
codebases
|
static java.lang.Class |
CONNECTION_MANAGER
|
static java.lang.Class |
CONNECTOR
|
protected static Messages |
messages
A mutable static field could be changed by malicious code or by accident from another package. |
protected java.util.Properties |
props
|
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 | |
---|---|
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. |
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. |
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 |
checkImplementation(java.lang.Class intrfce,
java.lang.Class factory,
java.lang.String serviceType,
java.lang.String serviceName)
|
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.reflect.Method[] |
resolveMethodInfo(MethodInfo methodInfo,
DeploymentInfo di)
Returns all the Method objects specified by a MethodInfo object for a specific bean deployment. |
protected static 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 CONNECTION_MANAGER
public static final java.lang.Class CONNECTOR
protected static final Messages messages
protected static final SafeToolkit toolkit
protected static final java.util.HashMap codebases
protected java.util.Properties props
Constructor Detail |
---|
public AssemblerTool()
Method Detail |
---|
public void assembleContainers(ContainerSystem containerSystem, ContainerSystemInfo containerSystemInfo) throws java.lang.Exception
containerSystem
- the system to which the container should be added.containerSystemInfo
- defines the contain system,its containers, and deployments.
java.lang.Exception
- if there was a problem constructing the ContainerManager.
java.lang.Exception
ContainerSystem
,
ContainerManagerInfo
public javax.naming.InitialContext assembleRemoteJndiContext(JndiContextInfo context) throws OpenEJBException
OpenEJBException
public javax.resource.spi.ConnectionManager assembleConnectionManager(ConnectionManagerInfo cmInfo) throws OpenEJBException, java.lang.Exception
cmInfo
- describes the ConnectionManager to be assembled.
OpenEJBException
java.lang.Exception
ConnectionManagerInfo
public javax.resource.spi.ManagedConnectionFactory assembleManagedConnectionFactory(ManagedConnectionFactoryInfo mngedConFactInfo) throws OpenEJBException, java.lang.Exception
mngedConFactInfo
- describes the the ManagedConnectionFactory to be created.
OpenEJBException
java.lang.Exception
ManagedConnectionFactoryInfo
public SecurityService assembleSecurityService(SecurityServiceInfo securityInfo) throws OpenEJBException, java.lang.Exception
securityInfo
- describes the SecurityService to be assembled.
OpenEJBException
java.lang.Exception
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.
OpenEJBException
java.lang.Exception
TransactionServiceInfo
public void applyProxyFactory(IntraVmServerInfo ivmInfo) throws OpenEJBException
ivmInfo
- the IntraVmServerInfo configuration object that describes the ProxyFactory
OpenEJBException
IntraVmServerInfo
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 invokedprops
-
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
java.lang.NoSuchMethodException
public void applyTransactionAttributes(DeploymentInfo deploymentInfo, MethodTransactionInfo[] mtis)
deploymentInfo
- the deployment to which the transaction attributes are appliedmtis
- describes the transaction attributes for the enterprise bean(s)MethodTransactionInfo
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
,
DeploymentInfo.addSecurityRoleReference(String, String[])
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
,
DeploymentInfo.appendMethodPermissions(java.lang.reflect.Method, String[])
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
,
DeploymentInfo.appendMethodPermissions(java.lang.reflect.Method, String[])
public MethodPermissionInfo applyRoleMappings(MethodPermissionInfo methodPermission, AssemblerTool.RoleMapping roleMapping)
protected java.lang.reflect.Method[] resolveMethodInfo(MethodInfo methodInfo, DeploymentInfo di)
DeploymentInfo
,
MethodInfo
protected static void resolveMethods(java.util.Vector methods, java.lang.Class intrface, MethodInfo mi) throws java.lang.SecurityException
java.lang.SecurityException
DeploymentInfo
,
MethodInfo
protected void checkImplementation(java.lang.Class intrfce, java.lang.Class factory, java.lang.String serviceType, java.lang.String serviceName) throws OpenEJBException
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
OpenEJBException
public void handleException(java.lang.String errorCode, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2) throws OpenEJBException
OpenEJBException
public void handleException(java.lang.String errorCode, java.lang.Object arg0, java.lang.Object arg1) throws OpenEJBException
OpenEJBException
public void handleException(java.lang.String errorCode, java.lang.Object arg0) throws OpenEJBException
OpenEJBException
public void handleException(java.lang.String errorCode) throws OpenEJBException
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: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |