<!-- -->
|
JavaTM 2 Platform Ent. Ed. v1.4 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES <!-- if(window==top) { document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> All Classes <noscript></noscript> | |||||||
SUMMARY:NESTED|FIELD|CONSTR|METHOD | DETAIL:FIELD|CONSTR|METHOD |
The EJBContext interface provides an instance with access to the container-provided runtime context of an enterprise Bean instance. EJBContext接口提供实例来访问企业Bean实例的容器提供的运行时上下文。
This interface is extended by the SessionContext, EntityContext, and MessageDrivenContext interfaces to provide additional methods specific to the enterprise interface Bean type. 该接口由SessionContext、EntityContext和MessageDrivenContext接口继承, 以提供企业接口Bean类型特有的方法。
<!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><!-- -->
Method Summary | |
Identity |
getCallerIdentity() Deprecated.Use Principal getCallerPrincipal() instead. 用Principal getCallerPrincipal()替代。 |
Principal |
getCallerPrincipal() Obtain the java.security.Principal that identifies the caller. 获得标识调用者的java.security.Principal。 |
EJBHome |
getEJBHome() Obtain the enterprise bean's remote home interface. 获得企业bean的远程home接口。 |
EJBLocalHome |
getEJBLocalHome() Obtain the enterprise bean's local home interface. 获得企业bean的本地home接口。 |
Properties |
getEnvironment() Deprecated.Use the JNDI naming context java:comp/env to access enterprise bean's environment. 使用JNDI命名上下文java:comp/env访问企业bean环境。 |
boolean |
getRollbackOnly() Test if the transaction has been marked for rollback only. 测试事务是否只被标记为回滚。 |
TimerService |
getTimerService() Get access to the EJB Timer Service. 获得对EJB Timer服务的访问。 |
UserTransaction |
getUserTransaction() Obtain the transaction demarcation interface. 获得事务边界接口。 |
boolean |
isCallerInRole(Identityrole) Deprecated.Use boolean isCallerInRole(String roleName) instead. 用boolean isCallerInRole(String roleName)替代。 |
boolean |
isCallerInRole(StringroleName) Test if the caller has a given security role. 测试调用者是否有指定的安全角色。 |
void |
setRollbackOnly() Mark the current transaction for rollback. 将当前事务标记为回滚。 |
<!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><!-- -->
Method Detail |
public EJBHome getEJBHome()
IllegalStateException
- if the enterprise bean does not have a remote home interface. 如果企业bean没有远程home接口时抛出。
public EJBLocalHome getEJBLocalHome()
IllegalStateException
- if the enterprise bean does not have a local home interface. 如果企业bean没有本地home接口时抛出。
public Properties getEnvironment()
Note: If the enterprise bean has no environment properties this method returns an empty java.util.Properties object. This method never returns null. 注意:如果企业bean没有环境属性,那么方法返回java.util.Properties对象,该方法不会返回null。
public Identity getCallerIdentity()
public Principal getCallerPrincipal()
IllegalStateException
- The Container throws the exception if the instance is not allowed to call this method. 如果实例不允许调用该方法时,容器抛出该异常。
public boolean isCallerInRole(Identityrole)
This method is deprecated in EJB 1.1. The enterprise bean should use the isCallerInRole(String roleName) method instead. 该方法在EJB 1.1中已不再支持。企业bean应当使用isCallerInRole(String roleName)方法替代。
role
- The java.security.Identity of the role to be tested. 用来测试的角色的java.security.Identity。
public boolean isCallerInRole(StringroleName)
roleName
- The name of the security role. The role must be one of the security roles that is defined in the deployment descriptor. 安全角色的名称。角色必须是在部署描述符中定义好的安全角色之一。
IllegalStateException
- The Container throws the exception if the instance is not allowed to call this method. 如果实例不允许调用该方法时,容器抛出该异常。
public UserTransaction getUserTransaction() throws IllegalStateException
IllegalStateException
- The Container throws the exception if the instance is not allowed to use the UserTransaction interface (i.e. the instance is of a bean with container-managed transactions). 如果实例不允许使用UserTransaction接口(即使用容器管理事务的bean实例),容器抛出该异常。
public void setRollbackOnly() throws IllegalStateException
IllegalStateException
- The Container throws the exception if the instance is not allowed to use this method (i.e. the instance is of a bean with bean-managed transactions). 如果实例不允许使用该方法(即使用bean管理事务的bean实例),容器抛出该异常。
public boolean getRollbackOnly() throws IllegalStateException
IllegalStateException
- The Container throws the exception if the instance is not allowed to use this method (i.e. the instance is of a bean with bean-managed transactions). 如果实例不允许使用该方法(即使用bean管理事务的bean实例),容器抛出该异常。
public TimerService getTimerService() throws IllegalStateException
IllegalStateException
- The Container throws the exception if the instance is not allowed to use this method (e.g. if the bean is a stateful session bean) 如果实例不允许使用该方法(比如bean是一个有状态会话bean),容器抛出该异常。
<!-- -->
|
JavaTM 2 Platform Ent. Ed. v1.4 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES <!-- if(window==top) { document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> All Classes <noscript></noscript> | |||||||
SUMMARY:NESTED|FIELD|CONSTR|METHOD | DETAIL:FIELD|CONSTR|METHOD |
Copyright 2003 Sun Microsystems, Inc. All rights reserved.