I am using Spring-AMQP to monitor a RabbitMQ message queue in a Play application.
The problem is I can not access my database from the listener code since the JPA context is not open in this scope.
I understand Play Framework manages the JPA context so that it is open when processing HTTP requests, but is there a way I can use JPA from outside Play controllers/jobs?
Just found the answer was to use JPAPlugin!
Example listener method: