>>> Bo Xu <[EMAIL PROTECTED]> 06-Mar-01 4:15:31 PM >>>

>*  but I think HttpSession can be across multi server", but
>perhaps the above "AsyncServletSession" can not do it:
>because I guess the "underlying TCP socket" can not be
>"redirected"  to another server, or is it possible? thanks
>in advance! :-)

Yes this is possible, but not in the way you've written it. Dave
Brosius showed how in an email a few days ago. There is no need to
override the session.

However, IMHO it is not wise to do this. You are fighting against the
HTTP protocol and the servlet API. It is messy and inelegant. It is
probably not nice to it's mother. It does not smell good and it keeps
a gun in it's back pocket.


All APIs have design limitations. Sometimes the limitations are
useful, sometimes not so useful. The synchronous nature of the Servlet
API is a limitation - but it's not an important limitation. Solutions
are possible without changing the API; eg: green threads. JSR051 may
bring us new ways of implementing containers and I'm sure that some
container vendors will try to fill the gap, it'll be interesting to
see what use people can make of any resulting work.

But working within the design limitations of an API is what makes us
good programmers, good designers. By exploring what you can do within
the constraints instead of fighting against them you will find elegant
solutions to problems which at first might seem insummountable.

Many things can be done within the Servlet API and if you think
carefully about your design you can achieve some really cool things
without a huge amount of effort. The API is not a silver bullet
however, it can't do everything. You do need other tricks up your
sleeve.


My last word about async for now is that I'd like to hear about some
of the things that people don't think can be done without async io.


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

Reply via email to