我已成功为IBM Webshere配置了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
注意:这两个类都在不同的模块中。
似乎它没有加载Base类。有什么想法吗?
答案 0 :(得分:1)
我也已经应用了IBM Web sphere修订包7但没有白费。 http://www-01.ibm.com/support/docview.wss?uid=swg1PM70521
问题通过在TopicSubScriper上实现MessageListener来解决(即使超类得到它)..由于这个解决方案没有虚构的影响,所以我很高兴:)
非常感谢SiB& Aviram Segal为您提供帮助。
答案 1 :(得分:0)
在IBM Websphere的类似thread中,答案是
答案
忽略此错误消息,因为没有任何功能影响。
建议但不要求,消息驱动的bean类为它支持的消息类型实现消息侦听器接口。支持JMS API的bean实现 javax.jms.MessageListener 接口
如果您想避免错误消息,我觉得您可以在implements MessageListener
上尝试TopicSubScriper