You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Stadelmann Josef <jo...@winterthur.ch> on 2006/12/11 08:46:50 UTC

AW: sesion managment, scope=soapsession

Hi Deepal
pls see my coment below

-----Ursprüngliche Nachricht-----
Von: Deepal Jayasinghe [mailto:deepal@opensource.lk]
Gesendet: Mittwoch, 29. November 2006 17:27
An: axis-user@ws.apache.org
Betreff: Re: sesion managment, scope=soapsession


Hi Stadelmann ;
pls see my comments below;

> Hi session-managers,
>
>
> I'm running my client and server with modules addressing-1.1, logging,
> soapmonitor-1.1 engaged and have set scope=soapsession
>
> MyService.java got the additional methods
>  
>    public void init(ServiceContext sCtx) {
>         this.sc = sCtx;
>         this.log.info(sc.toString()+" init() called ");
>     }
>    
>     public void destroy(ServiceContext sCtx) {
>         if(!this.sc.toString().equals(sCtx.toString())){
>             this.log.error("ServiceContext on init() and destroy() not
> equal in ");
>         }
>         this.log.info(sc.toString()+" destroy() called ");
>     }
>
>     public void setOperationContext(OperationContext oCtx) {
>         this.oc = oCtx;
>         this.log.info(oc.toString()+" setOperationContext() called
> ");       
>     }
>
We have removed this method (it was there in Axis2 1.0 , but we removed
that from Axis2 1.1), so we are no longer going to call this method . If
you want to get access to operation context , then you can do that as
follows;
MessageContext msgCtx = MessageContext.getCurrentContext();

from msgCtx you can access any of the contexts you want .

OK - i take this into consideration



>  
>
> I start client #1 which has the effect that MyService.init() is
> called; so far so right!
> Client #1 then loops and sends continously messages to MyService.echo()
> I start client #2 which has the effect that MyService.destroy() is
> called followed by MyService.init()
> This has the effect that client #1 fails with an "invalid group
> context id exception"
>
> Is this a bug?
>
Nope. That is not a bug , soapsession has concept of time out , so once
it gets time out you will get that exception.


My client #1 runs continously, and sends arround 40 msg a second to the server. 
When the second client starts, cline t#1 is still sending messages and so we do 
not have a time-out condition. client #1 never times out.

BUT as I decribe, using the code shown, when client #2 starts MyService.destroy() 
is called followed by MyService.init() which has the effect that client #1 fails 
thereafter with an "invalid group context id exception"


>
>
> I have studied the architecture of axis2 and have drilled down in code
> and I came down to where alle the service objects are finally called
> at "invokeBusinessLogic" (inCtx, outCtx)  with it's call to
> "method.invoke" ( . . . )
>
good .

> All reading in code and documentation did not answer my questions ***
> How does Axis2 manage / support long-lasting-sessions to
> server-objects bound to this session ? ***
>
> Do I have to implement this myself on top of Axis2?
>
No , you can get support from Axis2 session management. If you have
Axis2 1.1 distribution there you can find a sample called Library sample
, which help you to understand most of the important factors.


I would appreciate an example on how to have a scenario as I describe.
When I read literature about tomcat, retriving a session object from the 
clients request object, it seems that internals are figuring out which client 
is calling and the rigth session object which acts as data store for the
session is returned/created. 

How is that with AXIS2-1.1?




 

>
> 1. I want to have a client-object exchanging OMElements with it's
> service-class-object.
>
yes , doable

> 2. when the client starts the session, up on receiving the first
> message, a unique instance of the service-class-object shall be
> created at the server.
>
yes , that is what happen.

When the MyService Object gets created I store the creation time for the
instance in a instance variable. And when multiple clients run without
scope=soapsession set, all clients return the same time stamp. So that
means for me! client #1 makes axis2 creating a first instance of a class,
and places the creation timestamp.

This is called an object, and client #2 sends his message to the same instance
the same object. When the call to client 2 returns, client #2 finds the same 
time stamp as client #1 has. But when client #2 starts 10 seconds after client #1,
I would expect that client #2 has a different object-creation-timestamp
then client #1 unless we talk to the same instance (which I cant use).
Josef





> 2a) 20 client objects shall mean we have instantiated 20
> dedicated-server-objects
>
yes.

> 3. as long as this 20 service-class-object exists, in fact 20
> wrapper-object to 20 external server process, and as long as this 20
> external process exist it shall not be allowed that one single
> service-class-object dies. for that reasioon the server-objects must
> exist until it's dedicated client terminates the session esplicitly by
> calling logout() on the server-object.
>
Nope , the behavior of soapsession is not like that. It has a notion of
time out. If the user does not touch the service for about 30s (time
interval is configurable) , then the session will be automatically
terminated.



Again - my clients 1 to 20 do continously send messages, each client in
its thread - I am using NetBeans and I am just launching more then one
client. So each client is fully busy sending. But each client gets 
responses from the same server object instance. And we have not a time-out
condition as each client continously sends. Once we come to real clients
where usesers invoke messages we wil care about timeouts. But as long as
client code jsut loops in a for() we do not have time-outs, even not with
20 sessions, but in our example using scope=soapsession, we do not get that
far, as client #1 runs until client #2 starts, which makes client #1 fail
with "invalid service group context id"
Josef



> 4. every message sent by a client has to reach exact the same instance
> of the service-class-object as the previous message did, anything else
> would be considerd a security risk, a fault, an error.
>
yes , we are mapping to the same session using special header parameter
called "ServiceGroupID"


That does not work in my mind, at least it can not be used to keep separate
sessions. Why is the "service group context id" re-created by the second client
making the first running client fail?
Josef




>
>
> I have read in a dcoument about axis session managment @
> http://www.developer.com/java/web/print.php/3620661 "that axis2 is
> meant to be an enterprise web service engine, so it has to support
> session management."
>
The article is little bit out dated , since we had few changes from
Axis2 1.0 to 1.1



So where is a new articel reflecting the same topic?
What values does this articel have among well undestood generics when
I can not count on the little code fragments given. Also a previous
mail has lead me to this articel. So how far is it outdated?
Josef


> I have read all related e-mails and implemented soap-sessions which
> work nicely with one client and one server. But they die when the
> second client starts as descibed above. the second client creates a
> new service-group-id when and the old one gets lost. THis happens in
> my mind because destry is called implicit. So client-1 then fails as
> it's known service-group-id does no longer exist.
>
>
>
> I have not found in all the e-mail of the past 3 months a clear idea
> or an answer to this often asked questions about "how to implement
> sessions to such server side obejcts".
>
> I must admit, I do not understand how ws-addressing supports my demand.
>
> Can I managment my sessions with axis2 in an elegant way or do I have
> to fall-back to servlets and tomcat?
>
> I would really appreciate any answers and thank you very much to
> answer my burning question not only for my own satisfaction. Thank you.
>
> Josef
>

-- 
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"




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


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


Re: AW: sesion managment, scope=soapsession

Posted by Davanum Srinivas <da...@gmail.com>.
Thanks a ton Rob for tracking this problem down. Thanks Josef for your
patience :) I fixed the default axis2.xml and updated the comment
there.

