axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepal Jayasinghe <dee...@opensource.lk>
Subject Re: Concurrency in RPC Service with transportscope
Date Mon, 01 Jan 2007 16:57:15 GMT
Hi  Ivan ;
pls see my comment below;

>Hello All,
>
>  I submitted improvement request into JIRA (http://issues.apache.org/jira/browse/AXIS2-1911)
>  And after I done some testing one more question arise.
>
>  I have a simple RPC service with transportscope running on http port.
>  So according to the doc's Axis will bound my service to the transport session, in my
case it is HttpSession,
>  and will use the same service for all requests within a session.
>  
>
Yes , the same service impl will be used to serve all the request coming
through that particular transport session.

>  So the question how is Axis handle concurrency when service implementation need to have
an access to the session ?
>  
>
Axis2 handle that using Thread Local , where we store the message
context in side the the TL and service impl need to get the session
using MessageContext. Other than that Axis2 dose not handle any concurrency.

>  Because my proposed solution for AXIS-1911 is not thread safe without obtaining a monitor
on service implementation.
>
>  Is there are a way to notify implementation when it is bound to the session and unbound
?
>  
>
Yes ,
when the session start it will call;
init(ServiceContext sc){
}

and when the session finishes;
destroy(ServiceContext  sc){
}

You can add those two methods into your service impl class , then those
will be called using java reflection.

Thanks
Deepal

>  It will be most desirable behavior and thread safe.
>
>  
>




---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message