Session Connection pooling in Axis2 WS
0 answers - 5306 bytes -

Hi Paul,
If my web-service is in Request/ Session scope, which means one instance for every single request.
Then if my web service on its process involves creating a singleton object (e.g.: DBConnection Pooling, etc.), will it break the singleton concept, as it will create one singleton for each single request/ service object?
What will be the correct way to design this?
Separate them as a separate web-services, one set in 'request' session and the singleton one set in 'application' session?
Thanks in advance,
wen
Message
From: Paul Fremantle [mailto:pzfreo (AT) gmail (DOT) com]
Sent: January 26, 2007 7:55 AM
To: axis-user (AT) ws (DOT) apache.org
Subject: Re: Session Connection pooling in Axis2 WS
Session scope is simply the lifecycle of the objects and state that
Axis2 manages.
So if you define request, then each new request will instantiate a new service object.
If you define transportsession, then Axis2 will use HTTP cookies. Each client will re-use the same service object.
If you define soapsession, it will do the same thing, except using SAP headers instead of cookies.
If you define application, then you will have a single service object for all requests.
It is up to you to make sure that youre object can support the right threading model for application. For request you need not worry about thread safety because each request has its own service object.
Paul
1/26/07, Stadelmann Josef <josef.stadelmann (AT) winterthur (DOT) chwrote:
Sanjiva
What is session scope?
you have to define one of
scope=request
scope=transportsession
scope=soapsession
scope=application
which one do you mean?
Josef
Nachricht
Von: Sanjiva Weerawarana [mailto:sanjiva (AT) opensource (DOT) lk]
Gesendet: Donnerstag, 25. Januar 2007 06:29
An: axis-user (AT) ws (DOT) apache.org
Betreff: RE: Session Connection pooling in Axis2 WS
--
It depends on the "scope" of the service if its deployed in
application scope then only one instance is created. If its in session
scope then its one instance per session and so on.
See: http://wso2.org/library/231
Sanjiva.
Wed, 2007-01-24 at 11:45 -0500, Ho, Wen Yue wrote:
Hi,
I think my question is not clear and confusing.
Sorry, a newbie here :-)
Please allow me to re-phrase my question.
How does Axis2 handle multiple request to the webservices?
AFAIK, Axis2 is a servlet and by default, a (single) servlet should
be able to handle multiple HTTP requests.
For each incoming request session, will axis (servlet) instantiate
just one instance of the websrvice class for multiple requests?
it will instantiate one webservice object for each request?
Your assistance will be highly appreciated.
Thank you.
>
>
>
>
__
From: Ho, Wen Yue [mailto:WenYue.Ho (AT) tdsecurities (DOT) com]
Sent: January 23, 2007 2:26 PM
To: axis-user (AT) ws (DOT) apache.org
Subject: Session Connection pooling in Axis2 WS
>
>
>
Hi,
I have a legacy system that provides an API to access the system
thru their own Session object.
I need to pool this session objects within my web services developed
using Axis2.
Correct me if I'm wrong.
AFAIK, Axis2 by default will make one thread per request to the web
service.
I think this means singleton class won't work, since one thread will
instantiate one singleton.
Any advice on how to do this?
Thanks in advance.
--
NTICE F CNFIDENTIALITY
This communication including any information transmitted with it is
intended only for the use of the addressees and is confidential.
If you are not an intended recipient or responsible for delivering
the message to an intended recipient, any review, disclosure,
conversion to hard copy, dissemination, reproduction or other use of
any part of this communication is strictly prohibited, as is the
taking or omitting of any action in reliance upon this communication.
If you receive this communication in error or without authorization
please notify us immediately by return e-mail or otherwise and
permanently delete the entire communication from any computer, disk
drive, or other storage medium.
If the above disclaimer is not properly readable, it can be found at
www.td.com/legal
AVERTISSEMENT DE CNFIDENTIALITE
Ce courriel, ainsi que tout renseignement ci-inclus,
uniquement aux destinataires , est confidentiel. Si
vous n' pas le destinataire ou un agent responsable de la
livraison de ce courriel, tout examen, divulgation, copie,
impression, reproduction, distribution, ou autre utilisation d'une
partie de ce courriel est strictement interdit de que toute
intervention ou abstraction cet Si vous avez ce
message par erreur ou sans autorisation, veuillez en aviser
l' par retour de courriel ou par un autre
moyen et supprimer cette communication de tout
Si l'avis de ci-dessus n'est pas lisible, vous
pouvez le consulter www.td.com/francais/legale