>>> "Christopher K. St. John" <[EMAIL PROTECTED]> 02-Nov-00 1:03:40 AM
>>>
Chris said:
>>> the context can be taken up and down as well :-)
and Nic replied:
>> True... but if that happens don't you want any listening
>> socket to go away?
Chris rejoined:
>The problem is that the servlet container is not going to
>know about your socket, so it (or the admin) might decide to
>shut down your servlet in the middle of a socket communication.
>You don't have any control over that.
Yes you do. A ServletContext lifecycle event can take your Socket
down cleanly.
>I was assuming that in addition to admin considerations,
>a long running servlet container might want to deactivate
>unused webapps if it started to run out of resources. I'd
>be interested in hearing the lowdown...
Yes it might want to... but IMHO it would be a bad idea. If you
haven't got the resources to host the webapps you're hosting then
don't host them. A better solution is to have a container which
throttles resources being ued by webapps so you don't, overall, run
out.
But I do take your point - some people might want to use it like
this. That's why I say "get a container that does what *you* want".
>In addition to the possibility above, I can imagine that
>ISPs hosting servlets for customers would also probably
>find it useful to be able to shutdown/restart a particular
>webapp without taking down all the other webapps.
Yes... as I said admin reasons are fair enough. But arbritary
shutdowns? I don't think so.
>Same goes for high availability systems that want to
>upgrade code on the fly.
But webapps are reloadable... that's one of the great things about
containers/webapps - it's easy for the container to manage all of
those normally very painfull operations.
>But depending on how it's deployed, the person writing the
>app and the person administering the container may have no
>contact with one another.
A commercial servlet which is going to be used in many different
containers needs to behave imspecably (geddit?). However, I don't
think there are a lot of commercial servlets around right now... the
focus of my argument was on the whole design process.
eg: you're building an ecommerce site which you expect to recieve 20
million customers a minute. You're going to have a shopping basket
which will carry the product ids of items purchased.
In such a scenario you don't use Tomcat (yet) because it hasn't got
session load balancing... you chose a container that *can* do that.
All I'm saying with all of this is that when you're designing things
remember that everything be interlinked can make everything simpler as
well as more complicated.
Nic
___________________________________________________________________________
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