I prefer either option 1 or better have a singleton object.
-----Original Message-----
From: Partha Ranjan Das [mailto:partharanjan.d@(protected)]
Sent: Tuesday, September 16, 2003 6:46 PM
To: JSP-INTEREST@(protected)
Subject: using static properties vs. servletcontext for storing
applicatio n scope objects
Hi all,
I have to store a Java object into an application scope. I am to decide
between two possible implementations viz.:
1. use a class with some static properties and some static accessor methods
which can be accessed by any JSP/servlet thread. The shared (application )
object will be there in the static property and will be accessed by the
static methods.
2. use ServletContext's getAttribute() and setAttribute() methods.
I want to know which method is a better approach for a web site with
possibly 3000 concurrent users?
Thanks in advance.
Regards,
Partha
*********************************************************************
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: mailto listserv@(protected)
JSP-INTEREST".
For digest: mailto listserv@(protected)
DIGEST".
Some relevant archives, FAQs and Forums on JSPs can be found at:
http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
http://forums.java.sun.com
http://www.jspinsider.com
DISCLAIMER:
This message (including attachment if any) is confidential and may be privileged. Before opening attachments please check them for viruses and defects. MindTree Consulting Private Limited (MindTree) will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission.
===========================================================================
To unsubscribe: mailto listserv@(protected)".
For digest: mailto listserv@(protected)".
Some relevant archives, FAQs and Forums on JSPs can be found at:
http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
http://forums.java.sun.com
http://www.jspinsider.com