thanks,
dims

On 3/6/07, Stadelmann Josef <jo...@winterthur.ch> wrote:
> Hi Rob,
> Hi Deepal
>
> Thank you very much Rob, what you write below is the solution to my problem.
> JIRA AXIS2-1991 must remain open until this is fixed in documentation and in AXIS2.XML or in code or both or vice versa.
>
> I have adjusted AXIS2.XML ConfigContextTimeoutInterval to 30000 (now expresing a timeout in milliseconds) and all clients running in
> parallel threads are now working very fine in scope=soapsession.
>
> This error has costed me weeks of work!!!! including communication and missunderstandings with others. Rob, thank you very much again.
>
> Josef Stadelmann
>
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Rasile, Rob [mailto:rob.rasile@ethoca.com]
> Gesendet: Montag, 5. März 2007 20:34
> An: axis-user@ws.apache.org
> Betreff: RE: AW: sesion managment, scope=soapsession
>
>
> I've been having the same issue.  I traced through the axis2 source and found the following:
>
> 1) Axis2 has a ConfigContextTimeoutInterval parameter in axis2.xml that by default is set to 30 with a comment stating this is in seconds.
> 2) Whenever the axis2.apache.axis2.context.ConfigurationContext registers a new ServiceGroupContext (resgisterServiceGroupContext), it adds the servicegroupid to a hashmap (serviceGroupContextMap), then "cleans-up" the hashmap using the following logic:
>
> A timeout has occurred if currentTime - serviceGroupContext.getLastTouchedTime() > ConfigContextTimeoutInterval
>
> The issue is that currentTime and lastTouchedTime are measured in millisecs (they are longs), whereas ConfigContextTimeout is treated as seconds (simply because the value in the axis2.xml is entered as secs). Therefore axis2 always thinks that context has timed-out and removes it.
>
> My solution was to modify the axis2.xml ConfigContextTimeoutInterval
> (ie. multiply it by 1000).  Looks like this was intended to be millisecs based on these lines of code from ConfigurationContext:
>
> // current time out interval is 30 secs. Need to make this configurable
>     private long serviceGroupContextTimoutInterval = 30 * 1000;
>
> I think that in the implementation of the configurable timeout the documentation just didn't get updated.
>
>
> -----Original Message-----
> From: Stadelmann Josef [mailto:josef.stadelmann@winterthur.ch]
> Sent: Monday, March 05, 2007 11:28 AM
> To: axis-user@ws.apache.org
> Subject: AW: AW: sesion managment, scope=soapsession
>
> Hi Deepal,
>
> See my coment below +++>
>
> -----Ursprüngliche Nachricht-----
> Von: Deepal Jayasinghe [mailto:deepal@opensource.lk]
> Gesendet: Dienstag, 12. Dezember 2006 06:37
> An: axis-user@ws.apache.org
> Betreff: Re: AW: sesion managment, scope=soapsession
>
>
> Hi  Stadelmann ;
>
> >
> >My client #1 runs continously, and sends arround 40 msg a second to the server.
> >When the second client starts, cline t#1 is still sending messages and so we do
> >not have a time-out condition. client #1 never times out.
> >
> >BUT as I decribe, using the code shown, when client #2 starts MyService.destroy()
> >is called followed by MyService.init() which has the effect that client #1 fails
> >thereafter with an "invalid group context id exception"
> >
> >
> hmmm, can you please help me to re-create the problem. If you can send
> me the sample services and clients that will be very helpful for me to
> fix the issue.
>
> >
> >I would appreciate an example on how to have a scenario as I describe.
> >When I read literature about tomcat, retriving a session object from the
> >clients request object, it seems that internals are figuring out which client
> >is calling and the rigth session object which acts as data store for the
> >session is returned/created.
> >
> >How is that with AXIS2-1.1?
> >
> >
> Will write a sample soon .
> +++> Do you have an example now showing how to maintain statefull session objects?
>
>
>
>
> >When the MyService Object gets created I store the creation time for the
> >instance in a instance variable. And when multiple clients run without
> >scope=soapsession set, all clients return the same time stamp. So that
> >means for me! client #1 makes axis2 creating a first instance of a class,
> >and places the creation timestamp.
> >
> >
> That can not happen , there should be a separate service impl class for
> each client, Im 100% sure about that since I have tested that. :)
>
> +++> and what happens if the service class or variables such as the
> time stamp are defined static. I have just now read a book about the Java Nativ Interface
>
>
> The Java programming language supports two kinds of fields. Each instance of a
> class has its own copy of instance fields of the class, whereas all instances of
> a class share the static fields of a class.
>
>
> I think this answers why my time stamp, which was implemented as a static field,
> returnes to each client the same date/time, the time it was last overwritten
> when a instance gets created.
>
>
> NOTE: Instances migth still be separate and be running in different threads but
> as long as the time stamp field is static, each class returns to each related
> client the same time stamp what ever value it is.
> <++++
>
>
>
>
>
>
>
>
>
>
> >This is called an object, and client #2 sends his message to the same instance
> >the same object. When the call to client 2 returns, client #2 finds the same
> >time stamp as client #1 has. But when client #2 starts 10 seconds after client #1,
> >I would expect that client #2 has a different object-creation-timestamp
> >then client #1 unless we talk to the same instance (which I cant use).
> >Josef
> >
> >
> Are u keeping your value as a static ? I mean are u storing your value
> in a static variable  ?
>
> +++> I have answered this question with yes, but I did not realise until now
> the difference of private static and private fields of a class.
> <+++
>
>
>
> >Again - my clients 1 to 20 do continously send messages, each client in
> >its thread - I am using NetBeans and I am just launching more then one
> >client. So each client is fully busy sending. But each client gets
> >responses from the same server object instance. And we have not a time-out
> >condition as each client continously sends. Once we come to real clients
> >where usesers invoke messages we wil care about timeouts. But as long as
> >client code jsut loops in a for() we do not have time-outs, even not with
> >20 sessions, but in our example using scope=soapsession, we do not get that
> >far, as client #1 runs until client #2 starts, which makes client #1 fail
> >with "invalid service group context id"
> >Josef
> >
> >
> Are you sending service group id in each request , or you juts send as
> new req ?
> If you want to go into same soapsession , then you need to send the
> serviceGroupID
>
>
> +++> I logged thisi as JIRA AXIS2-1991 - if we share somehow the location
> where the ServiceGroupContextID is taken from or stored, then, when a second
> client calls and Axis2 does not check somehow that a ServiceGroupContextID is
> already created, it will override the existing one. I do not know if that
> is true, but if the ID gets overridden, then we ghave at least the mentioned
> effect.
>
> As simple as have an ID it in a static field. This migth be true for a larger
> object modells as well as simple variables ... sharing versus non sharing
> wether this is happen in the same thread or in different threads,
> makes it just more complex. <+++
>
>
>
> >>I have read in a dcoument about axis session managment @
> >>http://www.developer.com/java/web/print.php/3620661 "that axis2 is
> >>meant to be an enterprise web service engine, so it has to support
> >>session management."
> >>
> >>
> >>
> >The article is little bit out dated , since we had few changes from
> >Axis2 1.0 to 1.1
> >
> >
> >
> >So where is a new articel reflecting the same topic?
> >What values does this articel have among well undestood generics when
> >I can not count on the little code fragments given. Also a previous
> >mail has lead me to this articel. So how far is it outdated?
> >Josef
> >
> >
> >
> I will update that and publish soon.
>
> Thanks
> Deepal
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers

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


