【问题标题】:Annotation equivalent for activation-spec-binding-name等效于activation-spec-binding-name 的注解
【发布时间】:2014-07-01 17:59:38
【问题描述】:

我正在将应用程序从 Websphere Application Server 7 迁移到 8.5。该应用程序使用带有 JMS 激活规范的 MessageDrivenBean 来使用来自队列的消息。在之前的版本中我们使用了 ibm-ejb-jar-bnd.xml 来绑定激活规范:

<ejb-jar-bnd xmlns="http://websphere.ibm.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-ejb-jar-bnd_1_0.xsd"
    version="1.0">
    <message-driven name="SampleMDB">
        <jca-adapter activation-spec-binding-name="jms/as/sample" activation-spec-auth-alias="" />
    </message-driven>
</ejb-jar-bnd>

在 MessageDrivenBean 中是否有与上述等效的注解?

@MessageDriven
@TransactionManagement(TransactionManagementType.BEAN)
public class SampleMDB implements MessageListener {
    ...
}

【问题讨论】:

    标签: jms ejb-3.1 websphere-8 message-driven-bean


    【解决方案1】:

    不可以,MDB 必须使用绑定文件绑定,或者在安装过程中通过控制台或脚本手动绑定。目前无法通过注解进行绑定,但您可以安全地使用与 8.5 版本相同的绑定文件。

    【讨论】:

      猜你喜欢
      • 2018-09-08
      • 2011-05-29
      • 2017-05-12
      • 1970-01-01
      • 2019-07-30
      • 1970-01-01
      • 2018-09-12
      • 2018-11-02
      • 1970-01-01
      相关资源
      最近更新 更多