users
[Top] [All Lists]

RE: [cinjug-users] Messaging At the Web Layer

To: <esumerfd@xxxxxxxxxxxxxx>, "'CinJug'" <users@xxxxxxxxxx>
Subject: RE: [cinjug-users] Messaging At the Web Layer
From: "Brian McCullars" <b.mccullars@xxxxxxxxxxxxxxxxxx>
Date: Tue, 23 Oct 2007 19:38:39 -0400
Delivered-to: mailing list users@xxxxxxxxxx
In-reply-to: <6a216ba20710231235h730074f7ma164455e7bb8307a@xxxxxxxxxxxxxx>
Mailing-list: contact users-help@xxxxxxxxxx; run by ezmlm
Organization: IT Consortium
Reply-to: <b.mccullars@xxxxxxxxxxxxxxxxxx>
Thread-index: AcgVrTTVC+uKgStbTEKtz2fEy4RJaQAH6d9A
This may help.
 
We have been using topics to cache web tier attributes.
 
Even in a clustered environment, all of the subscribers of the topic will be notified of any changes.  You could then store the cache as a Singleton on the JVM. So every JVM in the cluster will be notified of the change. 
 
When the database changes send a message to the topic.  The MDB will then clear the cache. 
 
In our case when the user requests a page we check to see if the cache is empty, if it is then we update it with the contents from the database.
 

Brian McCullars
IT Consortium  
Phone   513-475-0008
Fax     888-241-5613
b.mccullars@xxxxxxxxxxxxxxxxxx

 


From: esumerfd@xxxxxxxxx [mailto:esumerfd@xxxxxxxxx] On Behalf Of Edward Sumerfield
Sent: Tuesday, October 23, 2007 3:36 PM
To: CinJug
Subject: [cinjug-users] Messaging At the Web Layer

I am considering implementing a JMS messaging container at the Web layer. Tell me I am a fool? :-)

I have a simple web app polled by a client every second for its data. Not wanting to hit the database for every client, every second, it is cached at the web layer.

Enter JMS. We will be receiving notifications of changes to the database data via JMS messages. So MessageDrivenBeans, deployed to JBoss EJB container will receive these messages but what should they do to tell the cache in the Web container to update.

It seems my options are to push the cache to a java space somewhere so that the web layer and the MDB's can access it or to move the messaging container to the web layer.

Thoughts?

Ed

<Prev in Thread] Current Thread [Next in Thread>