home method是在entity bean中特殊的方法,由于entity bean相当于数据库中某个单行记录的投影,所以通过接口暴露给客户都是查找,生成,删除(这些在home中),操作这个数据,更新,等(在EjbObejct的实现中),可是这都是针对某条记录,不能满足跨越单条记录的需求,于是产生了home method.(我的最大优点就是语文表述能力差,不知道,说清楚了没有..)
呵呵,谢谢楼上的解释,但我更想知道的是如何定义、实现、使用HOME METHOD?望指教一二。
Each home method definition in the home interface corresponds to a method in the entity bean class. In the home interface, the method name is arbitrary, provided that it does not begin with create or find. In the bean class, the matching method name begins with ejbHome. For example, in the SavingsAccountBean class the name is ejbHomeChargeForLowBalance, but in the SavingsAccountHome interface the name is chargeForLowBalance. The home method signature must follow the same rules specified for finder methods in the previous section (except that a home method does not throw a FinderException).
但是有谁能把这个问题说的全面透彻一点吗?包括EJB2.0规范