我目前正在尝试将我的Web应用程序从jboss 5.1升级到jboss 7.1.1.Final
在我的jboss.xml中,我已经配置了一些自定义ejb超时,如下所示:
<session>
<ejb-name>MSServiceEJB</ejb-name>
<jndi-name>ejb/MSServiceEJB</jndi-name>
<local-jndi-name>ejb/LocalMSServiceEJB</local-jndi-name>
<method-attributes>
<method>
<method-name>*</method-name>
<transaction-timeout>3600</transaction-timeout>
</method>
</method-attributes>
</session>
Run Code Online (Sandbox Code Playgroud)
jboss 7忽略了jboss.xml,在哪里可以指定我的ejb 2.1事务超时?
每
替换jboss.xml部署描述符文件
jboss-ejb3.xml部署描述符替换jboss.xml部署描述符以覆盖并添加Java Enterprise Edition(EE)定义的ejb3-jar.xml部署描述符提供的功能.新文件与jboss.xml不兼容,现在在部署中忽略了jboss.xml.
您需要创建一个jboss-ejb3.xml并将配置放在其中.
它看起来像这样:
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>EJBName</ejb-name>
<method-name>methodName</method-name>
<method-intf>Local</method-intf>
</method>
<tx:trans-timeout>
<tx:timeout>500</tx:timeout>
<tx:unit>Seconds</tx:unit>
</tx:trans-timeout>
</container-transaction>
</assembly-descriptor>
Run Code Online (Sandbox Code Playgroud)
您正在使用EJB2.x,因此配置它会更好,更明智ejb-jar.xml
应该创建它META-INF of the EJB jar.
| 归档时间: |
|
| 查看次数: |
7280 次 |
| 最近记录: |