EJB3的XML Schema第二讲
紧接上文: <xsd:key name="ejb-name-key"> xsd:annotation xsd:documentation ejb-name 元素包含了企业bean 的名字。在ejb-jar 文件中,这个名字必须唯一。 </xsd:documentation> </xsd:annotation> <xsd:selector xpath="javaee:enterprise-beans/"/> <xsd:field xpath="javaee:ejb-name"/> </xsd:key> <xsd:keyref name="ejb-name-references" refer="javaee:ejb-name-key"> xsd:annotation xsd:documentation keyref 表示来自relationship-role-source 的引用必须是一个定义在enterprise-beans 元素范围内的ejb-name。 </xsd:documentation> </xsd:annotation> <xsd:selector xpath=".//javaee:ejb-relationship-role/javaee:relationship-role-source"/> <xsd:field xpath="javaee:ejb-name"/> </xsd:keyref> <xsd:key name="role-name-key"> xsd:annotation xsd:documentation 指定role-name-key 是为了在security-role-refs 中引用。 </xsd:documentation> </xsd:annotation> <xsd:selector xpath="javaee:assembly-descriptor/javaee:security-role"/> <xsd:field xpath="javaee:role-name"/> </xsd:key> <xsd:keyref name="role-name-references" refer="javaee:role-name-key"> xsd:annotation xsd:documentation keyref 表示security-role-ref 到role-name 的引用. </xsd:documentation> </xsd:annotation> <xsd:selector xpath="javaee:enterprise-beans//javaee:securityrole-ref"/> <xsd:field xpath="javaee:role-link"/> </xsd:keyref> </xsd:element>
<xsd:complexType name="activation-config-propertyType"> xsd:annotation xsd:documentation activation-config-propertyType 包含了一个用于消息驱动bean 的名称/值配置属性对。由消息类型来识别的这些用于消息驱动bean 的属性。 </xsd:documentation> </xsd:annotation> xsd:sequence <xsd:element name="activation-config-property-name" type="javaee:xsdStringType"> xsd:annotation xsd:documentation activation-config-property-name 元素包含了消息驱动bean 的激活配置属性的名字。对于JMS 消息驱动bean 来说,下面的属性是可以被识别的: acknowledgeMode,messageSelector,destinationType, subscriptionDurability </xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="activation-config-property-value" type="javaee:xsdStringType"> xsd:annotation xsd:documentation activation-config-property-value 元素包含消息驱动bean 激活配置属性的值。 </xsd:documentation> </xsd:annotation> </xsd:element> </xsd:sequence> <xsd:attribute name="id" type="xsd:ID"/> </xsd:complexType>
<xsd:complexType name="activation-configType"> xsd:annotation xsd:documentation activation-configType 定义了关于消息驱动bean 在操作环境中期望的配置属性信息。它可以包括消息确认,消息选择器,期望的目的地类型等等信息。 配置信息用名称/值配置属性来表达。 根据消息类型来识别这些用于特定消息驱动bean 的属性。 </xsd:documentation> </xsd:annotation> xsd:sequence <xsd:element name="description" type="javaee:descriptionType" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="activation-config-property" type="javaee:activation-config-propertyType" maxOccurs="unbounded"/> </xsd:sequence> <xsd:attribute name="id" type="xsd:ID"/> </xsd:complexType>
<xsd:complexType name="application-exceptionType"> xsd:annotation xsd:documentation application-exceptionType 声明一个应用异常。这个声明包括: -异常类。当容器收到这种类型的异常时,它将它作为应用异常转发到客户端,而不管它是受检查异常还是不检查的异常。 -一个可选的rollback 元素。如果这个元素被设置成true,那么容器必须在转发异常之前回滚事务。如果没有指定,则缺省是false。 </xsd:documentation> </xsd:annotation>