we have a J2EE Application using a persistent store (oracle) that is used by a legacy app as well. This legacy app updates some rows in the db, that are mapped to CMP beans. Currently, we are synchronizing the DB and the appropriate beans quite frequently, so the overall performance goes down. Is there a way or software, that enables the WAS or WebLogic server to be notified asynchronously, in order to synchronize the DB state to bean only if needed?
Thanks in advance.
Marco Barenkamp<br />_ _ _ _ _ ________________________ _ _ _ _ _ <br />L M I N T E R N E T S E R V I C E S AG<br /> <br />Head of Software Development<br /> <br /> <br />BEA Certified Enterprise Developer<br />Sun Certified Programmer for the Java2 Platform<br />Sun Certified Web Component Developer for the Java2 Platform<br />Sun Certified Developer for the Java 2 Platform <br />Sun Certified Business Component Developer for the Java 2 Platform <br />Sun Certified Enterprise Architect for the Java 2 Platform Enterprise Edition<br /> <br />LMIS AG
Is there a way or software, that enables the WAS or WebLogic server to be notified asynchronously, in order to synchronize the DB state to bean only if needed?
I don�t know about WAS, but WebLogic provides an out of the box feature that might be useful for your scenario. To be more precisely I�ll tell you that WebLogic allows different concurrency strategies for entity ejbs and one of them is the ReadOnly strategy. This is a very powerful technique for caching data and one of its greatest benefits its that the cached data gets synchronized along the entire cluster. The way it works is pretty intuitive: the container will refresh the cache after a specified amount of time (see <read-timout-seconds> element), using a polling model rather than a pushing one. It also allows the application to programmatically refresh the entire cache or only a subset of the cache and this is the interesting part. If one application needs to refresh only one bean, the container will propagate the changes to all other server instances in the cluster (via ip multicast) and you�ll get this for free. Regards.
I think, therefore I exist -- Rene Descartes
Joined: Aug 27, 2001
thanks for the response, but I knew that behaviour already. Since BEA WebLog 9, this strategy has even been enhanced for read-write CMP beans and not longer available only for read-only beans.
But that behaviour works not efficiently enough (:-( ), because we need the notification a) immediately when a change occurs and b) only if sth changes.
I fear that nothing is present currently on the market that would fit our needs and I wonder why. This problem must exist in other apps as well?