Book Home Enterprise JavaBeans Search this book

A.2. Package: javax.ejb.deployment (EJB 1.0 Only)

The javax.ejb.deployment package contains a number of classes used to deploy enterprise beans in a container. These classes provide mechanisms to tell the container about the bean's properties, define new properties at runtime, and define the relationship between the bean and its container.

This package has disappeared entirely from EJB 1.1, including all of its classes.

A.2.1. AccessControlEntry

A serialized object of this class is used to specify the security identities that are allowed to access the bean's methods. It may specify default access for the entire bean or access specific to one method.

public class javax.ejb.deployment.AccessControlEntry 
    extends java.lang.Object
    implements java.io.Serializable
{
    public AccessControlEntry();
    public AccessControlEntry(Method method);
    public AccessControlEntry(Method method, Identity identities[]);
    public Identity[] getAllowedIdentities();
    public Identity getAllowedIdentities(int index);
    public Method getMethod();
    public void setAllowedIdentities(Identity values[]);
    public void setAllowedIdentities(int index, Identity value);
    public void setMethod(Method value);
}

A.2.2. ControlDescriptor

A serialized object of this class is used to specify transactional and runAs attributes associated with the bean's methods. It may specify default attributes for the entire bean or attributes specific to one method.

public class javax.ejb.deployment.ControlDescriptor  
    extends java.lang.Object
    implements java.io.Serializable
{
    public final static int CLIENT_IDENTITY;
    public final static int SPECIFIED_IDENTITY;
    public final static int SYSTEM_IDENTITY;
    public final static int TRANSACTION_READ_COMMITTED;
    public final static int TRANSACTION_READ_UNCOMMITTED;
    public final static int TRANSACTION_REPEATABLE_READ;
    public final static int TRANSACTION_SERIALIZABLE;
    public final static int TX_BEAN_MANAGED;
    public final static int TX_MANDATORY;
    public final static int TX_NOT_SUPPORTED;
    public final static int TX_REQUIRED;
    public final static int TX_REQUIRES_NEW;
    public final static int TX_SUPPORTS;

    public ControlDescriptor();
    public ControlDescriptor(Method method);
    public int getIsolationLevel();
    public Method getMethod();
    public Identity getRunAsIdentity();
    public int getRunAsMode();
    public int getTransactionAttribute();
    public void setIsolationLevel(int value);
    public void setMethod(Method value);
    public void setRunAsIdentity(Identity value);
    public void setRunAsMode(int value);
    public void setTransactionAttribute(int value);
}

A.2.3. DeploymentDescriptor

A serialized object of this class is used to describe the bean to the container at deployment time. This object contains all the AccessControlEntry and ControlDescriptor objects for the bean. In addition, it contains descriptions of the remote interface, the home interface, and the bean class names, as well as the name binding and version number of the bean. This class serves as the base class for the EntityDescriptor and the SessionDescriptor classes, which are used by EntityBean and SessionBean types, respectively.

public class javax.ejb.deployment.DeploymentDescriptor  
    extends java.lang.Object
    implements java.io.Serializable
{
    protected int versionNumber;
    public DeploymentDescriptor();
    public AccessControlEntry[] getAccessControlEntries();
    public AccessControlEntry getAccessControlEntries(int index);
    public Name getBeanHomeName();
    public ControlDescriptor[] getControlDescriptors();
    public ControlDescriptor getControlDescriptors(int index);
    public String getEnterpriseBeanClassName();
    public Properties getEnvironmentProperties();
    public String getHomeInterfaceClassName();
    public boolean getReentrant();
    public String getRemoteInterfaceClassName();
    public boolean isReentrant();
    public void setAccessControlEntries(AccessControlEntry values[]);
    public void setAccessControlEntries(int i, AccessControlEntry v);
    public void setBeanHomeName(Name value);
    public void setControlDescriptors(ControlDescriptor value[]);
    public void setControlDescriptors(int index, ControlDescriptor value);
    public void setEnterpriseBeanClassName(String value);
    public void setEnvironmentProperties(Properties value);
    public void setHomeInterfaceClassName(String value);
    public void setReentrant(boolean value);
    public void setRemoteInterfaceClassName(String value);
}

A.2.4. EntityDescriptor

This class extends the DeploymentDescriptor class, providing methods specific to EntityBeans. Container-managed fields and the primary key class for the bean can be set, in addition to all the values set using the DeploymentDescriptor class.

public class javax.ejb.deployment.EntityDescriptor
    extends javax.ejb.deployment.DeploymentDescriptor
{
    public EntityDescriptor();
    public Field[] getContainerManagedFields();
    public Field getContainerManagedFields(int index);
    public String getPrimaryKeyClassName();
    public void setContainerManagedFields(Field values[]);
    public void setContainerManagedFields(int index, Field value);
    public void setPrimaryKeyClassName(String value);
}

A.2.5. SessionDescriptor

This class extends the DeploymentDescriptor class, providing methods specific to SessionBeans. The session timeout and state management type can be set, in addition to all the values set using the DeploymentDescriptor class.

public class javax.ejb.deployment.SessionDescriptor  
    extends javax.ejb.deployment.DeploymentDescriptor
{
    public final static int STATEFUL_SESSION;
    public final static int STATELESS_SESSION;

    public SessionDescriptor();
    public int getSessionTimeout();
    public int getStateManagementType();
    public void setSessionTimeout(int value);
    public void setStateManagementType(int value);
}


Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.

This HTML Help has been published using the chm2web software.