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/08/19 18:23:23 UTC

can't store information in configuration context

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. 

Why is this happening? Is Configuration Context restored every time a client opens a session?

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




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

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

Re: can't store information in configuration context

Posted by Jorge Fernandez <in...@yahoo.es>.
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 <de...@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! .

Re: can't store information in configuration context

Posted by Deepal jayasinghe <de...@gmail.com>.
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