You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Stephan Cleaves <sc...@kana.com> on 2000/10/19 19:08:50 UTC

Question about scope

Can someone explain to me what the different scopes mean in the deployment
descriptor?

There seem to be Request, Session, and Application. The examples appear to
use Application. Looking into the servlet code it appears that in some cases
the SOAP service class gets reused and it others it gets newinstanced
everytime a request arrives. I'd like to have a handle on how to control
this.

stephan


##
Stephan R. Cleaves
Java/Unix Senior Software Engineer
Kana Communications
phone: 603.665.1269
fax: 603.665.1869
mailto:stephan.cleaves@kana.com



Re: Question about scope

Posted by Cory Isaacson <ci...@capita2.com>.
Refer to the Java Servlet documentation. This is the same scope as specified
for Java Servlets.

Cory
----- Original Message -----
From: "Stephan Cleaves" <sc...@kana.com>
To: <so...@xml.apache.org>
Sent: Thursday, October 19, 2000 10:08 AM
Subject: Question about scope


> Can someone explain to me what the different scopes mean in the deployment
> descriptor?
>
> There seem to be Request, Session, and Application. The examples appear to
> use Application. Looking into the servlet code it appears that in some
cases
> the SOAP service class gets reused and it others it gets newinstanced
> everytime a request arrives. I'd like to have a handle on how to control
> this.
>
> stephan
>
>
> ##
> Stephan R. Cleaves
> Java/Unix Senior Software Engineer
> Kana Communications
> phone: 603.665.1269
> fax: 603.665.1869
> mailto:stephan.cleaves@kana.com
>
>


Re: Question about scope

Posted by Cory Isaacson <ci...@capita2.com>.
Refer to the Java Servlet documentation. This is the same scope as specified
for Java Servlets.

Cory
----- Original Message -----
From: "Stephan Cleaves" <sc...@kana.com>
To: <so...@xml.apache.org>
Sent: Thursday, October 19, 2000 10:08 AM
Subject: Question about scope


> Can someone explain to me what the different scopes mean in the deployment
> descriptor?
>
> There seem to be Request, Session, and Application. The examples appear to
> use Application. Looking into the servlet code it appears that in some
cases
> the SOAP service class gets reused and it others it gets newinstanced
> everytime a request arrives. I'd like to have a handle on how to control
> this.
>
> stephan
>
>
> ##
> Stephan R. Cleaves
> Java/Unix Senior Software Engineer
> Kana Communications
> phone: 603.665.1269
> fax: 603.665.1869
> mailto:stephan.cleaves@kana.com
>
>


Re: Question about scope

Posted by Steve Dunham <du...@cse.msu.edu>.
On Thu, Oct 19, 2000 at 12:29:20PM -0500, chuck clark wrote:

> i've been wondering the same thing....
> if it follows the standard convention then there are four scopes
> Application - shared by everyone on the server
> Session - An instance will be created and live throughout the life of the
> HTTP session
> Request - Used only on the current request and then expires
> Page - very similar to request but i haven't figured out the subtle
> difference...only that this is the default scope for a JSP
 
> so if you have applications which are stateless then go ahead and put it at
> application scope and it will be shared among everyone on the server

Note that the Session scope doesn't seem to work with the client code
in Apache Soap 2.0 unless you subclass SOAPHTTPConnection to wrap
send() with cookie handling code.  

(I'm planning on using the session scope to store userid and other
per-session state information in my SOAP application.)


Steve
dunham@cse.msu.edu

Re: Question about scope

Posted by Steve Dunham <du...@cse.msu.edu>.
On Thu, Oct 19, 2000 at 12:29:20PM -0500, chuck clark wrote:

> i've been wondering the same thing....
> if it follows the standard convention then there are four scopes
> Application - shared by everyone on the server
> Session - An instance will be created and live throughout the life of the
> HTTP session
> Request - Used only on the current request and then expires
> Page - very similar to request but i haven't figured out the subtle
> difference...only that this is the default scope for a JSP
 
> so if you have applications which are stateless then go ahead and put it at
> application scope and it will be shared among everyone on the server

Note that the Session scope doesn't seem to work with the client code
in Apache Soap 2.0 unless you subclass SOAPHTTPConnection to wrap
send() with cookie handling code.  

(I'm planning on using the session scope to store userid and other
per-session state information in my SOAP application.)


Steve
dunham@cse.msu.edu

Re: Question about scope

Posted by chuck clark <cc...@ziclix.com>.
i've been wondering the same thing....
if it follows the standard convention then there are four scopes
Application - shared by everyone on the server
Session - An instance will be created and live throughout the life of the
HTTP session
Request - Used only on the current request and then expires
Page - very similar to request but i haven't figured out the subtle
difference...only that this is the default scope for a JSP

so if you have applications which are stateless then go ahead and put it at
application scope and it will be shared among everyone on the server

chuck

Stephan Cleaves wrote:

> Can someone explain to me what the different scopes mean in the deployment
> descriptor?
>
> There seem to be Request, Session, and Application. The examples appear to
> use Application. Looking into the servlet code it appears that in some cases
> the SOAP service class gets reused and it others it gets newinstanced
> everytime a request arrives. I'd like to have a handle on how to control
> this.
>
> stephan
>
> ##
> Stephan R. Cleaves
> Java/Unix Senior Software Engineer
> Kana Communications
> phone: 603.665.1269
> fax: 603.665.1869
> mailto:stephan.cleaves@kana.com


Re: Question about scope

Posted by chuck clark <cc...@ziclix.com>.
i've been wondering the same thing....
if it follows the standard convention then there are four scopes
Application - shared by everyone on the server
Session - An instance will be created and live throughout the life of the
HTTP session
Request - Used only on the current request and then expires
Page - very similar to request but i haven't figured out the subtle
difference...only that this is the default scope for a JSP

so if you have applications which are stateless then go ahead and put it at
application scope and it will be shared among everyone on the server

chuck

Stephan Cleaves wrote:

> Can someone explain to me what the different scopes mean in the deployment
> descriptor?
>
> There seem to be Request, Session, and Application. The examples appear to
> use Application. Looking into the servlet code it appears that in some cases
> the SOAP service class gets reused and it others it gets newinstanced
> everytime a request arrives. I'd like to have a handle on how to control
> this.
>
> stephan
>
> ##
> Stephan R. Cleaves
> Java/Unix Senior Software Engineer
> Kana Communications
> phone: 603.665.1269
> fax: 603.665.1869
> mailto:stephan.cleaves@kana.com