axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorge Fernandez <informaticu007-...@yahoo.es>
Subject Re: can't store information in configuration context
Date Mon, 20 Aug 2007 09:23:08 GMT
Hi Deepal,

My problem was on server side. Each time a client opened a session, properties were cleaned
and the only information I could see was the one I stored in startUp.
At this moment is working ok. Don't know why yesterday it didn't work because I haven't changed
anything.

If instead of storing that information in configurationContext, I do it in serviceContext
or serviceGroupContext, do all the clients of the service have access to the same serviceContext
(or serviceGroupContext) ? I though it was like this but I didn't get the results I expected.

Thanks,

Jorge Fernández


Deepal jayasinghe <deepalk@gmail.com> escribió: Jorge Fernandez wrote:
> Hi all,
>
> I'm trying to store some information in properties element in
> configuration context so I can access it from any service instance but
> each time a client opens a session, this information dissapears.
Well its depend on the way you create the ServiceClient , if you create
a ServiceClient with its default constructor then for each invocation
new ConfigurationContext (CC) will be created. If you want to share the
same CC then you have to create ServiceClient with one CC.
>
> Why is this happening? Is Configuration Context restored every time a
> client opens a session?
In the Server side the answer is no , it uses only one CC throughout the
lifetime of the system.
>
> In startUp method, I'm doing this:
>
> confContext.setProperty("serviceLogger",serviceLogger);
> confContext.setProperty("validatedSystems",new HashMap());
> confContext.setProperty("validatedUsers",new HashMap());   
> ((HashMap)confContext.getProperty("validatedSystems")).put("hola",
> "adios");
>
> So when a user validates I store an entry for him in validatedUsers
> and another entry in validatedSystem for the corresponding system but
> when a new client logins, those entries are cleaned, validatedUsers is
> empty and validatedSystems has the element I stored in startUp method
> as a test.
>
> Please, can anybody help me with this?
>
> Thanks,
>
> Jorge Fernández
Thanks
Deepal

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



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

Sé un Mejor Viajero
¿Quieres saber cómo? ¡Deja que otras personas te ayuden! .

Mime
View raw message