Mike Curwen,
Thanks for your interest response. I will explain my problem in detail so that you can get the background of it. I am having a client (
JSP) which will display some data from the database and it has to be updated as soon as the data is changed in the database. The changing of data in the database table, may happen at any time. So it is not possible to keep on pooling the database for changes. If some changes happened in the database, a trigger will be fired and I want to know how to catch that changes by some way (may be put that to a queue/topic) and give that changed data it to EJB (Message Driven Bean can take that).
If anybody have any idea of how to do this, please reply.
Thanks in advance.
Regards,
Jayakumar
Originally posted by Mike Curwen:
EJB's always perform ejbLoad before the execution of a transactional business method, and always call ejbStore after the method completes.
So if your database has changed in the meantime, it doesn't matter that the bean is not immediately refreshed, since it is guaranteed to be fresh when it's really needed.
Also - and I haven't confirmed it... but I understand that the container will know when you have deleted rows from the database, and it will unload the corresponding EJB's. I would assume it would do this when an attempt is made to findByPrimaryKey, but I'm not sure.