Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/311.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java EJB3JMS配置加载异常| |为7_Java_Jakarta Ee_Jms_Websphere_Ejb 3.0 - Fatal编程技术网

Java EJB3JMS配置加载异常| |为7

Java EJB3JMS配置加载异常| |为7,java,jakarta-ee,jms,websphere,ejb-3.0,Java,Jakarta Ee,Jms,Websphere,Ejb 3.0,我已经成功地为IBMWebhere配置了JMS主题和队列 我使用JMS主题的方式是,侦听器类是所有子类的基础。 类似于以下方式: public class Base implements MessageListener { public void onMessage(javax.jms.Message message) { } } @MessageDriven(activationConfig={ @ActivationConfigProperty(propertyName="messag

我已经成功地为IBMWebhere配置了JMS主题和队列

我使用JMS主题的方式是,侦听器类是所有子类的基础。 类似于以下方式:

public class Base implements MessageListener {
  public void onMessage(javax.jms.Message message) { } }

@MessageDriven(activationConfig={
@ActivationConfigProperty(propertyName="messagingType",propertyValue="javax.jms.MessageListener"),
@ActivationConfigProperty(propertyName="destinationType",propertyValue="javax.jms.Topic"),
@ActivationConfigProperty(propertyName="destination",propertyValue="topic/Test"),
@ActivationConfigProperty(propertyName="messageSelector",propertyValue="RECIPIENT='TestR'")},messageListenerInterface=MessageListener.class)

public class TopicSubScriber extends Base {    

}
我得到了以下错误:

the class contains the @MessageDriven annotation but is not a valid
  message-driven bean: no message listener interface can be determined
注意:这两个类位于不同的模块中

似乎它没有加载基类。有什么想法吗?

在IBM Websphere的类似案例中,答案是

答复

忽略此错误消息,因为没有功能影响

建议消息驱动bean类为其支持的消息类型实现消息侦听器接口,但不是必需的。支持JMS API的bean实现了javax.JMS.MessageListener接口

不过,如果您想避免出现错误消息,我觉得您可以在IBM Websphere的类似应用程序中尝试
TopicSubScriper

上的
implements MessageListener
,答案是

答复

忽略此错误消息,因为没有功能影响

建议消息驱动bean类为其支持的消息类型实现消息侦听器接口,但不是必需的。支持JMS API的bean实现了javax.JMS.MessageListener接口


不过,如果您想避免出现错误消息,我觉得您可以尝试在
TopicSubScriper

上执行MessageListener,我也应用了以下IBM Web sphere fix pack 7,但这是徒劳的。。

这个问题也通过在TopicSubScriper上实现MessageListener来解决(即使超级类得到了它)。。因为这个解决方案没有虚构的影响,所以我很高兴:)


非常感谢SiB&Aviram Segal的帮助。

我也申请了以下IBM Web sphere fix pack 7,但没有白费力气。。

这个问题也通过在TopicSubScriper上实现MessageListener来解决(即使超级类得到了它)。。因为这个解决方案没有虚构的影响,所以我很高兴:)


非常感谢SiB&Aviram Segal的帮助。

我已经测试了JMS配置,这些配置与测试代码配合良好。。。但是在生产代码中出现了上述异常…请尝试在TopicSubScriper上添加implements MessageListener(即使超级类得到了它)。非常感谢,它现在可以工作了:)我已经测试了我的JMS配置,这些配置与测试代码配合得很好。。。但是在生产代码中出现了上述异常…请尝试在TopicSubScriper上添加implements MessageListener(即使超级类得到了它)。非常感谢,它现在可以工作了:)