logging out with transient lifestyle.
Peter Courcoux
peter at courcoux.biz
Sun Oct 31 03:52:04 EST 2004
Thanks Niclas, no instance until one is requested so no logging. I
should read the log more closely :-(
On Sun, 2004-10-31 at 03:56, Niclas Hedhman wrote:
> On Sunday 31 October 2004 03:17, Peter Courcoux wrote:
> > Hi, I'm playing with the HelloComponent in metro developer in eclipse. I
> > have changed odd bits as I'm experimenting but it is basically the
> > HelloComponent class from the tutorial.
> >
> > I'm puzzled as to why if I change the lifestyle tag to transient i lose
> > the logging output.
>
> I *think* YOU *think* that you loose logging output, and that is observing the
> wrong symptom.
>
> Scrapping away everything that is same in your long outputs, we get;
>
> For your case 1;
> [DEBUG ] (tutorial.fred.lifecycle): incarnation
> [DEBUG ] (tutorial.fred.lifecycle): instantiating component with 1
> arguments.
> [INFO ] (tutorial.fred): Hello
> [DEBUG ] (tutorial.fred.lifecycle): applying configuration
> [INFO ] (tutorial.fred): Configuring hello component
> [DEBUG ] (tutorial.fred.lifecycle): applying initialization
> [INFO ] (tutorial.fred): initialized for Peter Courcoux
> [DEBUG ] (tutorial.fred.lifecycle): incarnation complete
> [DEBUG ] (tutorial): commissioning of [fred] completed in 35
> milliseconds
> [DEBUG ] (): commissioning of [tutorial] completed in 60 milliseconds
> [DEBUG ] (kernel): state: started
> [DEBUG ] (kernel): shutdown phase
> [DEBUG ] (kernel): state: stopping
> [DEBUG ] (kernel): state: decommissioning
> [DEBUG ] (): decommissioning
> [DEBUG ] (tutorial): decommissioning
> [DEBUG ] (tutorial.fred.lifecycle): etherialization
>
> And then for case 2;
> [DEBUG ] (tutorial): commissioning of [fred] completed in 27
> milliseconds
> [DEBUG ] (): commissioning of [tutorial] completed in 48 milliseconds
> [DEBUG ] (kernel): state: started
> [DEBUG ] (kernel): shutdown phase
> [DEBUG ] (kernel): state: stopping
> [DEBUG ] (kernel): state: decommissioning
> [DEBUG ] (): decommissioning
> [DEBUG ] (tutorial): decommissioning
>
> And you will see that the whole thing is not about logging, but about
> activation of the component. No instances of the Hello component is ever
> created. I have not yet looked at the Hello example to know why that is the
> case for Transient but happens for Thread (Singleton vs Transient could be
> understandable, due to activation policy = startup, which is ignored by
> transient.)
>
> Cheers
> Niclas
--
Regards,
Peter
----------------------------
Peter Courcoux
Telephone +44 (0)1923 661488
Mobile 07880 605626
----------------------------
More information about the support-dpml
mailing list