You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jun Tsai <ju...@gmail.com> on 2007/08/19 04:47:23 UTC

[T5] how to Eager Loading PERTHREAD_SCOPE service?

I had a perthread scope service ,I find  the @EagerLoad can't let the
service eager loading. how to do it?

Thanks
-- 
regards,
Jun Tsai

Re: [T5] how to Eager Loading PERTHREAD_SCOPE service?

Posted by Davor Hrg <hr...@gmail.com>.
EagerLoad and PerThread just don't fit together,
you should move the code that needs to be eager loaded to another service.
and use it from your threaded service.

provide some more insight into your use case so we can assist you
concretely.

Davor Hrg

On 8/19/07, Ben Tomasini <be...@gmail.com> wrote:
>
> It seems to me that the normal eager load behavior would be irrelevant for
> a
> perthread service because a perthread service must be bound to a thread
> which is using the registry, and the registry cannot be used until it is
> built.
>
> On 8/18/07, Jun Tsai <ju...@gmail.com> wrote:
> >
> > I had a perthread scope service ,I find  the @EagerLoad can't let the
> > service eager loading. how to do it?
> >
> > Thanks
> > --
> > regards,
> > Jun Tsai
> >
>

Re: [T5] how to Eager Loading PERTHREAD_SCOPE service?

Posted by Jiri Mares <Ji...@svt.cz>.
Hi,

try AOP ... (e.g. AspectJ)

Jirka

Jun Tsai napsal(a):
> 2007/8/19, Ben Tomasini <be...@gmail.com>:
>> It seems to me that the normal eager load behavior would be irrelevant for
>> a
>> perthread service because a perthread service must be bound to a thread
>> which is using the registry, and the registry cannot be used until it is
>> built.
> 
> 
> 
> I wanto to eager load the service at per thread. how to do ?
> 

-- 
Jiří Mareš (mailto:Jiri.Mares@svt.cz)

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


Re: [T5] how to Eager Loading PERTHREAD_SCOPE service?

Posted by Davor Hrg <hr...@gmail.com>.
do you want your service loaded for each thread,
and for each thread a new instance created ?

why do you need this ?
consider avoiding this ?

who creates the threads ?

Davor Hrg

On 8/19/07, Jun Tsai <ju...@gmail.com> wrote:
>
> 2007/8/19, Ben Tomasini <be...@gmail.com>:
> >
> > It seems to me that the normal eager load behavior would be irrelevant
> for
> > a
> > perthread service because a perthread service must be bound to a thread
> > which is using the registry, and the registry cannot be used until it is
> > built.
>
>
>
> I wanto to eager load the service at per thread. how to do ?
>
>
>
>
>
>
>
> --
> regards,
> Jun Tsai
>

Re: [T5] how to Eager Loading PERTHREAD_SCOPE service?

Posted by Jun Tsai <ju...@gmail.com>.
2007/8/19, Ben Tomasini <be...@gmail.com>:
>
> It seems to me that the normal eager load behavior would be irrelevant for
> a
> perthread service because a perthread service must be bound to a thread
> which is using the registry, and the registry cannot be used until it is
> built.



I wanto to eager load the service at per thread. how to do ?







-- 
regards,
Jun Tsai

Re: [T5] how to Eager Loading PERTHREAD_SCOPE service?

Posted by Ben Tomasini <be...@gmail.com>.
It seems to me that the normal eager load behavior would be irrelevant for a
perthread service because a perthread service must be bound to a thread
which is using the registry, and the registry cannot be used until it is
built.

On 8/18/07, Jun Tsai <ju...@gmail.com> wrote:
>
> I had a perthread scope service ,I find  the @EagerLoad can't let the
> service eager loading. how to do it?
>
> Thanks
> --
> regards,
> Jun Tsai
>