org.openejb
Interface DeploymentInfo

All Known Implementing Classes:
DeploymentInfo

public interface DeploymentInfo

The DeploymentInfo object represents all the data needed by other parts of the container system for a bean that is deployed in the container system. Bean's that are deployed in the container system are refered to as bean deployments or deployments. Each bean deployment will have its own DeploymentInfo object to represent much of the information that was provided to the container by the bean's EJB XML deployment descriptor or by the Deployer at the time of deployment.

See Also:
DeploymentInfo

Field Summary
static java.lang.String AC_CREATE_EJBHOME
           
static byte BMP_ENTITY
          The constant that will be returned from the getComponentType method if this bean is an enitity bean with bean-managed persistence.
static byte CMP_ENTITY
          The constant that will be returned from the getComponentType method if this bean is a enitity bean with container-managed persistence.
static byte MESSAGE_DRIVEN
          The constant that will be returned from the getComponentType method if this bean is a message-driven bean.
static byte STATEFUL
          The constant that will be returned from the getComponentType method if this bean is a stateful session bean.
static byte STATELESS
          The constant that will be returned from the getComponentType method if this bean is a stateless session bean.
static byte TX_MANDITORY
          The constant that will be returned from the getTransactionAttribute method if the bean's method has the transaction attribute of Manditory.
static byte TX_NEVER
          The constant that will be returned from the getTransactionAttribute method if the bean's method has the transaction attribute of Never.
static byte TX_NOT_SUPPORTED
          The constant that will be returned from the getTransactionAttribute method if the bean's method has the transaction attribute of NotSupported.
static byte TX_REQUIRED
          The constant that will be returned from the getTransactionAttribute method if the bean's method has the transaction attribute of Required.
static byte TX_REQUIRES_NEW
          The constant that will be returned from the getTransactionAttribute method if the bean's method has the transaction attribute of RequiresNew.
static byte TX_SUPPORTS
          The constant that will be returned from the getTransactionAttribute method if the bean's method has the transaction attribute of Supports.
 
Method Summary
 java.lang.String[] getAuthorizedRoles(java.lang.reflect.Method method)
          Gets the roles that are authorised to execute this method.
 java.lang.String[] getAuthorizedRoles(java.lang.String action)
           
 java.lang.Class getBeanClass()
          Gets the bean's class definition.
 byte getComponentType()
          Gets the type of this bean component.
 Container getContainer()
          Gets the id of the container this deployed bean is in.
 java.lang.Object getDeploymentID()
          Gets the id of this bean deployment.
 java.lang.Class getHomeInterface()
          Gets the home interface for the bean deployment.
 java.lang.Class getLocalHomeInterface()
           
 java.lang.Class getLocalInterface()
           
 java.lang.Class getPrimaryKeyClass()
          Gets the Class type of the primary key for this bean deployment.
 java.lang.reflect.Field getPrimaryKeyField()
          Useful for Container-Managed Persistence (CMP) Entity beans with Simple Primary Keys.
 java.lang.Class getRemoteInterface()
          Gets the remote interface for the bean deployment.
 byte getTransactionAttribute(java.lang.reflect.Method method)
          Gets the transaction attribute that must be applied to this method when executing.
 boolean isBeanManagedTransaction()
          Returns true if this bean deployment has chosen bean-managed transaction demarcation.
 boolean isReentrant()
          Useful for Container-Managed Persistence (CMP) Entity beans.
 

Field Detail

TX_NEVER

static final byte TX_NEVER
The constant that will be returned from the getTransactionAttribute method if the bean's method has the transaction attribute of Never.

See Also:
getTransactionAttribute(Method), "See section 11.6.2.6 Never of the EJB 1.1 specification", Constant Field Values

TX_NOT_SUPPORTED

static final byte TX_NOT_SUPPORTED
The constant that will be returned from the getTransactionAttribute method if the bean's method has the transaction attribute of NotSupported.

See Also:
getTransactionAttribute(Method), "See section 11.6.2.1 NotSupported of the EJB 1.1 specification", Constant Field Values

TX_SUPPORTS

static final byte TX_SUPPORTS
The constant that will be returned from the getTransactionAttribute method if the bean's method has the transaction attribute of Supports.

See Also:
getTransactionAttribute(Method), "See section 11.6.2.3 Supports of the EJB 1.1 specification", Constant Field Values

TX_MANDITORY

static final byte TX_MANDITORY
The constant that will be returned from the getTransactionAttribute method if the bean's method has the transaction attribute of Manditory.

See Also:
getTransactionAttribute(Method), "See section 11.6.2.5 Manditory of the EJB 1.1 specification", Constant Field Values

TX_REQUIRED

static final byte TX_REQUIRED
The constant that will be returned from the getTransactionAttribute method if the bean's method has the transaction attribute of Required.

See Also:
getTransactionAttribute(Method), "See section 11.6.2.2 Required of the EJB 1.1 specification", Constant Field Values

TX_REQUIRES_NEW

static final byte TX_REQUIRES_NEW
The constant that will be returned from the getTransactionAttribute method if the bean's method has the transaction attribute of RequiresNew.