AW: AW: sesion managment, scope=soapsession

Posted by Stadelmann Josef <jo...@winterthur.ch>.
Hi Rob,
Hi Deepal

Thank you very much Rob, what you write below is the solution to my problem.
JIRA AXIS2-1991 must remain open until this is fixed in documentation and in AXIS2.XML or in code or both or vice versa.

I have adjusted AXIS2.XML ConfigContextTimeoutInterval to 30000 (now expresing a timeout in milliseconds) and all clients running in
parallel threads are now working very fine in scope=soapsession.

This error has costed me weeks of work!!!! including communication and missunderstandings with others. Rob, thank you very much again.

Josef Stadelmann




-----Ursprüngliche Nachricht-----
Von: Rasile, Rob [mailto:rob.rasile@ethoca.com]
Gesendet: Montag, 5. März 2007 20:34
An: axis-user@ws.apache.org
Betreff: RE: AW: sesion managment, scope=soapsession


I've been having the same issue.  I traced through the axis2 source and found the following:

1) Axis2 has a ConfigContextTimeoutInterval parameter in axis2.xml that by default is set to 30 with a comment stating this is in seconds.
2) Whenever the axis2.apache.axis2.context.ConfigurationContext registers a new ServiceGroupContext (resgisterServiceGroupContext), it adds the servicegroupid to a hashmap (serviceGroupContextMap), then "cleans-up" the hashmap using the following logic:

A timeout has occurred if currentTime - serviceGroupContext.getLastTouchedTime() > ConfigContextTimeoutInterval

The issue is that currentTime and lastTouchedTime are measured in millisecs (they are longs), whereas ConfigContextTimeout is treated as seconds (simply because the value in the axis2.xml is entered as secs). Therefore axis2 always thinks that context has timed-out and removes it.  

My solution was to modify the axis2.xml ConfigContextTimeoutInterval 
(ie. multiply it by 1000).  Looks like this was intended to be millisecs based on these lines of code from ConfigurationContext:

// current time out interval is 30 secs. Need to make this configurable
    private long serviceGroupContextTimoutInterval = 30 * 1000;

I think that in the implementation of the configurable timeout the documentation just didn't get updated.    


-----Original Message-----
From: Stadelmann Josef [mailto:josef.stadelmann@winterthur.ch] 
Sent: Monday, March 05, 2007 11:28 AM
To: axis-user@ws.apache.org
Subject: AW: AW: sesion managment, scope=soapsession

Hi Deepal,

See my coment below +++>

-----Ursprüngliche Nachricht-----
Von: Deepal Jayasinghe [mailto:deepal@opensource.lk]
Gesendet: Dienstag, 12. Dezember 2006 06:37
An: axis-user@ws.apache.org
Betreff: Re: AW: sesion managment, scope=soapsession


Hi  Stadelmann ;

>
>My client #1 runs continously, and sends arround 40 msg a second to the server. 
>When the second client starts, cline t#1 is still sending messages and so we do 
>not have a time-out condition. client #1 never times out.
>
>BUT as I decribe, using the code shown, when client #2 starts MyService.destroy() 
>is called followed by MyService.init() which has the effect that client #1 fails 
>thereafter with an "invalid group context id exception"
>  
>
hmmm, can you please help me to re-create the problem. If you can send
me the sample services and clients that will be very helpful for me to
fix the issue.

>
>I would appreciate an example on how to have a scenario as I describe.
>When I read literature about tomcat, retriving a session object from the 
>clients request object, it seems that internals are figuring out which client 
>is calling and the rigth session object which acts as data store for the
>session is returned/created. 
>
>How is that with AXIS2-1.1?
>  
>
Will write a sample soon .
+++> Do you have an example now showing how to maintain statefull session objects?




>When the MyService Object gets created I store the creation time for the
>instance in a instance variable. And when multiple clients run without
>scope=soapsession set, all clients return the same time stamp. So that
>means for me! client #1 makes axis2 creating a first instance of a class,
>and places the creation timestamp.
>  
>
That can not happen , there should be a separate service impl class for
each client, Im 100% sure about that since I have tested that. :)

