-
1. Re: very important question about entity bean + warjort
adrian.brock Feb 14, 2002 7:21 AM (in response to mannu)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()
Regards,
Adrian -
2. Re: very important question about entity bean + warjort
mannu Feb 14, 2002 7:54 AM (in response to mannu)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? -
3. Re: very important question about entity bean + warjort
adrian.brock Feb 14, 2002 8:07 AM (in response to mannu)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
forum)
My guess is you'll have to do this yourself.
Regards,
Adrian -
4. Re: very important question about entity bean + warjort
mannu Feb 14, 2002 8:15 AM (in response to mannu)Thanks a lot Adrian,
I hope one day (in the future) my jboss knowledge will be able to help you at your turn... -
5. Re: very important question about entity bean + warjort
wolfc Feb 14, 2002 2:15 PM (in response to mannu)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.) -
6. Re: very important question about entity bean + warjort
mannu Feb 15, 2002 3:18 AM (in response to mannu)thank you wolfc, let's try!