Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
URGENT! reg. Caching of data......

URGENT! reg. Caching of data......

2004-08-11       - By Partha Ranjan Das

 Back
Reply:     1     2     3     4     5  

Hi,

There is some pattern called 'Context Object' which can come to your help.
I assume that you will be using an object in application context in the web
container.
For your updates into this object from JMS, you will possibly implement
MessageListener, MessageConsumer in a class which can call a servlet
(servlet1) method which has access to the ServletContext where the context
object is stored.
Using a timer/timer task started up from a start-up servlet (servlet2), you
can call the same method in the servlet1 to do the update into the context
object.
If you are using a class with static fields for this cache, do not do that.

By the way, if you are going for auto-refresh, why do you need to use a MOM
solution whose response may be delayed due to underlying MOM architecture.

Regards,
Partha

       -- ---- --
       From:  Manish Malhotra [SMTP:manish.mmalhotra@(protected)]
       Sent:  Tuesday, August 10, 2004 3:54 PM
       To:  J2EE-INTEREST@(protected)
       Subject:  URGENT! reg. Caching of data......

       Hi All,

       I need to cache the data at the time of start up of the applciation
from the
       DB to reduce the DB hit.
       So, I designed one caching class which is doing this.
       But this statis cache means it never updates automatically.
       But it updated through the JMS a asynchrounous process when we
change the
       data in the DB using our web module.
       I need to make it also auto refreshed. So, I plan to use Timer /
Timertask
       classes of JDK1.4.
       I want to know is this the right approach?

       Please let me know as soon as possible.

       Many Thanks.

       Manish Malhotra


===========================================================================
       To unsubscribe, send email to listserv@(protected) and include in
the body
       of the message "signoff J2EE-INTEREST".  For general help, send
email to
       listserv@(protected) and include in the body of the message "help".
*********************************************************************
Disclaimer: The information in this e-mail and any attachments is
confidential / privileged. It is intended solely for the addressee or
addressees. If you are not the addressee indicated in this message, you may
not copy or deliver this message to anyone. In such case, you should destroy
this message and kindly notify the sender by reply email. Please advise
immediately if you or your employer does not consent to Internet email for
messages of this kind.
*********************************************************************

===========================================================================
To unsubscribe, send email to listserv@(protected) and include in the body
of the message "signoff J2EE-INTEREST".  For general help, send email to
listserv@(protected) and include in the body of the message "help".

©2008 junlu.com - Jax Systems, LLC, U.S.A.