Thanks for the fast answer, Deepal. > > Hi all, > > > > I have read different mailings in this list, but they did not answer my > > questions about soapsessions. > > > > > Here is my scenario. I have two services deployed in a single > > servicegroup. I now have setup a client which calls the services and I > > can see that the ServiceGroupContext stays the same in the different > > services. > > > Ok. > > So here are my two questions: > > 1. Where am I supposed to store my session information? > It depends , if you want to share resources across your services in the > service group then store in the servicegroupcontext else store in the > service context. > > Is it the > > ServiceGroupContext? Am I supposed to create a SessionContext and store > > in the ServiceGroupContext? > > > If you store in ServiceGroupContext the all the services in that group > can access that , where as if you store that in ServiceContext only > that > corresponding service can access that. SessionContext is totally > different thing it only uses for transport session , for soap session > you get NULL as SessionContext value.
Thank you for clarifying that the SessionContext only belongs to the transport session scope. In order to store information servicegroup-wide, I'll now use the ServiceGroupContext. > > 2. I want to do some tidying up at the termination of the soapsession. > At the moment we do not have a way to do that. Your session get > terminated automatically unless you touch your services for sometime > (that time is configurable in axis2.xml) Ok, this would be a very practicable feature for a newer release. I'll open a feature request in JIRA or have a look if there is already one. > > I > > could use the destroy() methods in each service for the service- related > > stuff. But where is the right place to tidy up resources belonging to > > the whole serviceGroup, eg. database connections used by both services*? > > Similarly, I want to do some initialization for the whole service group. > > > For that there is something called ServiceLifeCycle class , that will > help you to do that , please have a following article to get some > understanding about that. > > http://www.developer.com/db/article.php/3735771 Thank you for your article. It might be helpful in scenarios where I need initialization for a service which is meant to be application-wide. In order to solve my problem with tidying up session-related resources for a servicegroup, I am thinking about calling an external tidyUp() method in the destroy() method of each service and store in the serviceGroupContext if it is still necessary to call the tidyUp() method, so that this is called only once. What do you think about it? Would that be a good solution? How are other people out there realizing such scenarios? Thanks, Matthias. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
