EJB3的XML Schema第四讲

紧接上文:
<xsd:sequence>
<xsd:element name="description" type="javaee:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="method" type="javaee:methodType" maxOccurs="unbounded"/>
<xsd:element name="trans-attribute" type="javaee:trans-attributeType"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID"/>
</xsd:complexType>
<xsd:complexType name="ejb-classType">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
ejb-classType 包含了企业bean 类的全称。它由ejb-class 元素使用。
例如:
<ejb-class>com.wombat.empl.EmployeeServiceBean</ejb-class>
]]>
</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="javaee:fully-qualified-classType"/>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="ejb-jarType">
<xsd:annotation>
<xsd:documentation>
ejb-jarType 定义了EJB 部署描述的根元素。它包含:
-一个可选的ejb-jar 文件的描述。
-一个可选的display 名称。
-一个可选的图标,它包含了一个小的和大的图标文件名称。
-关于所有未通过注释符指定的企业bean 的结构信息。
- 关于拦截器类的结构信息。
-容器管理的关系,如果有的话。
- 一个可选的application-assembly 。
- 一个可选的ejb-client-jar 的名称。
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:group ref="javaee:descriptionGroup"/>
<xsd:element name="enterprise-beans" type="javaee:enterprise-beansType" minOccurs="0"/>
<xsd:element name="interceptors" type="javaee:interceptorsType" minOccurs="0"/>
<xsd:element name="relationships" type="javaee:relationshipsType" minOccurs="0">
<xsd:unique name="relationship-name-uniqueness">
<xsd:annotation>
<xsd:documentation>
ejb-relation-name 包含了关系的名称。名字在关系中必须是唯一的。
</xsd:documentation>
</xsd:annotation>
<xsd:selector xpath="javaee:ejb-relation"/>
<xsd:field xpath="javaee:ejb-relation-name"/>
</xsd:unique>
</xsd:element>
<xsd:element name="assembly-descriptor" type="javaee:assembly-descriptorType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
在部署描述中提供assembly-descriptor 对ejb-jar 文件生产者来说是可选的。
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="ejb-client-jar" type="javaee:pathType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
可选的ejb-client-jar 元素指定一个JAR 文件,这个文件包含了客户端访问JAR 内企业bean 所必需的类文件。
例如:
<ejb-client-jar>employee_service_client.jar</ejb-client-jar>
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="version" type="javaee:dewey-versionType" fixed="3.0" use="required">
<xsd:annotation>
<xsd:documentation>
Version 指定了实例文档必须遵循的 EJB 规范的版本。这个信息可以让部署工具根据EJB Schema 的版本验证EJB 部署描述。
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="metadata-complete" type="xsd:boolean">
<xsd:annotation>
<xsd:documentation>
metadata-complete 属性定义了用于这个模块的部署描述和其它相关部署描述是否完成,或者是否应当检查这个模块可获得的和与应用一起打包的类文件上指定的部署信息。如果metadata-complete 被设置成true,那么部署工具必须忽略所有指定部署信息的注释符。如果它被设置成false,那么部署工具必须按照规范检查应用中类的注释符。
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="id" type="xsd:ID"/>
</xsd:complexType>
<xsd:complexType name="ejb-nameType">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
ejb-nameType 指定了企业bean 的名称。它由ejb-name 元素使用。这个名字被ejb-jar 文件生产者分配,用于命名ejb-jar 文件部署描述中的企业bean。 在同一个ejb-jar 文件中,这个名字必须是唯一的。在部署描述中的ejb-name 和被部署者分配到企业beanhome 的JNDI 名字间没有特别的关系。用于实体bean 的名字必须遵循NMTOKEN 的文法规则。
例如:
<ejb-name>EmployeeService</ejb-name>
]]>
</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="javaee:xsdNMTOKENType"/>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="ejb-relationType">
<xsd:annotation>
<xsd:documentation>
ejb-relationType 描述了两个使用容器管理持久化的实体bean 间的关系。它由ejb-relation 元素使用。它包含了一个描述;一个可选的ejb-relation-name 元素和确切的两个关系角色声明,它们由ejb-relationship-role 元素定义。如果指定了关系的名称,则在ejb-jar 文件中这个名称必须是唯一的。
</xsd:documentation>
</xsd:annotation>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值