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 Jorge Fernandez <in...@yahoo.es> on 2007/06/10 02:31:25 UTC

URGENT Help with sessions

Hi,

Few days ago I wrote a message to ask some questions about sessions. 
I'm stuck on that because I'm lost in how should I implement my session managing.

I can't find any detailed example or tutorial that could show me which one is the best for me, 
how they work in detail, and how to use contexts for that.

Now, I'm near the desperation because I'm on the edge to present my final project to graduate so 
any kind of information would be VERY appreciated.

This are my questions:

At this moment I'm using SOAP session scope. I have to validate a system and then an user 
(sometimes only a system) so I have an operation for each. 
Any user should invoke both at the first time but I can't force that happening, can I? 
Can I specify the order in which operations should be called?

What I'm doing at the moment is throw an exception if the client invoke an operation and didn't validate but 
my understanding is that by the time I do that, Axis2 has created a session. 
I would like to avoid that because I would that my session would last about 5 minutes and 
I don't want to keep one session open for such a long time each time a client invokes an operation.

The second thing I want to do is establish my timeout. 
I tried modifying the parameter ConfigContextTimeoutInterval from the axis configuration file but 
apparently it didn't work. 
I tested it with a value 30 miliseconds calling two operations sequencially
from the same client and adding a big delay between them. But the group session id was the same. 
Is this the way it's supposed to work? Do I have to do something to catch the timeout event and then call destroy?

Also I want to stop my timer when my client is inside an operation. Does Axis2 do that??

About the session information to keep at the service, my understanding is that I should use the 
properties of the ServiceContext (so it can be accessed from all instances of the service) 
or the properties of SessionContext (for keeping it local to the instance). Am I right?
How can I delete that information in the former case when the session ends??

The last question is: the first time a client calls any operation, the ServiceGroupID is generated. 
When is that happening? I would like to store that session id at my service with my session information.

Thanks a lot,

Jorge Fernández


 		
---------------------------------

LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com