|
View:
New views
11 Messages
—
Rating Filter:
Alert me
|
|
|
Lazy lifecycleHi there,
I need a lazy lifecycle strategy within Pico, as in one that will start a component only once it is required. Currently container.start() will eagerly instantiate lifecycled components before they are actually needed. I'd like to intercept when components are instantiated and start them before they are used. Is my only option to implement a behaviour to achieve this? It'd be good if it could interoperate with the container's lifecycle strategy. Cheers, Mark --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Lazy lifecycleThat should be easy.
Can to get us half way by writing a testcase :-) Perhaps a mod to StartableLifecycleStrategyTestCase I expect I'll be subclassing (or better) StartableLifecycleStrategy ... Regards, - Paul On May 26, 2009, at 10:44 AM, Mark Hobson wrote: > Hi there, > > I need a lazy lifecycle strategy within Pico, as in one that will > start a component only once it is required. Currently > container.start() will eagerly instantiate lifecycled components > before they are actually needed. I'd like to intercept when > components are instantiated and start them before they are used. > > Is my only option to implement a behaviour to achieve this? It'd be > good if it could interoperate with the container's lifecycle strategy. > > Cheers, > > Mark > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Lazy lifecycle2009/5/26 Paul Hammant <paul@...>:
> That should be easy. Cool :) > Can to get us half way by writing a testcase :-) Perhaps a mod to > StartableLifecycleStrategyTestCase > I expect I'll be subclassing (or better) StartableLifecycleStrategy ... Sure, I raised PICO-355 and attached a test case. I'm not sure how you want to implement this; I changed testThirdPartyStartableAndDisposable to be AUTOMATIC to signify an eager lifecycle, but this is obviously quite a change that will affect users. Cheers, Mark --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Lazy lifecyclePaul, did you get a chance to take a look at this?
Cheers, Mark 2009/5/27 Mark Hobson <markhobson@...>: > 2009/5/26 Paul Hammant <paul@...>: >> That should be easy. > > Cool :) > >> Can to get us half way by writing a testcase :-) Perhaps a mod to >> StartableLifecycleStrategyTestCase >> I expect I'll be subclassing (or better) StartableLifecycleStrategy ... > > Sure, I raised PICO-355 and attached a test case. I'm not sure how > you want to implement this; I changed > testThirdPartyStartableAndDisposable to be AUTOMATIC to signify an > eager lifecycle, but this is obviously quite a change that will affect > users. > > Cheers, > > Mark > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Lazy lifecyclefixed :)
Regards, - Paul On Jun 8, 2009, at 5:31 AM, Mark Hobson wrote: > Paul, did you get a chance to take a look at this? > > Cheers, > > Mark > > 2009/5/27 Mark Hobson <markhobson@...>: >> 2009/5/26 Paul Hammant <paul@...>: >>> That should be easy. >> >> Cool :) >> >>> Can to get us half way by writing a testcase :-) Perhaps a mod to >>> StartableLifecycleStrategyTestCase >>> I expect I'll be subclassing (or better) >>> StartableLifecycleStrategy ... >> >> Sure, I raised PICO-355 and attached a test case. I'm not sure how >> you want to implement this; I changed >> testThirdPartyStartableAndDisposable to be AUTOMATIC to signify an >> eager lifecycle, but this is obviously quite a change that will >> affect >> users. >> >> Cheers, >> >> Mark >> > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Lazy lifecycleStrange, I didn't receive any email notifications. Thanks for the
quick fix, although I'm not sure that that's what I need. I'll try to find some time soon to have a proper look and let you know. Cheers, Mark 2009/6/8 Paul Hammant <paul@...>: > fixed :) > > Regards, > > - Paul > > On Jun 8, 2009, at 5:31 AM, Mark Hobson wrote: > >> Paul, did you get a chance to take a look at this? >> >> Cheers, >> >> Mark >> >> 2009/5/27 Mark Hobson <markhobson@...>: >>> >>> 2009/5/26 Paul Hammant <paul@...>: >>>> >>>> That should be easy. >>> >>> Cool :) >>> >>>> Can to get us half way by writing a testcase :-) Perhaps a mod to >>>> StartableLifecycleStrategyTestCase >>>> I expect I'll be subclassing (or better) StartableLifecycleStrategy ... >>> >>> Sure, I raised PICO-355 and attached a test case. I'm not sure how >>> you want to implement this; I changed >>> testThirdPartyStartableAndDisposable to be AUTOMATIC to signify an >>> eager lifecycle, but this is obviously quite a change that will affect >>> users. >>> >>> Cheers, >>> >>> Mark >>> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Lazy lifecycleSure there is plenty of time for me to change it. send me a modified
testcase if you so desire :) Regards, - Paul On Jun 11, 2009, at 9:14 AM, Mark Hobson wrote: > Strange, I didn't receive any email notifications. Thanks for the > quick fix, although I'm not sure that that's what I need. I'll try to > find some time soon to have a proper look and let you know. > > Cheers, > > Mark > > 2009/6/8 Paul Hammant <paul@...>: >> fixed :) >> >> Regards, >> >> - Paul >> >> On Jun 8, 2009, at 5:31 AM, Mark Hobson wrote: >> >>> Paul, did you get a chance to take a look at this? >>> >>> Cheers, >>> >>> Mark >>> >>> 2009/5/27 Mark Hobson <markhobson@...>: >>>> >>>> 2009/5/26 Paul Hammant <paul@...>: >>>>> >>>>> That should be easy. >>>> >>>> Cool :) >>>> >>>>> Can to get us half way by writing a testcase :-) Perhaps a mod to >>>>> StartableLifecycleStrategyTestCase >>>>> I expect I'll be subclassing (or better) >>>>> StartableLifecycleStrategy ... >>>> >>>> Sure, I raised PICO-355 and attached a test case. I'm not sure how >>>> you want to implement this; I changed >>>> testThirdPartyStartableAndDisposable to be AUTOMATIC to signify an >>>> eager lifecycle, but this is obviously quite a change that will >>>> affect >>>> users. >>>> >>>> Cheers, >>>> >>>> Mark >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Lazy lifecycleFinally got back to this issue after a slight delay! I've reopened
PICO-355 as the original fix didn't fulfil my requirements. I'll try to explain better this time.. Currently, if you register a startable component, it is started when the container is started. I want a lifecycle strategy that only starts components when they are instantiated for use. For example, this is what currently happens ('A' is a Startable component): 1) pico.as(CACHE).addComponent(A.class) 2) pico.start() 3) (A is started) This is what I want to achieve: 1) pico.as(CACHE).addComponent(A.class) 2) pico.start() 3) (A is *not* started) 4) pico.getComponent(A.class) 5) (A is started) Similarly, stop and dispose need to behave accordingly. I've attached the above example as PICO-355-test2.patch under PICO-355. I'm happy to have a stab at providing a fix if someone could point me in the right direction. Cheers, Mark 2009/6/11 Paul Hammant <paul@...>: > Sure there is plenty of time for me to change it. send me a modified > testcase if you so desire :) > > Regards, > > - Paul > > On Jun 11, 2009, at 9:14 AM, Mark Hobson wrote: > >> Strange, I didn't receive any email notifications. Thanks for the >> quick fix, although I'm not sure that that's what I need. I'll try to >> find some time soon to have a proper look and let you know. >> >> Cheers, >> >> Mark >> >> 2009/6/8 Paul Hammant <paul@...>: >>> >>> fixed :) >>> >>> Regards, >>> >>> - Paul >>> >>> On Jun 8, 2009, at 5:31 AM, Mark Hobson wrote: >>> >>>> Paul, did you get a chance to take a look at this? >>>> >>>> Cheers, >>>> >>>> Mark >>>> >>>> 2009/5/27 Mark Hobson <markhobson@...>: >>>>> >>>>> 2009/5/26 Paul Hammant <paul@...>: >>>>>> >>>>>> That should be easy. >>>>> >>>>> Cool :) >>>>> >>>>>> Can to get us half way by writing a testcase :-) Perhaps a mod to >>>>>> StartableLifecycleStrategyTestCase >>>>>> I expect I'll be subclassing (or better) StartableLifecycleStrategy >>>>>> ... >>>>> >>>>> Sure, I raised PICO-355 and attached a test case. I'm not sure how >>>>> you want to implement this; I changed >>>>> testThirdPartyStartableAndDisposable to be AUTOMATIC to signify an >>>>> eager lifecycle, but this is obviously quite a change that will affect >>>>> users. >>>>> >>>>> Cheers, >>>>> >>>>> Mark >>>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe from this list, please visit: >>>> >>>> http://xircles.codehaus.org/manage_email >>>> >>>> >>>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Lazy lifecycleAnyone have any pointers regarding this?
Cheers, Mark 2009/9/23 Mark Hobson <markhobson@...>: > Finally got back to this issue after a slight delay! I've reopened > PICO-355 as the original fix didn't fulfil my requirements. I'll try > to explain better this time.. > > Currently, if you register a startable component, it is started when > the container is started. I want a lifecycle strategy that only > starts components when they are instantiated for use. > > For example, this is what currently happens ('A' is a Startable component): > > 1) pico.as(CACHE).addComponent(A.class) > 2) pico.start() > 3) (A is started) > > This is what I want to achieve: > > 1) pico.as(CACHE).addComponent(A.class) > 2) pico.start() > 3) (A is *not* started) > 4) pico.getComponent(A.class) > 5) (A is started) > > Similarly, stop and dispose need to behave accordingly. > > I've attached the above example as PICO-355-test2.patch under > PICO-355. I'm happy to have a stab at providing a fix if someone > could point me in the right direction. > > Cheers, > > Mark > > 2009/6/11 Paul Hammant <paul@...>: >> Sure there is plenty of time for me to change it. send me a modified >> testcase if you so desire :) >> >> Regards, >> >> - Paul >> >> On Jun 11, 2009, at 9:14 AM, Mark Hobson wrote: >> >>> Strange, I didn't receive any email notifications. Thanks for the >>> quick fix, although I'm not sure that that's what I need. I'll try to >>> find some time soon to have a proper look and let you know. >>> >>> Cheers, >>> >>> Mark >>> >>> 2009/6/8 Paul Hammant <paul@...>: >>>> >>>> fixed :) >>>> >>>> Regards, >>>> >>>> - Paul >>>> >>>> On Jun 8, 2009, at 5:31 AM, Mark Hobson wrote: >>>> >>>>> Paul, did you get a chance to take a look at this? >>>>> >>>>> Cheers, >>>>> >>>>> Mark >>>>> >>>>> 2009/5/27 Mark Hobson <markhobson@...>: >>>>>> >>>>>> 2009/5/26 Paul Hammant <paul@...>: >>>>>>> >>>>>>> That should be easy. >>>>>> >>>>>> Cool :) >>>>>> >>>>>>> Can to get us half way by writing a testcase :-) Perhaps a mod to >>>>>>> StartableLifecycleStrategyTestCase >>>>>>> I expect I'll be subclassing (or better) StartableLifecycleStrategy >>>>>>> ... >>>>>> >>>>>> Sure, I raised PICO-355 and attached a test case. I'm not sure how >>>>>> you want to implement this; I changed >>>>>> testThirdPartyStartableAndDisposable to be AUTOMATIC to signify an >>>>>> eager lifecycle, but this is obviously quite a change that will affect >>>>>> users. >>>>>> >>>>>> Cheers, >>>>>> >>>>>> Mark >>>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe from this list, please visit: >>>>> >>>>> http://xircles.codehaus.org/manage_email >>>>> >>>>> >>>>> >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe from this list, please visit: >>>> >>>> http://xircles.codehaus.org/manage_email >>>> >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Lazy lifecycleSorry Mark, I'll take a look tonight.
Regards, - Paul On Sep 30, 2009, at 9:38 AM, Mark Hobson wrote: > Anyone have any pointers regarding this? > > Cheers, > > Mark > > 2009/9/23 Mark Hobson <markhobson@...>: >> Finally got back to this issue after a slight delay! I've reopened >> PICO-355 as the original fix didn't fulfil my requirements. I'll try >> to explain better this time.. >> >> Currently, if you register a startable component, it is started when >> the container is started. I want a lifecycle strategy that only >> starts components when they are instantiated for use. >> >> For example, this is what currently happens ('A' is a Startable >> component): >> >> 1) pico.as(CACHE).addComponent(A.class) >> 2) pico.start() >> 3) (A is started) >> >> This is what I want to achieve: >> >> 1) pico.as(CACHE).addComponent(A.class) >> 2) pico.start() >> 3) (A is *not* started) >> 4) pico.getComponent(A.class) >> 5) (A is started) >> >> Similarly, stop and dispose need to behave accordingly. >> >> I've attached the above example as PICO-355-test2.patch under >> PICO-355. I'm happy to have a stab at providing a fix if someone >> could point me in the right direction. >> >> Cheers, >> >> Mark >> >> 2009/6/11 Paul Hammant <paul@...>: >>> Sure there is plenty of time for me to change it. send me a >>> modified >>> testcase if you so desire :) >>> >>> Regards, >>> >>> - Paul >>> >>> On Jun 11, 2009, at 9:14 AM, Mark Hobson wrote: >>> >>>> Strange, I didn't receive any email notifications. Thanks for the >>>> quick fix, although I'm not sure that that's what I need. I'll >>>> try to >>>> find some time soon to have a proper look and let you know. >>>> >>>> Cheers, >>>> >>>> Mark >>>> >>>> 2009/6/8 Paul Hammant <paul@...>: >>>>> >>>>> fixed :) >>>>> >>>>> Regards, >>>>> >>>>> - Paul >>>>> >>>>> On Jun 8, 2009, at 5:31 AM, Mark Hobson wrote: >>>>> >>>>>> Paul, did you get a chance to take a look at this? >>>>>> >>>>>> Cheers, >>>>>> >>>>>> Mark >>>>>> >>>>>> 2009/5/27 Mark Hobson <markhobson@...>: >>>>>>> >>>>>>> 2009/5/26 Paul Hammant <paul@...>: >>>>>>>> >>>>>>>> That should be easy. >>>>>>> >>>>>>> Cool :) >>>>>>> >>>>>>>> Can to get us half way by writing a testcase :-) Perhaps a >>>>>>>> mod to >>>>>>>> StartableLifecycleStrategyTestCase >>>>>>>> I expect I'll be subclassing (or better) >>>>>>>> StartableLifecycleStrategy >>>>>>>> ... >>>>>>> >>>>>>> Sure, I raised PICO-355 and attached a test case. I'm not >>>>>>> sure how >>>>>>> you want to implement this; I changed >>>>>>> testThirdPartyStartableAndDisposable to be AUTOMATIC to >>>>>>> signify an >>>>>>> eager lifecycle, but this is obviously quite a change that >>>>>>> will affect >>>>>>> users. >>>>>>> >>>>>>> Cheers, >>>>>>> >>>>>>> Mark >>>>>>> >>>>>> >>>>>> --------------------------------------------------------------------- >>>>>> To unsubscribe from this list, please visit: >>>>>> >>>>>> http://xircles.codehaus.org/manage_email >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe from this list, please visit: >>>>> >>>>> http://xircles.codehaus.org/manage_email >>>>> >>>>> >>>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe from this list, please visit: >>>> >>>> http://xircles.codehaus.org/manage_email >>>> >>>> >>>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >> > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Lazy lifecycleThanks in advance Paul.
2009/9/30 Paul Hammant <paul@...>: > Sorry Mark, I'll take a look tonight. > > Regards, > > - Paul > > On Sep 30, 2009, at 9:38 AM, Mark Hobson wrote: > >> Anyone have any pointers regarding this? >> >> Cheers, >> >> Mark >> >> 2009/9/23 Mark Hobson <markhobson@...>: >>> >>> Finally got back to this issue after a slight delay! I've reopened >>> PICO-355 as the original fix didn't fulfil my requirements. I'll try >>> to explain better this time.. >>> >>> Currently, if you register a startable component, it is started when >>> the container is started. I want a lifecycle strategy that only >>> starts components when they are instantiated for use. >>> >>> For example, this is what currently happens ('A' is a Startable >>> component): >>> >>> 1) pico.as(CACHE).addComponent(A.class) >>> 2) pico.start() >>> 3) (A is started) >>> >>> This is what I want to achieve: >>> >>> 1) pico.as(CACHE).addComponent(A.class) >>> 2) pico.start() >>> 3) (A is *not* started) >>> 4) pico.getComponent(A.class) >>> 5) (A is started) >>> >>> Similarly, stop and dispose need to behave accordingly. >>> >>> I've attached the above example as PICO-355-test2.patch under >>> PICO-355. I'm happy to have a stab at providing a fix if someone >>> could point me in the right direction. >>> >>> Cheers, >>> >>> Mark >>> >>> 2009/6/11 Paul Hammant <paul@...>: >>>> >>>> Sure there is plenty of time for me to change it. send me a modified >>>> testcase if you so desire :) >>>> >>>> Regards, >>>> >>>> - Paul >>>> >>>> On Jun 11, 2009, at 9:14 AM, Mark Hobson wrote: >>>> >>>>> Strange, I didn't receive any email notifications. Thanks for the >>>>> quick fix, although I'm not sure that that's what I need. I'll try to >>>>> find some time soon to have a proper look and let you know. >>>>> >>>>> Cheers, >>>>> >>>>> Mark >>>>> >>>>> 2009/6/8 Paul Hammant <paul@...>: >>>>>> >>>>>> fixed :) >>>>>> >>>>>> Regards, >>>>>> >>>>>> - Paul >>>>>> >>>>>> On Jun 8, 2009, at 5:31 AM, Mark Hobson wrote: >>>>>> >>>>>>> Paul, did you get a chance to take a look at this? >>>>>>> >>>>>>> Cheers, >>>>>>> >>>>>>> Mark >>>>>>> >>>>>>> 2009/5/27 Mark Hobson <markhobson@...>: >>>>>>>> >>>>>>>> 2009/5/26 Paul Hammant <paul@...>: >>>>>>>>> >>>>>>>>> That should be easy. >>>>>>>> >>>>>>>> Cool :) >>>>>>>> >>>>>>>>> Can to get us half way by writing a testcase :-) Perhaps a mod to >>>>>>>>> StartableLifecycleStrategyTestCase >>>>>>>>> I expect I'll be subclassing (or better) StartableLifecycleStrategy >>>>>>>>> ... >>>>>>>> >>>>>>>> Sure, I raised PICO-355 and attached a test case. I'm not sure how >>>>>>>> you want to implement this; I changed >>>>>>>> testThirdPartyStartableAndDisposable to be AUTOMATIC to signify an >>>>>>>> eager lifecycle, but this is obviously quite a change that will >>>>>>>> affect >>>>>>>> users. >>>>>>>> >>>>>>>> Cheers, >>>>>>>> >>>>>>>> Mark >>>>>>>> >>>>>>> >>>>>>> --------------------------------------------------------------------- >>>>>>> To unsubscribe from this list, please visit: >>>>>>> >>>>>>> http://xircles.codehaus.org/manage_email >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> --------------------------------------------------------------------- >>>>>> To unsubscribe from this list, please visit: >>>>>> >>>>>> http://xircles.codehaus.org/manage_email >>>>>> >>>>>> >>>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe from this list, please visit: >>>>> >>>>> http://xircles.codehaus.org/manage_email >>>>> >>>>> >>>>> >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe from this list, please visit: >>>> >>>> http://xircles.codehaus.org/manage_email >>>> >>>> >>>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |