EJBLocalHome (Java EE 5)

Java EE API


javax.ejb Interface EJBLocalHome


public interface EJBLocalHome


EJBLocalHome 接口必须通过所有企业 Bean 的本地 home 接口扩展。企业 Bean 的本地 home 接口定义了允许本地客户端创建、查找和移除 EJB 对象的方法,以及不特定于 Bean 实例的 home 业务方法(会话 Bean 没有查找器和 home 业务方法)。

本地 home 接口由企业 Bean 提供者定义,由企业 Bean 容器实现。

英文文档:

The EJBLocalHome interface must be extended by all enterprise Beans' local home interfaces. An enterprise Bean's local home interface defines the methods that allow local clients to create, find, and remove EJB objects, as well as home business methods that are not specific to a bean instance (session Beans do not have finders and home business methods).

The local home interface is defined by the enterprise Bean provider and implemented by the enterprise Bean container.


Method Summary
 void
 

Method Detail

public void remove(Object primaryKey) throws RemoveException, EJBException
移除由其主键标识的 EJB 对象。

只有实体 Bean 的本地客户端可以使用此方法。试图对会话 Bean 调用此方法将导致 RemoveException。

ThrowsRemoveException: 如果企业 Bean 或容器不允许客户端移除该对象,则抛出该异常。
ThrowsEJBException: 方法由于系统级失败而失败时抛出该异常。

英文文档:

remove

void remove(Object primaryKey)
            throws RemoveException,
                   EJBException
Remove an EJB object identified by its primary key.

This method can only be used by local clients of an entity bean. An attempt to call this method on a session bean will result in a RemoveException.

Throws:
RemoveException - Thrown if the enterprise Bean or the container does not allow the client to remove the object.
EJBException - Thrown when the method failed due to a system-level failure.


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!