You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jesse Kuhnert <jk...@gmail.com> on 2006/04/21 20:31:53 UTC
Re: @InjectObject(service-property:... will it work?
I could be wrong, but going with the notion that inject means a hivemind
service I've found that the actual object reference does ~magically~ change
to the correct reference depending on the context and implementation type of
your service. (via proxying I think).
So, if the object in question is a pooled / threaded service object then the
instance you reference should always point to the correct pooled or threaded
instance.
On 4/21/06, Ron Piterman <rp...@gmx.net> wrote:
>
> Hi,
>
> AFAIK all injected objects are passed as arguments to the constructor of
> the page/component class.
>
> so if I use @InjectObject("service-property:...") the property will be
> read once and stored in the page class ! so if the property changes, and
> the injected object will not reflect any changes made since the
> construction of the page/component class, which, assuming one uses a
> pool, might be quite long...
>
> is it really so, or did I understand this wrong and the injected object
> will actually always reflect any changes to the service's property?
>
> Cheers,
> Ron Piterman
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
--
Jesse Kuhnert
Tacos/Tapestry, team member/developer
Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.
Re: @InjectObject(service-property:... will it work?
Posted by Ron Piterman <rp...@gmx.net>.
yes - this works with threaded/pooled models (not magically but...)
because the implementation of the model (threaded or pooled) is part of
the proxy implementation, which is actually injected.
but when injecting a service-property, the actually injected object
might be a pojo or event a java "primitive" wrapper with a single value
- which will not change !
Cheers,
Ron
Jesse Kuhnert wrote:
> I could be wrong, but going with the notion that inject means a hivemind
> service I've found that the actual object reference does ~magically~ change
> to the correct reference depending on the context and implementation type of
> your service. (via proxying I think).
>
> So, if the object in question is a pooled / threaded service object then the
> instance you reference should always point to the correct pooled or threaded
> instance.
>
> On 4/21/06, Ron Piterman <rp...@gmx.net> wrote:
>
>>Hi,
>>
>>AFAIK all injected objects are passed as arguments to the constructor of
>>the page/component class.
>>
>>so if I use @InjectObject("service-property:...") the property will be
>>read once and stored in the page class ! so if the property changes, and
>>the injected object will not reflect any changes made since the
>>construction of the page/component class, which, assuming one uses a
>>pool, might be quite long...
>>
>>is it really so, or did I understand this wrong and the injected object
>>will actually always reflect any changes to the service's property?
>>
>>Cheers,
>>Ron Piterman
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
>
>
> --
> Jesse Kuhnert
> Tacos/Tapestry, team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org