Using JServ, waiting for Tomcat ;-)
At 15:11 28/10/99 -0400, you wrote:
>That would have to be getServletContext( ).getAttribute( String ) if you
>want it to work in JSDK 2.1 and above. getServlet() is deprecated. You
>have the right idea tho. You just have to make sure you implement it in a
>thread-safe way.
>
>Chris Gow
>[EMAIL PROTECTED]
>
>-----Original Message-----
>From: Lee Coomber [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, October 28, 1999 1:33 PM
>To: [EMAIL PROTECTED]
>Subject: Re: refreshing servlet's data
>
>
>What about creating a config bean? You could include methods that
>downloaded from a database or serialized file as appropriate (i.e., admin
>servlet init/destroy), and return a reference to it to servlets that
>request it with something like getServlet().getConfig()?
>
>You can then seperate the logic from the request processing in a vein along
>the current architecture discussion.
>
>Lee "just discovered JavaBeans" Coomber
>
>At 09:01 28/10/99 -0600, you wrote:
>>I'm also looking at doing something similiar. I want the administrator of
>the system to be
>>able to change parts of the setup of the system without downing everything.
>>
>>I'm looking at setting up an admin servlet that presents the settings to
>the administrator
>>via HTML and allows the admin to insert/delete/update.
>>
>>The servlet that holds the configuration of the system will:
>> - read the configuration from a database upon startup
>> - handle requests to get the configuration from both the admin servlet
>and other servlets
>> - handle requests to update the configuration from the admin servlet.
>Here the config
>> servlet will have the responsibility to update both it's cached
>version and the database
>>
>>So, to summarize, I intend to have a configuration caching servlet, an
>admin servlet, and other
>>system servlets that implement the rest of the system.
>>
>>Of course, this is just a gleam in my eye right now... I'd appreciate any
>comments on this before
>>I write code.
>>
>>
>>Bart Cassady
>>Database Analyst
>>Associated Engineering Group Ltd.
>>[EMAIL PROTECTED]
>>
>>>>> "Steven J. Owens" <[EMAIL PROTECTED]> 10/27 5:22 PM >>>
>>Dragomir asks:
>>
>>> Currently, when I change data, I restart the server and initialize
>>> Globals in init method. Is there anything more intelligent? How I
>>> can make sure that all requests in all servlets are completed so I
>>> can call public static synchronized void initialize(0 in Globals. I
>>> need to make sure that all requests left their doPost/doGet.
>>
>> I'm told some servlet engines will allow you to dynamically poke
>>them and get them to reload things, and that yet others will
>>automatically reload the servlet when the file changes.
>>
>> I'm running into this same issue (we're using NES with Jrun) and
>>I've been writing my servlets so that if you invoke them with an
>>optional argument, they reload their config data. This isn't great,
>>but it's better than bouncing the server every time I need to tweak a
>>config variable.
>>
>> One thing I've been considering is putting all of the config info
>>in a separate class and using some flavor of interservlet
>>communication. Then I could just poke the special config class (or
>>maybe a config servlet) to reload the config data for all of the
>>servlets. I'd be interested in hearing what approaches others have
>>used, particularly with servlet engines that don't provide a solution.
>>
>>Steven J. Owens
>>[EMAIL PROTECTED]
>>[EMAIL PROTECTED]
>>
>>___________________________________________________________________________
>>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>>of the message "signoff SERVLET-INTEREST".
>>
>>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>>Resources: http://java.sun.com/products/servlet/external-resources.html
>>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>>
>>___________________________________________________________________________
>>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>>of the message "signoff SERVLET-INTEREST".
>
>>
>>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>>Resources: http://java.sun.com/products/servlet/external-resources.html
>>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>>
>
>[ > L A T E R A L * ~ ; ] - [ [EMAIL PROTECTED] ]
>
>Phone: +44 (0) 207 378 1011
>Fax: +44 (0) 207 403 4586
>Mobile: +44 (0) 7957 368 626
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
[ > L A T E R A L * ~ ; ] - [ [EMAIL PROTECTED] ]
Phone: +44 (0) 207 378 1011
Fax: +44 (0) 207 403 4586
Mobile: +44 (0) 7957 368 626
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html