+++> and what happens if the service class or variables such as the 
time stamp are defined static. I have just now read a book about the Java Nativ Interface


The Java programming language supports two kinds of fields. Each instance of a
class has its own copy of instance fields of the class, whereas all instances of 
a class share the static fields of a class.


I think this answers why my time stamp, which was implemented as a static field,
returnes to each client the same date/time, the time it was last overwritten
when a instance gets created.


NOTE: Instances migth still be separate and be running in different threads but
as long as the time stamp field is static, each class returns to each related
client the same time stamp what ever value it is.
<++++










>This is called an object, and client #2 sends his message to the same instance
>the same object. When the call to client 2 returns, client #2 finds the same 
>time stamp as client #1 has. But when client #2 starts 10 seconds after client #1,
>I would expect that client #2 has a different object-creation-timestamp
>then client #1 unless we talk to the same instance (which I cant use).
>Josef
>  
>
Are u keeping your value as a static ? I mean are u storing your value
in a static variable  ?

+++> I have answered this question with yes, but I did not realise until now
the difference of private static and private fields of a class.
<+++



>Again - my clients 1 to 20 do continously send messages, each client in
>its thread - I am using NetBeans and I am just launching more then one
>client. So each client is fully busy sending. But each client gets 
>responses from the same server object instance. And we have not a time-out
>condition as each client continously sends. Once we come to real clients
>where usesers invoke messages we wil care about timeouts. But as long as
>client code jsut loops in a for() we do not have time-outs, even not with
>20 sessions, but in our example using scope=soapsession, we do not get that
>far, as client #1 runs until client #2 starts, which makes client #1 fail
>with "invalid service group context id"
>Josef
>  
>
Are you sending service group id in each request , or you juts send as
new req ?
If you want to go into same soapsession , then you need to send the
serviceGroupID


+++> I logged thisi as JIRA AXIS2-1991 - if we share somehow the location 
where the ServiceGroupContextID is taken from or stored, then, when a second 
client calls and Axis2 does not check somehow that a ServiceGroupContextID is
already created, it will override the existing one. I do not know if that
is true, but if the ID gets overridden, then we ghave at least the mentioned 
effect. 

As simple as have an ID it in a static field. This migth be true for a larger 
object modells as well as simple variables ... sharing versus non sharing 
wether this is happen in the same thread or in different threads, 
makes it just more complex. <+++



>>I have read in a dcoument about axis session managment @
>>http://www.developer.com/java/web/print.php/3620661 "that axis2 is
>>meant to be an enterprise web service engine, so it has to support
>>session management."
>>
>>    
>>
>The article is little bit out dated , since we had few changes from
>Axis2 1.0 to 1.1
>
>
>
>So where is a new articel reflecting the same topic?
>What values does this articel have among well undestood generics when
>I can not count on the little code fragments given. Also a previous
>mail has lead me to this articel. So how far is it outdated?
>Josef
>
>  
>
I will update that and publish soon.

Thanks
Deepal



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


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


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


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


RE: AW: sesion managment, scope=soapsession

Posted by "Rasile, Rob" <ro...@ethoca.com>.
I've been having the same issue.  I traced through the axis2 source and found the following:

1) Axis2 has a ConfigContextTimeoutInterval parameter in axis2.xml that by default is set to 30 with a comment stating this is in seconds.
2) Whenever the axis2.apache.axis2.context.ConfigurationContext registers a new ServiceGroupContext (resgisterServiceGroupContext), it adds the servicegroupid to a hashmap (serviceGroupContextMap), then "cleans-up" the hashmap using the following logic:

A timeout has occurred if currentTime - serviceGroupContext.getLastTouchedTime() > ConfigContextTimeoutInterval

The issue is that currentTime and lastTouchedTime are measured in millisecs (they are longs), whereas ConfigContextTimeout is treated as seconds (simply because the value in the axis2.xml is entered as secs). Therefore axis2 always thinks that context has timed-out and removes it.  

My solution was to modify the axis2.xml ConfigContextTimeoutInterval 
(ie. multiply it by 1000).  Looks like this was intended to be millisecs based on these lines of code from ConfigurationContext:

// current time out interval is 30 secs. Need to make this configurable
    private long serviceGroupContextTimoutInterval = 30 * 1000;

I think that in the implementation of the configurable timeout the documentation just didn't get updated.    


-----Original Message-----
From: Stadelmann Josef [mailto:josef.stadelmann@winterthur.ch] 
Sent: Monday, March 05, 2007 11:28 AM
To: axis-user@ws.apache.org
Subject: AW: AW: sesion managment, scope=soapsession

Hi Deepal,

See my coment below +++>

-----Ursprüngliche Nachricht-----
Von: Deepal Jayasinghe [mailto:deepal@opensource.lk]
Gesendet: Dienstag, 12. Dezember 2006 06:37
An: axis-user@ws.apache.org
Betreff: Re: AW: sesion managment, scope=soapsession


Hi  Stadelmann ;

>
>My client #1 runs continously, and sends arround 40 msg a second to the server. 
>When the second client starts, cline t#1 is still sending messages and so we do 
>not have a time-out condition. client #1 never times out.
>
>BUT as I decribe, using the code shown, when client #2 starts MyService.destroy() 
>is called followed by MyService.init() which has the effect that client #1 fails 
>thereafter with an "invalid group context id exception"
>  
>
hmmm, can you please help me to re-create the problem. If you can send
me the sample services and clients that will be very helpful for me to
fix the issue.

>
>I would appreciate an example on how to have a scenario as I describe.
>When I read literature about tomcat, retriving a session object from the 
>clients request object, it seems that internals are figuring out which client 
>is calling and the rigth session object which acts as data store for the
>session is returned/created. 
>
>How is that with AXIS2-1.1?
>  
>
Will write a sample soon .
+++> Do you have an example now showing how to maintain statefull session objects?




>When the MyService Object gets created I store the creation time for the
>instance in a instance variable. And when multiple clients run without
>scope=soapsession set, all clients return the same time stamp. So that
>means for me! client #1 makes axis2 creating a first instance of a class,
>and places the creation timestamp.
>  
>
That can not happen , there should be a separate service impl class for
each client, Im 100% sure about that since I have tested that. :)

