Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

async DB Notification to AppSrv when DB changes

 
Marco Barenkamp
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Marco Barenkamp
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic