<!-- -->
|
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 EntityBean interface is implemented by every entity enterprise Bean class. The container uses the EntityBean methods to notify the enterprise Bean instances of the instance's life cycle events. 每一个实体企业Bean的类都应该实现EntityBean接口。容器使用EntityBean的方法 将实例的生命周期事件通知企业Bean。
<!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><!-- -->
Method Summary | |
void |
ejbActivate() A container invokes this method when the instance is taken out of the pool of available instances to become associated with a specific EJB object. 容器调用该方法,使实例由可用实例池中移出,与指定EJB对象关联。 |
void |
ejbLoad() A container invokes this method to instruct the instance to synchronize its state by loading it state from the underlying database. 容器调用该方法,指示实例通过从底层数据库加载来同步其状态。 |
void |
ejbPassivate() A container invokes this method on an instance before the instance becomes disassociated with a specific EJB object. 容器调用该方法,使实例与指定EJB对象解除关联。 |
void |
ejbRemove() A container invokes this method before it removes the EJB object that is currently associated with the instance. 容器调用该方法来删除当前与实例关联的EJB对象。 |
void |
ejbStore() A container invokes this method to instruct the instance to synchronize its state by storing it to the underlying database. 容器调用该方法,指示实例通过保存至底层数据库来同步其状态。 |
void |
setEntityContext(EntityContextctx) Set the associated entity context. 设置关联实体bean上下文。 |
void |
unsetEntityContext() Unset the associated entity context. 撤销关联实体bean上下文。 |
<!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><!-- -->
Method Detail |
public void setEntityContext(EntityContextctx) throws EJBException, RemoteException
This method is called in an unspecified transaction context. 方法不在指定事务上下文中调用。
ctx
- An EntityContext interface for the instance. The instance should store the reference to the context in an instance variable. 实例的EntityContext接口。实例应当在实例变量中保存上下文对象的引用。
EJBException
- Thrown by the method to indicate a failure caused by a system-level error. 方法抛出该异常表示一个由系统级错误引起的失败。
RemoteException
- This exception is defined in the method signature to provide backward compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans written for the EJB 1.1 specification should throw the javax.ejb.EJBException instead of this exception. Enterprise beans written for the EJB2.0 and higher specifications must throw the javax.ejb.EJBException instead of this exception. 方法签名中定义该异常是为了对符合EJB 1.0规范的企业bean提供向下兼容。 符合EJB 1.1规范的企业bean应该抛出javax.ejb.EJBException来代替该异常。 符合EJB 2.0或更高版本规范的企业bean也应该抛出javax.ejb.EJBException 来代替该异常。
public void unsetEntityContext() throws EJBException, RemoteException
This is the last method that the container invokes on the instance. The Java garbage collector will eventually invoke the finalize() method on the instance. 这是容器针对实例调用的最终方法。Java垃圾收集器最终将调用实例的finalize()方法。
This method is called in an unspecified transaction context. 方法不在指定事务上下文中调用。
EJBException
- Thrown by the method to indicate a failure caused by a system-level error. 方法抛出该异常表示一个由系统级错误引起的失败。
RemoteException
- This exception is defined in the method signature to provide backward compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans written for the EJB 1.1 specification should throw the javax.ejb.EJBException instead of this exception. Enterprise beans written for the EJB2.0 and higher specifications must throw the javax.ejb.EJBException instead of this exception. 方法签名中定义该异常是为了对符合EJB 1.0规范的企业bean提供向下兼容。 符合EJB 1.1规范的企业bean应该抛出javax.ejb.EJBException来代替该异常。 符合EJB 2.0或更高版本规范的企业bean也应该抛出javax.ejb.EJBException 来代替该异常。
public void ejbRemove() throws RemoveException, EJBException, RemoteException
This method is called in the transaction context of the remove operation. 方法在删除操作的事务上下文中调用。
RemoveException
- The enterprise Bean does not allow destruction of the object. 企业Bean不允许清除该对象。
EJBException
- Thrown by the method to indicate a failure caused by a system-level error. 方法抛出该异常表示一个由系统级错误引起的失败。
RemoteException
- This exception is defined in the method signature to provide backward compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans written for the EJB 1.1 specification should throw the javax.ejb.EJBException instead of this exception. Enterprise beans written for the EJB2.0 and higher specifications must throw the javax.ejb.EJBException instead of this exception. 方法签名中定义该异常是为了对符合EJB 1.0规范的企业bean提供向下兼容。 符合EJB 1.1规范的企业bean应该抛出javax.ejb.EJBException来代替该异常。 符合EJB 2.0或更高版本规范的企业bean也应该抛出javax.ejb.EJBException 来代替该异常。
public void ejbActivate() throws EJBException, RemoteException
This method executes in an unspecified transaction context. 方法不在指定事务上下文中执行。
EJBException
- Thrown by the method to indicate a failure caused by a system-level error. 方法抛出该异常表示一个由系统级错误引起的失败。
RemoteException
- This exception is defined in the method signature to provide backward compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans written for the EJB 1.1 specification should throw the javax.ejb.EJBException instead of this exception. Enterprise beans written for the EJB2.0 and higher specifications must throw the javax.ejb.EJBException instead of this exception. 方法签名中定义该异常是为了对符合EJB 1.0规范的企业bean提供向下兼容。 符合EJB 1.1规范的企业bean应该抛出javax.ejb.EJBException来代替该异常。 符合EJB 2.0或更高版本规范的企业bean也应该抛出javax.ejb.EJBException 来代替该异常。
public void ejbPassivate() throws EJBException, RemoteException
This method executes in an unspecified transaction context. 方法不在指定事务上下文中执行。
EJBException
- Thrown by the method to indicate a failure caused by a system-level error. 方法抛出该异常表示一个由系统级错误引起的失败。
RemoteException
- This exception is defined in the method signature to provide backward compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans written for the EJB 1.1 specification should throw the javax.ejb.EJBException instead of this exception. Enterprise beans written for the EJB2.0 and higher specifications must throw the javax.ejb.EJBException instead of this exception. 方法签名中定义该异常是为了对符合EJB 1.0规范的企业bean提供向下兼容。 符合EJB 1.1规范的企业bean应该抛出javax.ejb.EJBException来代替该异常。 符合EJB 2.0或更高版本规范的企业bean也应该抛出javax.ejb.EJBException 来代替该异常。
public void ejbLoad() throws EJBException, RemoteException
This method always executes in the transaction context determined by the value of the transaction attribute in the deployment descriptor. 方法总是在事务上下文中执行,事务上下文决定于部署描述符中的事务属性值。
EJBException
- Thrown by the method to indicate a failure caused by a system-level error. 方法抛出该异常表示一个由系统级错误引起的失败。
RemoteException
- This exception is defined in the method signature to provide backward compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans written for the EJB 1.1 specification should throw the javax.ejb.EJBException instead of this exception. Enterprise beans written for the EJB2.0 and higher specifications must throw the javax.ejb.EJBException instead of this exception. 方法签名中定义该异常是为了对符合EJB 1.0规范的企业bean提供向下兼容。 符合EJB 1.1规范的企业bean应该抛出javax.ejb.EJBException来代替该异常。 符合EJB 2.0或更高版本规范的企业bean也应该抛出javax.ejb.EJBException 来代替该异常。
public void ejbStore() throws EJBException, RemoteException
This method always executes in the transaction context determined by the value of the transaction attribute in the deployment descriptor. 方法总是在事务上下文中执行,事务上下文决定于部署描述符中的事务属性值。
EJBException
- Thrown by the method to indicate a failure caused by a system-level error. 方法抛出该异常表示一个由系统级错误引起的失败。
RemoteException
- This exception is defined in the method signature to provide backward compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans written for the EJB 1.1 specification should throw the javax.ejb.EJBException instead of this exception. Enterprise beans written for the EJB2.0 and higher specifications must throw the javax.ejb.EJBException instead of this exception. 方法签名中定义该异常是为了对符合EJB 1.0规范的企业bean提供向下兼容。 符合EJB 1.1规范的企业bean应该抛出javax.ejb.EJBException来代替该异常。 符合EJB 2.0或更高版本规范的企业bean也应该抛出javax.ejb.EJBException 来代替该异常。
<!-- -->
|
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.