+++> and what happens if the service class or variables such as the 
time stamp are defined static. I have just now read a book about the Java Nativ Interface


The Java programming language supports two kinds of fields. Each instance of a
class has its own copy of instance fields of the class, whereas all instances of 
a class share the static fields of a class.


I think this answers why my time stamp, which was implemented as a static field,
returnes to each client the same date/time, the time it was last overwritten
when a instance gets created.


NOTE: Instances migth still be separate and be running in different threads but
as long as the time stamp field is static, each class returns to each related
client the same time stamp what ever value it is.
<++++










>This is called an object, and client #2 sends his message to the same instance
>the same object. When the call to client 2 returns, client #2 finds the same 
>time stamp as client #1 has. But when client #2 starts 10 seconds after client #1,
>I would expect that client #2 has a different object-creation-timestamp
>then client #1 unless we talk to the same instance (which I cant use).
>Josef
>  
>
Are u keeping your value as a static ? I mean are u storing your value
in a static variable  ?

+++> I have answered this question with yes, but I did not realise until now
the difference of private static and private fields of a class.
<+++



>Again - my clients 1 to 20 do continously send messages, each client in
>its thread - I am using NetBeans and I am just launching more then one
>client. So each client is fully busy sending. But each client gets 
>responses from the same server object instance. And we have not a time-out
>condition as each client continously sends. Once we come to real clients
>where usesers invoke messages we wil care about timeouts. But as long as
>client code jsut loops in a for() we do not have time-outs, even not with
>20 sessions, but in our example using scope=soapsession, we do not get that
>far, as client #1 runs until client #2 starts, which makes client #1 fail
>with "invalid service group context id"
>Josef
>  
>
Are you sending service group id in each request , or you juts send as
new req ?
If you want to go into same soapsession , then you need to send the
serviceGroupID


+++> I logged thisi as JIRA AXIS2-1991 - if we share somehow the location 
where the ServiceGroupContextID is taken from or stored, then, when a second 
client calls and Axis2 does not check somehow that a ServiceGroupContextID is
already created, it will override the existing one. I do not know if that
is true, but if the ID gets overridden, then we ghave at least the mentioned 
effect. 

As simple as have an ID it in a static field. This migth be true for a larger 
object modells as well as simple variables ... sharing versus non sharing 
wether this is happen in the same thread or in different threads, 
makes it just more complex. <+++



>>I have read in a dcoument about axis session managment @
>>http://www.developer.com/java/web/print.php/3620661 "that axis2 is
>>meant to be an enterprise web service engine, so it has to support
>>session management."
>>
>>    
>>
>The article is little bit out dated , since we had few changes from
>Axis2 1.0 to 1.1
>
>
>
>So where is a new articel reflecting the same topic?
>What values does this articel have among well undestood generics when
>I can not count on the little code fragments given. Also a previous
>mail has lead me to this articel. So how far is it outdated?
>Josef
>
>  
>
I will update that and publish soon.

Thanks
Deepal



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


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


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


AW: AW: sesion managment, scope=soapsession

Posted by Stadelmann Josef <jo...@winterthur.ch>.
Hi Deepal,

See my coment below +++>

-----Ursprüngliche Nachricht-----
Von: Deepal Jayasinghe [mailto:deepal@opensource.lk]
Gesendet: Dienstag, 12. Dezember 2006 06:37
An: axis-user@ws.apache.org
Betreff: Re: AW: sesion managment, scope=soapsession


Hi  Stadelmann ;

>
>My client #1 runs continously, and sends arround 40 msg a second to the server. 
>When the second client starts, cline t#1 is still sending messages and so we do 
>not have a time-out condition. client #1 never times out.
>
>BUT as I decribe, using the code shown, when client #2 starts MyService.destroy() 
>is called followed by MyService.init() which has the effect that client #1 fails 
>thereafter with an "invalid group context id exception"
>  
>
hmmm, can you please help me to re-create the problem. If you can send
me the sample services and clients that will be very helpful for me to
fix the issue.

>
>I would appreciate an example on how to have a scenario as I describe.
>When I read literature about tomcat, retriving a session object from the 
>clients request object, it seems that internals are figuring out which client 
>is calling and the rigth session object which acts as data store for the
>session is returned/created. 
>
>How is that with AXIS2-1.1?
>  
>
Will write a sample soon .
+++> Do you have an example now showing how to maintain statefull session objects?




>When the MyService Object gets created I store the creation time for the
>instance in a instance variable. And when multiple clients run without
>scope=soapsession set, all clients return the same time stamp. So that
>means for me! client #1 makes axis2 creating a first instance of a class,
>and places the creation timestamp.
>  
>
That can not happen , there should be a separate service impl class for
each client, Im 100% sure about that since I have tested that. :)

+++> and what happens if the service class or variables such as the 
time stamp are defined static. I have just now read a book about the Java Nativ Interface


The Java programming language supports two kinds of fields. Each instance of a
class has its own copy of instance fields of the class, whereas all instances of 
a class share the static fields of a class.


I think this answers why my time stamp, which was implemented as a static field,
returnes to each client the same date/time, the time it was last overwritten
when a instance gets created.


NOTE: Instances migth still be separate and be running in different threads but
as long as the time stamp field is static, each class returns to each related
client the same time stamp what ever value it is.
<++++










>This is called an object, and client #2 sends his message to the same instance
>the same object. When the call to client 2 returns, client #2 finds the same 
>time stamp as client #1 has. But when client #2 starts 10 seconds after client #1,
>I would expect that client #2 has a different object-creation-timestamp
>then client #1 unless we talk to the same instance (which I cant use).
>Josef
>  
>
Are u keeping your value as a static ? I mean are u storing your value
in a static variable  ?

+++> I have answered this question with yes, but I did not realise until now
the difference of private static and private fields of a class.
<+++



