The only way to do event processing on database
updates is to use triggers.
I've never done this with ejbs. I don't even know
if the spec allows it, or how transactions might be
handled in this case.
Of course using triggers would make it synchronous.
You probably want to ask in the persistence forum,
but knowing you, you've probably posted this to every
forum anyway :-)
A better approach is to send a message to an
MDB with the key to the data you changed.
The MDB can then invoke your second bean, with the key
of the changed data, no need for findAll()
first all, thank you warjort for answering me so quickly...
If I understand your answer, even if each of my data is an EJB entity, when I add a data (i.e. a EJB entity) directly by accessing to my db, jboss don't know it, and can't create an event itself.
Am I true?
I think you are correct. There is no notification support
for ejbs. There could be something in CMP, but
probably not. (I don't know CMP, ask in the persistence
My guess is you'll have to do this yourself.
Thanks a lot Adrian,
I hope one day (in the future) my jboss knowledge will be able to help you at your turn...
Yes, it is possible at the cost of speed.
In your jboss.xml you can create a container configuration with a different commit option. (Look in standardjboss.xml for examples.)
Look in ejb 1.1 spec (9.1.10) for the different commit options. (Probably option 'B' will work perfectly.)
thank you wolfc, let's try!