EJB (Java EE 5)

Java EE API


javax.ejb Annotation Type EJB


@Target(value={TYPE,METHOD,FIELD})
@Retention(value=RUNTIME)
public @interface EJB

Implements: Annotation
@Target(value={TYPE, METHOD, FIELD})
@Retention(value=RUNTIME)

指示对 Enterprise Java Bean 本地或远程视图的依赖性。
英文文档:

Indicates a dependency on the local or remote view of an Enterprise Java Bean.


Optional Element Summary
 Class
 String
 String
 String
 String
 

abstract public String name()
声明组件环境内 (java:comp/env) ejb 引用的逻辑名称。
英文文档:

name

public abstract String name
The logical name of the ejb reference within the declaring component's (java:comp/env) environment.

Default:
""

abstract public String description()
英文文档:

description

public abstract String description
Default:
""

abstract public String beanName()
此引用映射到的 Enterprise Java Bean 的 ejb-name。仅适用于在同一应用程序或独立模块内将目标 EJB 定义为声明组件的情况。
英文文档:

beanName

public abstract String beanName
The ejb-name of the Enterprise Java Bean to which this reference is mapped. Only applicable if the target EJB is defined within the same application or stand-alone module as the declaring component.

Default:
""

abstract public Class<T> beanInterface()
保存以下目标 EJB 接口类型之一:[本地业务接口、远程业务接口、本地 Home 接口、远程 Home 接口]
英文文档:

beanInterface

public abstract Class beanInterface
Holds one of the following interface types of the target EJB : [ Local business interface, Remote business interface, Local Home interface, Remote Home interface ]

Default:
java.lang.Object.class

abstract public String mappedName()
此 ejb 引用应该映射到的 EJB 组件的特定产品名称。此映射的名称通常是全局 JNDI 名称,但也可以是任何形式的名称。 应用服务器不需要支持任何特殊形式或类型的映射名称,也不需要具有使用映射名称的能力。映射的名称与产品有关,并且通常与安装有关。任何对映射名称的使用都不可移植。
英文文档:

mappedName

public abstract String mappedName
The product specific name of the EJB component to which this ejb reference should be mapped. This mapped name is often a global JNDI name, but may be a name of any form. Application servers are not required to support any particular form or type of mapped name, nor the ability to use mapped names. The mapped name is product-dependent and often installation-dependent. No use of a mapped name is portable.

Default:
""


Submit a bug or feature

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

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

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