>Again - my clients 1 to 20 do continously send messages, each client in
>its thread - I am using NetBeans and I am just launching more then one
>client. So each client is fully busy sending. But each client gets 
>responses from the same server object instance. And we have not a time-out
>condition as each client continously sends. Once we come to real clients
>where usesers invoke messages we wil care about timeouts. But as long as
>client code jsut loops in a for() we do not have time-outs, even not with
>20 sessions, but in our example using scope=soapsession, we do not get that
>far, as client #1 runs until client #2 starts, which makes client #1 fail
>with "invalid service group context id"
>Josef
>  
>
Are you sending service group id in each request , or you juts send as
new req ?
If you want to go into same soapsession , then you need to send the
serviceGroupID


+++> I logged thisi as JIRA AXIS2-1991 - if we share somehow the location 
where the ServiceGroupContextID is taken from or stored, then, when a second 
client calls and Axis2 does not check somehow that a ServiceGroupContextID is
already created, it will override the existing one. I do not know if that
is true, but if the ID gets overridden, then we ghave at least the mentioned 
effect. 

As simple as have an ID it in a static field. This migth be true for a larger 
object modells as well as simple variables ... sharing versus non sharing 
wether this is happen in the same thread or in different threads, 
makes it just more complex. <+++



>>I have read in a dcoument about axis session managment @
>>http://www.developer.com/java/web/print.php/3620661 "that axis2 is
>>meant to be an enterprise web service engine, so it has to support
>>session management."
>>
>>    
>>
>The article is little bit out dated , since we had few changes from
>Axis2 1.0 to 1.1
>
>
>
>So where is a new articel reflecting the same topic?
>What values does this articel have among well undestood generics when
>I can not count on the little code fragments given. Also a previous
>mail has lead me to this articel. So how far is it outdated?
>Josef
>
>  
>
I will update that and publish soon.

Thanks
Deepal



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


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


AW: AW: sesion managment, scope=soapsession

Posted by Stadelmann Josef <jo...@winterthur.ch>.
Hi Deepal

I am back to work, hopefully joint, on this burning issue.

To say is, that when we setup service.xml according to documentation at
http : //www.developer.com/java/web/print.php/3620661 and
that scope=" sopasession" does not bring back the serviceGroupContextID
but  scope="soapsession"  will bring you bak the  serviceGroupContextID

Just 3 days to figure out that.

Now, I am ready and send you the code and the .xml's to help you re-create the problem.



After the initial call, SOAPClient #1 uses the same sender in thread SOAPClient-#1 for each subsequent call and axis2 passes the serviceGroupContextId.

After the 2. initial call, sent by SOAPClient #2 running in thread SOAPClinet-#2, it uses the same sender in the thread SOPAClient-#2 for each subsequent call. BUT axis2 THEN calles destroy() and init() on MyService and axis2 has created a new serviceGroupContextId AND this makes obviously SOAPClient-#1 fail with an exception.

See files attached as first working examples using scope="soapsession" but second, raising an exception when client no 2 starts in its thread.





Diving into axis2 code: the "serviceimpl" object created by RawXMLInOutMessageReceiver.makeNewServiceObject( mc ), creates an instance of "CODE" (MyService) including some "STATE" keept at MyService, in a private static "sDate" variable, beeing an example for the creation time stamp. As far as I can figure out, this instance of "CODE", the implservice object, once created, is stored in an instance of "serviceContext" under a property "ServiceContext.SERVICE_OBJECT".

In short I like to say: the LINK (COMBINATION) of an instance of "ServiceContext" to an instance of "implservice" can bee seen as an OBJECT in the traditional sense where implservce keeps the CODE and ServiceContext stores the STATE. As such the TWO should have a lifecycle and we should be able to reference each of it by a session.


The question is then: 
How can I create multiple instances of this "COMBINATION"?

Where are REFERENCES to this "COMBINATIONS" stored?

How do I retreive a key, a reference, the OBJECT with CODE and STATE from AXIS2? 


I need for every SESSION, better for every CLIENT IN A THREAD an instance of a "CODE"/"STATE" COMBINATION where the STATE for every session, better ever thread must be unique?



I am new to axis2 and please tell us what I have to see differently from the traditional object world, in particular, how is the state stiored and retreived among sessions or better client threads?




Deepal, I like to answer your questions and comment embedded in    ++  .... ++ .



-----Ursprüngliche Nachricht-----
Von: Deepal Jayasinghe [mailto : deepal@opensource.lk]
Gesendet: Dienstag, 12. Dezember 2006 06:37
An: axis-user@ws.apache.org
Betreff: Re: AW: sesion managment, scope=soapsession


Hi  Stadelmann ;

>
>My client #1 runs continously, and sends arround 40 msg a second to the server. 
>When the second client starts, cline t#1 is still sending messages and so we do 
>not have a time-out condition. client #1 never times out.
>
>BUT as I decribe, using the code shown, when client #2 starts MyService.destroy() 
>is called followed by MyService.init() which has the effect that client #1 fails 
>thereafter with an "invalid group context id exception"
>  
>
hmmm, can you please help me to re-create the problem. If you can send
me the sample services and clients that will be very helpful for me to
fix the issue.

++ YES, attached below ++

>
>I would appreciate an example on how to have a scenario as I describe.
>When I read literature about tomcat, retriving a session object from the 
>clients request object, it seems that internals are figuring out which client 
>is calling and the rigth session object which acts as data store for the
>session is returned/created. 
>
>How is that with AXIS2-1.1?
>  
>
Will write a sample soon .


++ OK, that would be fine, because I am still not certain that scope="soapsession"
is what I need for a login, ..., ..., ..., logout, for a long lasting seesions, where 
each session has it's own instance of a service object. ++



>When the MyService Object gets created I store the creation time for the
>instance in a instance variable. And when multiple clients run without
>scope=soapsession set, all clients return the same time stamp. So that
>means for me! client #1 makes axis2 creating a first instance of a class,
>and places the creation timestamp.
>  
>
That can not happen , there should be a separate service impl class for
each client, Im 100% sure about that since I have tested that. :)

++ Maybe after using my code, you can see this differently. ++


>This is called an object, and client #2 sends his message to the same instance
>the same object. When the call to client 2 returns, client #2 finds the same 
>time stamp as client #1 has. But when client #2 starts 10 seconds after client #1,
>I would expect that client #2 has a different object-creation-timestamp
>then client #1 unless we talk to the same instance (which I cant use).
>Josef
>  
>
Are u keeping your value as a static ? I mean are u storing your value
in a static variable  ?