See Also:
getTransactionAttribute(Method), "See section 11.6.2.4 RequiresNew of the EJB 1.1 specification", Constant Field Values

STATEFUL

static final byte STATEFUL
The constant that will be returned from the getComponentType method if this bean is a stateful session bean.

See Also:
getComponentType(), Constant Field Values

STATELESS

static final byte STATELESS
The constant that will be returned from the getComponentType method if this bean is a stateless session bean.

See Also:
getComponentType(), Constant Field Values

BMP_ENTITY

static final byte BMP_ENTITY
The constant that will be returned from the getComponentType method if this bean is an enitity bean with bean-managed persistence.

See Also:
getComponentType(), Constant Field Values

CMP_ENTITY

static final byte CMP_ENTITY
The constant that will be returned from the getComponentType method if this bean is a enitity bean with container-managed persistence.

See Also:
getComponentType(), Constant Field Values

MESSAGE_DRIVEN

static final byte MESSAGE_DRIVEN
The constant that will be returned from the getComponentType method if this bean is a message-driven bean.

See Also:
getComponentType(), Constant Field Values

AC_CREATE_EJBHOME

static final java.lang.String AC_CREATE_EJBHOME
See Also:
Constant Field Values
Method Detail

getComponentType

byte getComponentType()
Gets the type of this bean component. Will return a STATEFUL, STATELESS, BMP_ENTITY or CMP_ENTITY.

Returns:
Returns STATEFUL, STATELESS, BMP_ENTITY or CMP_ENTITY.
See Also:
STATEFUL, STATELESS, BMP_ENTITY, CMP_ENTITY

getTransactionAttribute

byte getTransactionAttribute(java.lang.reflect.Method method)
Gets the transaction attribute that must be applied to this method when executing. The type can be anyone of TX_NEVER, TX_NOT_SUPPORTED, TX_SUPPORTS, TX_MANDITORY, TX_REQUIRED, TX_REQUIRES_NEW,

Parameters:
method - the bean's method for which transaction attribute information is needed
Returns:
the transaction constant that states the method's transaction attribute
See Also:
TX_NEVER, TX_NOT_SUPPORTED, TX_SUPPORTS, TX_MANDITORY, TX_REQUIRED, TX_REQUIRES_NEW

getAuthorizedRoles

java.lang.String[] getAuthorizedRoles(java.lang.reflect.Method method)
Gets the roles that are authorised to execute this method. Used primarily by the container to check the caller's rights to access and execute the specifed method.

Parameters:
method - the bean's method for which security information is needed
Returns:
a String array of the roles that are authorised to execute this method
See Also:
SecurityService.isCallerAuthorized(java.lang.Object, java.lang.String[])

getAuthorizedRoles

java.lang.String[] getAuthorizedRoles(java.lang.String action)

getContainer

Container getContainer()
Gets the id of the container this deployed bean is in.

Returns:
the id of the deployment's container.
See Also:
Container.getContainerID()

getDeploymentID

java.lang.Object getDeploymentID()
Gets the id of this bean deployment.

Returns:
the id of of this bean deployment

isBeanManagedTransaction

boolean isBeanManagedTransaction()
Returns true if this bean deployment has chosen bean-managed transaction demarcation. Returns false if the continer will be managing the bean's transactions.

Returns:
Returns true if this bean deployment is managing its own transactions.

getHomeInterface

java.lang.Class getHomeInterface()
Gets the home interface for the bean deployment. Used primarily by Servers integrating OpenEJB into their platform. Aids in implementing the bean's home interface.

Returns:
a Class object of the bean's home interface
See Also:
EJBHome

getLocalHomeInterface

java.lang.Class getLocalHomeInterface()

getLocalInterface

java.lang.Class getLocalInterface()

getRemoteInterface

java.lang.Class getRemoteInterface()
Gets the remote interface for the bean deployment. Used primarily by Servers integrating OpenEJB into their platform. Aids in implementing the bean's remote interface.

Returns:
a Class object of the bean's remote interface
See Also:
EJBObject

getBeanClass

java.lang.Class getBeanClass()
Gets the bean's class definition. Used primarily by containers to instantiate new instances of a bean.

Returns:
a Class object of the bean's class definition
See Also:
EnterpriseBean

getPrimaryKeyClass

java.lang.Class getPrimaryKeyClass()
Gets the Class type of the primary key for this bean deployment. Returns null if the bean is a type that does not need a primary key.

Returns:
the Class type of the bean's primary key or null if the bean doesn't need a primary key

getPrimaryKeyField

java.lang.reflect.Field getPrimaryKeyField()
Useful for Container-Managed Persistence (CMP) Entity beans with Simple Primary Keys. Gets the Field of the CMP entity bean class which corresponds to the simple primary key. Entity beans that have complex primary keys (keys with several fields) will not have a primkey-field.

Returns:
the EntityBean field that corresponds to the simple primary key. return null if the bean is not a CMP Entity bean with a simple Primary key

isReentrant

boolean isReentrant()
Useful for Container-Managed Persistence (CMP) Entity beans. Returns true if entity allows reentrant. Session bean types will always return false;

Returns:
true if entity bean allows reentrant access


Copyright © 1999-2011 OpenEJB. All Rights Reserved.