I believe there's an outstanding issue for this.

On Mon, Feb 9, 2009 at 10:20 AM, Filip S. Adamsen <[email protected]> wrote:
> Perhaps Tapestry should throw an exception when one tries to do this instead
> of failing silently? :)
>
> -Filip
>
> On 2009-02-08 18:03, Howard Lewis Ship wrote:
>>
>> You need to define an interface for the service; only services with
>> interfaces can be proxied, and only proxied interfaces can have
>> non-default scope.
>>
>> On Sun, Feb 8, 2009 at 4:48 AM, Jack Nuzbit <[email protected]>
>> wrote:
>>>
>>> I'm trying to use the tapestry IoC to inject a per thread service into my
>>> other services.
>>>
>>> @Scope(ScopeConstants.PERTHREAD)
>>> public class PerThreadService {
>>>   private MyObject myObject;
>>>   public PerThreadService(Cookies cookies) {
>>>       myObject = new MyObject(cookies.readCookieValue("userData")))
>>>       System.out.println("Constructing new per thread service.");
>>>   }
>>> }
>>>
>>> I want this PerThreadService to get constructed at least once per request
>>> but I can see it gets created the first time it's required and then the
>>> constructor never gets called again.
>>> Does anyone know I can do this?
>>>
>>> Thanks
>>>
>>> Jack
>>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to