JMS Groovy equivalent of applicationContext.xml in resources.groovy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

JMS Groovy equivalent of applicationContext.xml in resources.groovy

jondo_w
I have the following in a pure Java app in applicationContext.xml:
    <jms:listener-container
            container-type="default"
            connection-factory="cachedConnectionFactory"
            acknowledge="auto">
        <jms:listener destination="remoting.response" ref="remotingListener"/>
    </jms:listener-container>


I'm trying to do the same in resources.groovy, but don't seem to be having any luck. The listener works in the pure Java app, but not in my Grails app. I must have done something wrong in my resources.groovy declaration, which is as follows:

    xmlns jms: "http://www.springframework.org/schema/jms"

   jms.'listener-container'('container-type': 'default', 'connection-factory': 'cachedConnectionFactory', 'acknowledge': 'auto', 'concurrency': '5') {
        jms.listener('destination': 'remoting.response', 'ref': 'remotingListener') {
        }
    }

Anybody know how to properly configure this in resources.groovy?

thanks,
Darryl

Reply | Threaded
Open this post in threaded view
|

Re: JMS Groovy equivalent of applicationContext.xml in resources.groovy

Bernardo Gomez Palacio

Have you checked the jms plugin? That could be a simple option ;)

On Feb 25, 2011 12:41 PM, "Darryl Pentz" <[hidden email]> wrote:
> I have the following in a pure Java app in applicationContext.xml:
> <jms:listener-container
> container-type="default"
> connection-factory="cachedConnectionFactory"
> acknowledge="auto">
> <jms:listener destination="remoting.response" ref="remotingListener"/>
> </jms:listener-container>
>
>
> I'm trying to do the same in resources.groovy, but don't seem to be having any
> luck. The listener works in the pure Java app, but not in my Grails app. I must
> have done something wrong in my resources.groovy declaration, which is as
> follows:
>
> xmlns jms: "http://www.springframework.org/schema/jms"
>
> jms.'listener-container'('container-type': 'default', 'connection-factory':
> 'cachedConnectionFactory', 'acknowledge': 'auto', 'concurrency': '5') {
> jms.listener('destination': 'remoting.response', 'ref':
> 'remotingListener') {
> }
> }
>
>
> Anybody know how to properly configure this in resources.groovy?
>
> thanks,
> Darryl
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: JMS Groovy equivalent of applicationContext.xml in resources.groovy

Alan

listenerContainer(SimpleMessageListenerContainer) {
        connectionFactory = jmsFactory
        destination = acresp_destination
        messageListener = jmsMessageListener
        autoStartup = false
    }


On 25 February 2011 21:34, Bernardo Gomez Palacio <[hidden email]> wrote:

Have you checked the jms plugin? That could be a simple option ;)

On Feb 25, 2011 12:41 PM, "Darryl Pentz" <[hidden email]> wrote:
> I have the following in a pure Java app in applicationContext.xml:
> <jms:listener-container
> container-type="default"
> connection-factory="cachedConnectionFactory"
> acknowledge="auto">
> <jms:listener destination="remoting.response" ref="remotingListener"/>
> </jms:listener-container>
>
>
> I'm trying to do the same in resources.groovy, but don't seem to be having any
> luck. The listener works in the pure Java app, but not in my Grails app. I must
> have done something wrong in my resources.groovy declaration, which is as
> follows:
>
> xmlns jms: "http://www.springframework.org/schema/jms"
>
> jms.'listener-container'('container-type': 'default', 'connection-factory':
> 'cachedConnectionFactory', 'acknowledge': 'auto', 'concurrency': '5') {
> jms.listener('destination': 'remoting.response', 'ref':
> 'remotingListener') {
> }
> }
>
>
> Anybody know how to properly configure this in resources.groovy?
>
> thanks,
> Darryl
>
>
>
>