++ yes, look at my code in "userguide.example4.MyService" ++


>Again - my clients 1 to 20 do continously send messages, each client in
>its thread - I am using NetBeans and I am just launching more then one
>client. So each client is fully busy sending. But each client gets 
>responses from the same server object instance. And we have not a time-out
>condition as each client continously sends. Once we come to real clients
>where usesers invoke messages we wil care about timeouts. But as long as
>client code jsut loops in a for() we do not have time-outs, even not with
>20 sessions, but in our example using scope=soapsession, we do not get that
>far, as client #1 runs until client #2 starts, which makes client #1 fail
>with "invalid service group context id"
>Josef
>  
>
Are you sending service group id in each request , or you juts send as new req ? 

++ the same sender is used and the rest is axis2 minique in the deep of axis2 as per docu. ++
 
If you want to go into same soapsession , then you need to send the serviceGroupID

++ according tp documentation at http : //www.developer-com/java/web/print-php/10935_3620661_2 stating at: "To make life easier, Axis2 has the built-in capability ....

So - I use options.setManageSession(true); and after the initial call returns, I just use the same sender object with each call and have axis2 do the rest of
sniffing into the soap header all items required to get go with the same serviceGroupContextID. ++




>>I have read in a dcoument about axis session managment @
>>http : //www.developer.com/java/web/print.php/3620661 "that axis2 is
>>meant to be an enterprise web service engine, so it has to support
>>session management."
>>
>>    
>>
>The article is little bit out dated , since we had few changes from
>Axis2 1.0 to 1.1
>
>
>
>So where is a new articel reflecting the same topic?
>What values does this articel have among well undestood generics when
>I can not count on the little code fragments given. Also a previous
>mail has lead me to this articel. So how far is it outdated?
>Josef
>
>  
>
I will update that and publish soon.


++ if SOAPClient starts in a first thread, a session is created. 

question: Is there a second session created if I start SOAPClient in a second thread 
while the first SOPAClient still runs. That is what I in fact expect and need. 
Each client running in a thread must get it's own session and be able to talk to an instance 
of a service object of the same class. 



"Hypernate" and "ehcache" where mentioned severla times. 
Where do I get it, including a working example? Please help me. 


Thanks and regards
Josef Stadelmann ++



Thanks
Deepal



 

Re: AW: sesion managment, scope=soapsession

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi  Stadelmann ;

>
>My client #1 runs continously, and sends arround 40 msg a second to the server. 
>When the second client starts, cline t#1 is still sending messages and so we do 
>not have a time-out condition. client #1 never times out.
>
>BUT as I decribe, using the code shown, when client #2 starts MyService.destroy() 
>is called followed by MyService.init() which has the effect that client #1 fails 
>thereafter with an "invalid group context id exception"
>  
>
hmmm, can you please help me to re-create the problem. If you can send
me the sample services and clients that will be very helpful for me to
fix the issue.

>
>I would appreciate an example on how to have a scenario as I describe.
>When I read literature about tomcat, retriving a session object from the 
>clients request object, it seems that internals are figuring out which client 
>is calling and the rigth session object which acts as data store for the
>session is returned/created. 
>
>How is that with AXIS2-1.1?
>  
>
Will write a sample soon .

>When the MyService Object gets created I store the creation time for the
>instance in a instance variable. And when multiple clients run without
>scope=soapsession set, all clients return the same time stamp. So that
>means for me! client #1 makes axis2 creating a first instance of a class,
>and places the creation timestamp.
>  
>
That can not happen , there should be a separate service impl class for
each client, Im 100% sure about that since I have tested that. :)

>This is called an object, and client #2 sends his message to the same instance
>the same object. When the call to client 2 returns, client #2 finds the same 
>time stamp as client #1 has. But when client #2 starts 10 seconds after client #1,
>I would expect that client #2 has a different object-creation-timestamp
>then client #1 unless we talk to the same instance (which I cant use).
>Josef
>  
>
Are u keeping your value as a static ? I mean are u storing your value
in a static variable  ?

>Again - my clients 1 to 20 do continously send messages, each client in
>its thread - I am using NetBeans and I am just launching more then one
>client. So each client is fully busy sending. But each client gets 
>responses from the same server object instance. And we have not a time-out
>condition as each client continously sends. Once we come to real clients
>where usesers invoke messages we wil care about timeouts. But as long as
>client code jsut loops in a for() we do not have time-outs, even not with
>20 sessions, but in our example using scope=soapsession, we do not get that
>far, as client #1 runs until client #2 starts, which makes client #1 fail
>with "invalid service group context id"
>Josef
>  
>
Are you sending service group id in each request , or you juts send as
new req ?
If you want to go into same soapsession , then you need to send the
serviceGroupID

>>I have read in a dcoument about axis session managment @
>>http://www.developer.com/java/web/print.php/3620661 "that axis2 is
>>meant to be an enterprise web service engine, so it has to support
>>session management."
>>
>>    
>>
>The article is little bit out dated , since we had few changes from
>Axis2 1.0 to 1.1
>
>
>
>So where is a new articel reflecting the same topic?
>What values does this articel have among well undestood generics when
>I can not count on the little code fragments given. Also a previous
>mail has lead me to this articel. So how far is it outdated?
>Josef
>
>  
>
I will update that and publish soon.

Thanks
Deepal



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


Re: sesion managment, scope=soapsession

Posted by fat suze <fa...@gmail.com>.
Hmmm, that works I guess, but for some reason it seems like there should be
a standard way of doing this. If I can start a session I would like to be
able to end it. But, to summarize, these are the two ways to end a session
in Axis2 1.2 (secretly hoping an Axis developer/expert will say "no, you
just use the _____ method that already exists, dummy"):

1) Disable sessions (I think that means operate in request scope ?) and then
write your own session handling as described by Robert (pass in a session id
with each request)

or 2) Just let the session expire when it happens to time out (and probably
add an endSession action to your service so that you can wipe your session
data)...




