org.openejb.assembler
Interface DeploymentInfo

All Known Implementing Classes:
CoreDeploymentInfo

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.


Field Summary
static String AC_CREATE_EJBHOME
           
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
 Class getBeanClass()
          Gets the bean's class definition.
 int getComponentType()
          Gets the type of this bean component.
 Container getContainer()
          Gets the id of the container this deployed bean is in.
 String getDeploymentID()
          Gets the id of this bean deployment.
 Class getHomeInterface()
          Gets the home interface for the bean deployment.
 Class getPrimaryKeyClass()
          Gets the Class type of the primary key for this bean deployment.
 Class getRemoteInterface()
          Gets the remote interface for the bean deployment.
 byte getTransactionAttribute(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

public 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

public 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

public 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

public 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

public 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

public 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

AC_CREATE_EJBHOME

public static final String AC_CREATE_EJBHOME
See Also:
Constant Field Values
Method Detail

getComponentType

public int 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.

getTransactionAttribute

public byte getTransactionAttribute(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

getContainer

public 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

public String getDeploymentID()
Gets the id of this bean deployment.

Returns:
the id of of this bean deployment

isBeanManagedTransaction

public 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

public 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

getRemoteInterface

public 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

public 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

public 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

isReentrant

public 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-2006 OpenEJB. All Rights Reserved.