对于容器事务,我得到了"根元素后面的文档中的标记必须格式良好"的错误。
ejb-jar.xml代码如下:
http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd ">EmployeeDetailsEmployeeDetailsEmployeeBeancom.test.intrfc.EmployeeHomecom.test.intrfc.EmployeeRemotecom.test.classes.EmployeeBean容器com.test.classes.EmployeePK假2.倍EmployeeRemoteemployeeidemployeeNameshareAmountshareValueemployeeid根据员工的名称查找Employee beanfindByEmployeeName以从EmployeeRemote中选择对象(a)Where a.p 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>
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