On 7/4/07, robert lazarski <ro...@gmail.com> wrote:
>
> I've always thought that web service sessions - in any framework - don't
> play nice together or even in the same framework. In the axis2 case, I've
> seen a lot of confusion in this area and after reading countless emails and
> several articles about it, and reading the code, I still don't entirely get
> how it would handle what I typically need. This isn't a criticism - I'm just
> saying I think sessions need to be tailored to each specific case beyond the
> basics.
>
> Therefore I tend to roll my own and just generate the session key - I like
> to use java 5 and UUID - and manage it myself on the server side, forcing
> the client to manually pass it back in on every request after login. It took
> me a mere two days to write the code and I've used it in several projects
> since.
>
> Not very standard, but as I said, the standard ways never really worked
> for me. It might be worth exploring rolling your own as its not too
> difficult.
>
> HTH,
> Robert
>
> On 7/4/07, fat suze <fa...@gmail.com> wrote:
> >
> > Does anyone know if there is any documentation anywhere on the web that
> > explains axis2 sessions?  Specifically the ending of sessions?  I have
> > searched all over the web for how to kill a transport session, and I have
> > seen many others asking how to end all types of sessions, but nobody seems
> > to know.... :)  Is it impossible?
> > Thanx
> > Susanne
> >
> >
> >
> > On 7/4/07, Stadelmann Josef <josef.stadelmann@axa-winterthur.ch > wrote:
> > >
> > > Hi developers ... :-)
> > >
> > > Running multipple clients, each talkes to an instance of
> > > MyService5.java ;
> > >
> > > MyService5.java has init(), login(), map(), logout(), destroy(),
> > > implemented;
> > >
> > > It was said somewhere in this mailing-list that init() and destroy()
> > > methods get called at the proper time by axis2 if they are implemented; this
> > > hhrough reflection.
> > >
> > > My simple question is:
> > >
> > > How do I properly terminate such a session from my Client code
> > > (avoiding problems to axis2) when
> > >        a) MyService5 runs in scope=soapsession and
> > >        b) has a long timeout set to 86'400'000 milliseconds (=
> > > 24hr's)?
> > >        c) init() and destroy() are ONLY to be called by axis2 itself
> > >
> > >
> > > Josef Stadelmann
> > > @axa-winterthur.ch
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
>

Re: sesion managment, scope=soapsession

Posted by robert lazarski <ro...@gmail.com>.
I've always thought that web service sessions - in any framework - don't
play nice together or even in the same framework. In the axis2 case, I've
seen a lot of confusion in this area and after reading countless emails and
several articles about it, and reading the code, I still don't entirely get
how it would handle what I typically need. This isn't a criticism - I'm just
saying I think sessions need to be tailored to each specific case beyond the
basics.

Therefore I tend to roll my own and just generate the session key - I like
to use java 5 and UUID - and manage it myself on the server side, forcing
the client to manually pass it back in on every request after login. It took
me a mere two days to write the code and I've used it in several projects
since.

Not very standard, but as I said, the standard ways never really worked for
me. It might be worth exploring rolling your own as its not too difficult.

HTH,
Robert

On 7/4/07, fat suze <fa...@gmail.com> wrote:
>
> Does anyone know if there is any documentation anywhere on the web that
> explains axis2 sessions?  Specifically the ending of sessions?  I have
> searched all over the web for how to kill a transport session, and I have
> seen many others asking how to end all types of sessions, but nobody seems
> to know.... :)  Is it impossible?
> Thanx
> Susanne
>
>
>
> On 7/4/07, Stadelmann Josef <jo...@axa-winterthur.ch> wrote:
> >
> > Hi developers ... :-)
> >
> > Running multipple clients, each talkes to an instance of MyService5.java
> > ;
> >
> > MyService5.java has init(), login(), map(), logout(), destroy(),
> > implemented;
> >
> > It was said somewhere in this mailing-list that init() and destroy()
> > methods get called at the proper time by axis2 if they are implemented; this
> > hhrough reflection.
> >
> > My simple question is:
> >
> > How do I properly terminate such a session from my Client code (avoiding
> > problems to axis2) when
> >        a) MyService5 runs in scope=soapsession and
> >        b) has a long timeout set to 86'400'000 milliseconds (= 24hr's)?
> >        c) init() and destroy() are ONLY to be called by axis2 itself
> >
> >
> > Josef Stadelmann
> > @axa-winterthur.ch
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>

Re: sesion managment, scope=soapsession

Posted by fat suze <fa...@gmail.com>.
Does anyone know if there is any documentation anywhere on the web that
explains axis2 sessions?  Specifically the ending of sessions?  I have
searched all over the web for how to kill a transport session, and I have
seen many others asking how to end all types of sessions, but nobody seems
to know.... :)  Is it impossible?
Thanx
Susanne



On 7/4/07, Stadelmann Josef <jo...@axa-winterthur.ch> wrote:
>
> Hi developers ... :-)
>
> Running multipple clients, each talkes to an instance of MyService5.java;
>
> MyService5.java has init(), login(), map(), logout(), destroy(),
> implemented;
>
> It was said somewhere in this mailing-list that init() and destroy()
> methods get called at the proper time by axis2 if they are implemented; this
> hhrough reflection.
>
> My simple question is:
>
> How do I properly terminate such a session from my Client code (avoiding
> problems to axis2) when
>        a) MyService5 runs in scope=soapsession and
>        b) has a long timeout set to 86'400'000 milliseconds (= 24hr's)?
>        c) init() and destroy() are ONLY to be called by axis2 itself
>
>
> Josef Stadelmann
> @axa-winterthur.ch
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

AW: sesion managment, scope=soapsession

Posted by Stadelmann Josef <jo...@axa-winterthur.ch>.
Hi developers ... :-)

Running multipple clients, each talkes to an instance of MyService5.java; 

MyService5.java has init(), login(), map(), logout(), destroy(), implemented; 

It was said somewhere in this mailing-list that init() and destroy() methods get called at the proper time by axis2 if they are implemented; this hhrough reflection.

My simple question is: 

How do I properly terminate such a session from my Client code (avoiding problems to axis2) when 
	a) MyService5 runs in scope=soapsession and 
	b) has a long timeout set to 86'400'000 milliseconds (= 24hr's)?
	c) init() and destroy() are ONLY to be called by axis2 itself


Josef Stadelmann
@axa-winterthur.ch



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