segunda-feira, 17 de agosto de 2009

Grails 1.2M2, JMS and ActiveMQ plugins

UPDATE: As I initially suspected, this wasn't a Grails problem: There's been some bean renaming in the last versions of JMS plugin that caused the incompatibility with the ActiveMQ plugin. Both plugins have released new versions (JMS 0.5-RC2 and ActiveMQ 0.1) that are now compatible once again.


Recently I tried to use JMS and ActiveMQ with Grails 1.2-M2 and found some bumps while trying to make it all work together. Well, after some experimentation, I found the missing pieces of the puzzle: Both jmsConnectionFactory and defaultJmsTemplate beans are missing. It seems that the plugins are no longer fully integrated as they used to be...

Without any further investigation I've simply configured them in the resources.groovy file, like this:


beans = {
jmsConnectionFactory(org.apache.activemq.ActiveMQConnectionFactory) {
brokerURL = 'vm://localhost'
}

defaultJmsTemplate(org.springframework.jms.core.JmsTemplate) {
connectionFactory = ref("jmsConnectionFactory")
}
}


... and all worked as expected. Maybe it's something that I'm doing wrong, but for now that I need a quick prototype, it's working perfect.

Feel free to leave any suggestion in the comments.

4 comentários:

Unknown disse...

I really suggest you raise a bug in JIRA for Grails for this, to ensure it's fixed before the 1.2 final release. http://jira.codehaus.org

Deluan disse...

I don't think it's a Grails problem. It seems to be a misconfiguration on one of the plugins, probably the ActiveMQ plugin.

There's already a thread on the Grails list about this problem: http://www.nabble.com/No-bean-named-%27defaultJmsTemplate%27-is-defined-td24782552.html#a25023420

I forgot to say that this was tested with JMS plugin 0.5-RC1 and ActiveMQ 0.0.


Thanks.

Anônimo disse...

tres interessant, merci

Anônimo disse...

Olá trata-se a 2ª vez que vi a tua página e reflecti muito!Espectacular Projecto!
Adeus