Re: Stateful Web Services...

Harald Fuchs <[email protected]>
Newsgroups gmane.comp.web.services.general
Organization Linux Private Site
Message-ID <[email protected]>
In article <[email protected]>,
Cristóvão Bento <[email protected]> writes:

> Although there is one last thing that is confusing me. A Web Service
> life is controled by a Web Server like for example Tomcat. When a
> request arrives, the class that implements the request is
> dynamically loaded and the request is executed. When the request
> ends the class is deallocated. This means this class cannot maintain
> its internal state. Any kind of data that was kept by it is garbage
> collected.

Nobody sys that you need something like Tomcat to implement a web
service.  A small Perl script, started by inetd, would do likewise.

If you want to maintain state, you need two things:
1. A stable "backend" where you can store state, independent of the
   lifetime of the code implementing the web service
2. A way to identify the requestor for whom you want to maintain
   state, something like a cookie.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.