As a workaround, we have brought our code reading from the queue out of the
onMessage method, an put it inside another asynchronous method periodically
executed (quartz).
And now the entity manager is correctly being injected and we can merge our
object.
@Asynchronous
| public
I tried adding manually the dependency on the entity manager in the listener
class, but got the same exception...
In component:
@Name(servicioResultados)
| @Scope(APPLICATION)
| @Startup(depends={em})
| public class ServicioResultados implements MessageListener {
| .
The exception:
No. The configuration we used is copied from the jpa example of the booking
application. Something like this:
Components.xml
| .
| transaction:entity-transaction entity-manager=#{em}/
|
| persistence:entity-manager-factory name=monitorDatabase /
|
|
We have not used any datasource.xml so far.
Below the persistence.xml
?xml version=1.0 encoding=UTF-8?
| persistence xmlns=http://java.sun.com/xml/ns/persistence;
| xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
|
This is our first Seam application (Seam 2.0.0 GA on Tomcat 6) and we need now
to persist in DB the data received from a jms queue.
The jms connection works ok but then we get a NullPointerException in the last
line bellow, because the entity manager is not been injected
Are we missing
Hello,
Is there any working 'mavenized' seam application with richfaces as one of its
dependencies?
I've tried different dependencies in the pom based on some non official blogs,
but none worked. Maybe some can provide one.
Our app was based on the jboss-seam-jpa example and is deployed under