Create a "singleton" object that extends Runnable and can run as a
background thread that wakes up periodically to refresh the mapping of id to
URL.  This "singleton" would also be the object that mediates the
translation of id to URL.  When the "singleton" is first created, it should
launch the background thread.  Use synchronized methods to get/set the
mapping values to make sure your responses are consistent.  There seem to be
many 3rd party solutions to connection pooling that could be integrated with
this.

----- Original Message -----
From: Deepak S <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, September 03, 2000 2:12 PM
Subject: Correct Approach`


> Hi All,
> This is my first post to the list. I have a table in the database which
> stores URL mapping. Basically it has an id associated with an URL. Now, I
do
> not want to hit the RDBMS everytime to retrieve this mapping. That is I
want
> it to be there in the memory most of the time. So I guess a solution would
> be to implement an object that queries the database once in a while to see
> if the mappings have changed.
>
> Can I go for such a solution along with a coonection pool, Please let me
> know. And moreover how will I implememnt this? This has to be done in
> JSP/Servlets/SQL Server framework.
>
> Thanks in advance
> Deepak
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> Share information about yourself, create your own public profile at
> http://profiles.msn.com.
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to