This content has been marked as final.
Show 6 replies
-
1. Re: How to get @Logger during @Startup?
tom_goring Apr 12, 2008 6:05 AM (in response to brombie.wanch.akewan.com)That should wok just fine....
my guess is your not using the seam IoC container to get the doStuff component.
-
2. Re: How to get @Logger during @Startup?
brombie.wanch.akewan.com Apr 12, 2008 6:29 PM (in response to brombie.wanch.akewan.com)I don't have control on how to get the doStuff component. Since it's a startup component, it's Seam itself that instantiates it.
I read somewhere that @Logger is a
special
component hence it can't be obtained during startup. No idea whatspecial
means though. -
3. Re: How to get @Logger during @Startup?
tom_goring Apr 12, 2008 9:31 PM (in response to brombie.wanch.akewan.com)How are you calling your startup method? maybe you should add @Create on it so it gets called by seam once your component is created and injected
-
4. Re: How to get @Logger during @Startup?
brombie.wanch.akewan.com Apr 13, 2008 2:01 AM (in response to brombie.wanch.akewan.com)Hi Tom,
I'm not calling it, Seam does. The @Startup annotation makes Seam, on startup, calling the startup(Component) method. I'll try your @Create suggestion though! Thanks for the reply
-
5. Re: How to get @Logger during @Startup?
shane.bryzak Apr 13, 2008 3:49 AM (in response to brombie.wanch.akewan.com)This should work:
private final LogProvider log = Logging.getLogProvider(DoStuff.class);
-
6. Re: How to get @Logger during @Startup?
pmuir Apr 14, 2008 10:22 AM (in response to brombie.wanch.akewan.com)
Brom bie wrote on Apr 13, 2008 02:01 AM:
I'm not calling it, Seam does. The @Startup annotation makes Seam, on startup, calling the startup(Component) method.Rubbish, no it doesn't.