Im using the JMS plugin 'org.grails.plugins:jms:2.0.0.M1' in my grails 3.1 project. I put a message on the queue using the jmsService:
jmsService.send("msgPending", [eventType: it.msgEventType.toString(), msgEvent: messageXml])
{
Message msg ->
msg.setJMSDeliveryMode(DeliveryMode.PERSISTENT)
msg.setJMSExpiration(queueTimeout)
}
This message gets consumed using a configured camel route which has an endpoint method in the same class where it is put on the que.
When the message is received I try to save an entity using the data but I get the following exception:
No Session found for current thread; nested exception is org.hibernate.
I have tried wrapping the save method with Entity.withTransaction and I also annotated the class and methods with @Transactional but still see the same issue.
Has anyone had any issues with this?
Thanks