You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Eric Fesler <er...@audaxis.com> on 2007/05/04 09:23:36 UTC

SessionPropertyPersistence and Infrastructure object provider

Hi,

it's maybe a newbie question but I'm missing something and I can't understand 
the following:

SessionPropertyPersistenceStrategy seems to be a service deployed as a 
*singleton*.
It has a property webRequest into which one injects infrastructure:request.

How can the SessionPropertyPersistenceStrategy service be thread safe (and it 
is ) and at the same time use a property webRequest that is thread dependent?

Could somebody provide me some explanations?

Thanks,

--ERic

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: SessionPropertyPersistence and Infrastructure object provider

Posted by Eric Fesler <er...@audaxis.com>.
Thanks Marcus.

--ERic

On Friday 04 May 2007 12:43:42 Marcus.Schulte@bmw.ch wrote:
> Because with HiveMind services, in your code you always deal with
> proxies.
> When SessionPropertyPersistenceStrategy calls a mehod on the WebRequest
> it
> really calls a proxy which determines the correct instance belonging to
> the
> current thread and then, in turn, calls the core implementation itself.
>
> > -----Original Message-----
> > From: Eric Fesler [mailto:eric@audaxis.com]
> > Sent: Friday, May 04, 2007 9:24 AM
> > To: Tapestry users
> > Subject: SessionPropertyPersistence and Infrastructure object provider
> >
> > Hi,
> >
> > it's maybe a newbie question but I'm missing something and I
> > can't understand the following:
> >
> > SessionPropertyPersistenceStrategy seems to be a service
> > deployed as a *singleton*.
> > It has a property webRequest into which one injects
> > infrastructure:request.
> >
> > How can the SessionPropertyPersistenceStrategy service be
> > thread safe (and it is ) and at the same time use a property
> > webRequest that is thread dependent?
> >
> > Could somebody provide me some explanations?
> >
> > Thanks,
> >
> > --ERic
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org



-- 
Eric Fesler
CTO
-------------------------------------------------------------------
 Audaxis S.A.
 Tel: +32 (0)2 361.83.01 
 Fax: +32 (0)2 361.83.11 
 Mob: +32 (0)478 22.90.78 
 Blog: http://www.audaxis.com/roller/page/eric 
 http://www.audaxis.com
 
 PGP Fingerprint : FECF 2841 48B7 47D8 C426 55A4 0A60 FB52 833B 1EF1
 Public PGP key  : available at server subkeys.pgp.net
-------------------------------------------------------------------

Q:	How many members of the U.S.S. Enterprise does it take to change a
	light bulb?
A:	Seven.  Scotty has to report to Captain Kirk that the light bulb in
	the Engineering Section is getting dim, at which point Kirk will send
	Bones to pronounce the bulb dead (although he'll immediately claim
	that he's a doctor, not an electrician).  Scotty, after checking
	around, realizes that they have no more new light bulbs, and complains
	that he "canna" see in the dark.  Kirk will make an emergency stop at
	the next uncharted planet, Alpha Regula IV, to procure a light bulb
	from the natives, who, are friendly, but seem to be hiding something.
	Kirk, Spock, Bones, Yeoman Rand and two red shirt security officers
	beam down to the planet, where the two security officers are promply
	killed by the natives, and the rest of the landing party is captured.
	As something begins to develop between the Captain and Yeoman Rand,
	Scotty, back in orbit, is attacked by a Klingon destroyer and must
	warp out of orbit.  Although badly outgunned, he cripples the Klingon
	and races back to the planet in order to rescue Kirk et. al. who have
	just saved the natives' from an awful fate and, as a reward, been
	given all light bulbs they can carry.  The new bulb is then inserted
	and the Enterprise continues on its five year mission.

RE: SessionPropertyPersistence and Infrastructure object provider

Posted by Ma...@bmw.ch.
Because with HiveMind services, in your code you always deal with
proxies.
When SessionPropertyPersistenceStrategy calls a mehod on the WebRequest
it 
really calls a proxy which determines the correct instance belonging to
the 
current thread and then, in turn, calls the core implementation itself.

> -----Original Message-----
> From: Eric Fesler [mailto:eric@audaxis.com] 
> Sent: Friday, May 04, 2007 9:24 AM
> To: Tapestry users
> Subject: SessionPropertyPersistence and Infrastructure object provider
> 
> Hi,
> 
> it's maybe a newbie question but I'm missing something and I 
> can't understand the following:
> 
> SessionPropertyPersistenceStrategy seems to be a service 
> deployed as a *singleton*.
> It has a property webRequest into which one injects 
> infrastructure:request.
> 
> How can the SessionPropertyPersistenceStrategy service be 
> thread safe (and it is ) and at the same time use a property 
> webRequest that is thread dependent?
> 
> Could somebody provide me some explanations?
> 
> Thanks,
> 
> --ERic
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org