Module classes are not instantiated until a non-static method of the
module must be invoked.  Could this be the source of your issue?
Because Tapestry IoC services are lazily instantiated, you may be able
to navigate a section of your application before it becomes necessary
to instantiate the module class.

On Nov 8, 2007 1:05 AM, Alexander Lamb <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have an AppModule with several services defined.
> I need to initialize a few things when the application starts. I
> thought I would put them in the constructor of AppModule.
>
> Well, depending on what is in the constructor, sometimes it is called,
> sometimes not.
>
> Something as simple as:
>
>    public AppModule() {
>         System.out.println("---- AppModule init...");
>         }
>
> Prints out the trace correctly.
>
> But if I add:
>
>    public AppModule() {
>         System.out.println("---- AppModule init...");
>         StudiesFoundationInitializer initializer = new
> StudiesFoundationInitializer();
>         }
>
> It does not get get called.
>
> Is this the correct way of doing things? Why does it silently not call
> AppModule?
>
> Thanks
>
> Alex
> --
> Alexander Lamb
> Founding Associate
> RODANOTECH Sàrl
>
> 4 ch. de la Tour de Champel
> 1206 Geneva
> Switzerland
>
> Tel:  022 347 77 37
> Fax: 022 347 77 38
>
> http://www.rodanotech.ch
>
>
>
>



-- 
Howard M. Lewis Ship
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to