
ejb: 定义应用程序内单个 Enterprise Bean 的运行时属性。下面列出的子元素使用与特
定的 Enterprise Bean:
所有 Bean 类 型 : ejb-name, ejb-ref, local-jndi-name, jndi-name, resource-ref,
resource-env-ref, message-destination-ref, pass-by-reference, ior-security-config, gen-classes,
ws-ref;
有状态会话 Bean: bean-cache, webservice-endpoint;
无 状 态 会 话 Bean: bean-pool, webservice-endpoint, checkpointed-methods,
checkpoint-at -end-of-method;
实体 Bean ( BMP ) : is-ready-only-bean, refresh-period-in-seconds, cmp,
commit-option,bean-cache, bean-pool, flush-at-end-of-method;
消息驱动 Bean: mdb-resource-adapter, mdb-connection-factory,
jms-durable-subscription-name, jms-max-message-load, bean-pool
EJB 子元素:
ejb 名称,对应标准部署描述符文件(ejb-jar.xml)中的
ejb-name 元素
ejb 的 local 接口的 JNDI 名称。
当 ejb 实现了 local 接 口 , 如 果 应 用 没 有 设 置
local-jndi-name,应用服务器会使用一个默认值作为
local-jndi-name,默认值的规则如下:
(1)针对 ejb3.0,将 local-jndi-name 设置为 local
Business 接口的类名;
( 2 ) 针 对 ejb2.x ,将 local-jndi-name 设 置 为
local-home 接口的类名。
ejb 的 remote 接口的 JNDI 名称。
当 ejb 实 现 了 remote 接 口 , 如 果 应 用 没 有 设 置
jndi-name ,应用服 务 器 会 使 用 一 个 默 认 值 作 为
jndi-name,默认规则如下:
1. 针对 ejb3.0,将 jndi-name 设置为 remote Business
接口的类名;
2. 针对 ejb2.x,将 jndi-name 设置为 home 接口的类名。
评论