----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
on 2/1/00 3:56 AM, Stefanos Karasavvidis <[EMAIL PROTECTED]> wrote:
> Maybe this is not the right place for this but after the notice of jon about
> the depracated method ServletContext.getServlet() I was shaked up because
> almost all of my database logic depend on this.
<joking> That was stupid. ;-)
> Now, the API for says that the getServlet() method will return null (!!) and
> "In lieu of this method, servlets can share information using the
> ServletContext class and
> can perform shared business logic by invoking methods on common non-servlet
> classes."
Yes, this has been in effect since JSDK 2.1 so it really should not be that
big of a surprise since it has been out for a long time. It has also been
common knowledge on these lists to not depend on those methods...I would say
for about a year now.
> Now it seems to me that the most adequate replacement would eb to put shared
> resources to the ServletContext with the
> ServletContext.setAttribute() method.
No, again a bad idea. The best way to do this is to use a connection pool
scheme like what is developed in Turbine.
<http://java.apache.org/turbine/>
The solution is a Singleton based system.
> The question which remains is how different servlet contexts are created.....
> would this be equivalent to jservs servlet-zones???
Essentially yes.
> And are all contexts handled by the same virtual machine??
Not necessarily. Hence the separation.
-jon
--
Come to the first official Apache Software Foundation
Conference! <http://ApacheCon.Com/>
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]