wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes async DB Notification to AppSrv when DB changes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "async DB Notification to AppSrv when DB changes" Watch "async DB Notification to AppSrv when DB changes" New topic
Author

async DB Notification to AppSrv when DB changes

Marco Barenkamp
Ranch Hand

Joined: Aug 27, 2001
Posts: 94
Hi,

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
Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
Hi Marco,


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
Marco Barenkamp
Ranch Hand

Joined: Aug 27, 2001
Posts: 94
Hi,

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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: async DB Notification to AppSrv when DB changes