Grails jms远程侦听器不工作



我是grails和jms的初学者,我试图为来自glassfish的消息做一个简单的消息监听器。

我的grails app/spring/resources.groovy

beans = {
    myQueueFactory(SingleConnectionFactory) {
         targetConnectionFactory = { ActiveMQConnectionFactory cf ->
             brokerURL = 'tcp://localhost:7676'
    }
}

grails app/Config.groovy

jms {
     containers {
          standard {
               autoStartup = true
               connectionFactoryBean = "myQueueFactory"
          }
     }
}

MyService.groovy

class MyService {
    static exposes = ['jms']
    static destination = 'myQueue'
    def onMessage(msg) {
         println msg
    }
}

但是当我发信息的时候,什么也没发生!有什么不对劲吗?glassfish和grails应用程序都在同一个本地主机中运行。

提前感谢!

你看了吗http://gpc.github.io/grails-jms/docs/manual/index.html?

您是否已安装并运行ActiveMQ?

static destination = 'myQueue'将如何跳转到使用"myQueueFactory"?

最新更新