Thanks. I also found it can be implemented using ServletContext.
Anyway, no matter which solution, how can I instruct a Servlet Engine to
load my shared objects during web application initialization. In JSP, I can
use "global.jsa". In ASP, I can use "global.asa". In Servlet, how ???
Kenneth Kwan
-----Original Message-----
From: Subrahmanyam A.V.B. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 14, 1999 3:05 PM
To: [EMAIL PROTECTED]
Subject: Re: Shared objects for all Servlets
The simplest solution is to have a singleton object (implemented with
factory pattern) maintaining the application level data such as yours.
You can load the data while creating this object.
Regards,
Subrahmanyam
"Kwan, Kenneth Y" wrote:
>
> Hi
>
> I'm using JRun Servlet Engine and have an application which requires to
keep
> track of statistics for the whole application. Can anyone advise me how
to:
>
> - create and share a persistent object for application statistics purpose
> when the JSE starts
> - all the Servlets can access the shared object
>
> Thanks in advance
>
> Kenneth Kwan
>
-----------------------------------------------------------------------
Dr. Subrahmanyam A.V.B.
http://www.Subrahmanyam.com
-----------------------------------------------------------------------
___________________________________________________________________________
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