You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by olip <ol...@googlemail.com> on 2009/03/17 11:12:07 UTC
VM State Objects...share information between sessions of a VM
Hi everyone,
I am having the problem that I need some information not for every page of
one session (ASO) but instead between all sessions of a VM. In my example
every user/session has the possibility to run an external program (in a
seperate thread) which I would like to limit the parallel access to (so
storing the count of started and not finished runs...)
I think about something like a singleton thread which could be shared
between sessions. I tried ASO but though its called Application... it only
works within a session.
Is there a mechanism in Tapesty/Java for doing this?
Thank you for your help
Oliver
--
View this message in context: http://n2.nabble.com/VM-State-Objects...share-information-between-sessions-of-a-VM-tp2490484p2490484.html
Sent from the Tapestry Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: VM State Objects...share information between sessions of a VM
Posted by olip <ol...@googlemail.com>.
Dear Ulrich,
It worked like a charm! Thanks!
Ulrich Stärk wrote:
>
> A Tapestry service is by default singleton. So just create a singleton
> service and store the
> information you want to store there. See here
> http://tapestry.apache.org/tapestry5/tapestry-ioc/service.html for more
> information. Don't forget to
> synchronize access to your data.
>
> Uli
>
> olip schrieb:
>> Hi everyone,
>>
>> I am having the problem that I need some information not for every page
>> of
>> one session (ASO) but instead between all sessions of a VM. In my example
>> every user/session has the possibility to run an external program (in a
>> seperate thread) which I would like to limit the parallel access to (so
>> storing the count of started and not finished runs...)
>> I think about something like a singleton thread which could be shared
>> between sessions. I tried ASO but though its called Application... it
>> only
>> works within a session.
>> Is there a mechanism in Tapesty/Java for doing this?
>>
>> Thank you for your help
>> Oliver
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
--
View this message in context: http://n2.nabble.com/VM-State-Objects...share-information-between-sessions-of-a-VM-tp2490484p2491323.html
Sent from the Tapestry Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: VM State Objects...share information between sessions of a VM
Posted by Ulrich Stärk <ul...@spielviel.de>.
A Tapestry service is by default singleton. So just create a singleton service and store the
information you want to store there. See here
http://tapestry.apache.org/tapestry5/tapestry-ioc/service.html for more information. Don't forget to
synchronize access to your data.
Uli
olip schrieb:
> Hi everyone,
>
> I am having the problem that I need some information not for every page of
> one session (ASO) but instead between all sessions of a VM. In my example
> every user/session has the possibility to run an external program (in a
> seperate thread) which I would like to limit the parallel access to (so
> storing the count of started and not finished runs...)
> I think about something like a singleton thread which could be shared
> between sessions. I tried ASO but though its called Application... it only
> works within a session.
> Is there a mechanism in Tapesty/Java for doing this?
>
> Thank you for your help
> Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org