0

对于容器事务,我收到“根元素之后的文档中的标记必须格式正确”的错误。

ejb-jar.xml 代码如下:

http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">EmployeeDetails EmployeeDetails EmployeeBean com.test.intrfc.EmployeeHome com.test.intrfc.EmployeeRemote com.test.classes.EmployeeBean Container com. test.classes.EmployeePK false 2.x EmployeeRemote employeeid employeeName shareAmount shareValue employeeid 通过员工的名字查找一个Employee bean findByEmployeeName java.lang.String Select Object(a) FROM EmployeeRemote As a Where a.employeeName=?1

<container-transaction>
    <method>
        <ejb-name>EmployeeBean</ejb-name>
        <method-intf>EmployeeHome</method-intf>
        <method-name>remove</method-name>
        <method-params>
        <method-param>java.lang.Object</method-param>
        </method-params>
    </method>
        <trans-attribute>Required</trans-attribute>
</container-transaction>
4

1 回答 1

0

这句话ejb-jar_2_1.xsd应该给你答案:

method-intf 元素允许方法元素区分具有相同名称和签名的方法,这些方法在主接口和组件接口(例如,在企业 bean 的远程和本地接口中,或者在企业 bean 的主接口和远程接口等);组件和 Web 服务端点接口,等等。

The method-intf element must be one of the following:

    Home
    Remote
    LocalHome
    Local
    ServiceEndpoint
于 2011-12-12T13:29:05.070 回答