Contribution to ApplicationStateManager not called on ApplicationModule

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Contribution to ApplicationStateManager not called on ApplicationModule

yazmin georgina quintal-2
I have this code con ApplicationModule (T.5.4.3), but I do not see my contribution method being called:
    @Contribute(value = ApplicationStateManager.class)
    public static void provideStateCreators(MappedConfiguration<Class, ApplicationStateContribution> configuration) {
   
    System.out.println("provideStateCreators");

    configuration.add(Cotizacion.class,
        new ApplicationStateContribution(CayenneConstants.ENTITY, new ApplicationStateCreator<Cotizacion>() {
            @Override
            public Cotizacion create() {
            System.out.println("contributeApplicationStateManager.create call");
            return new Cotizacion();
            }
        }
        ));
    }
Thanks.

Saludos.
 Atte. Yazmín Georgina Quintal Moo
Local 63 y 64 de Plaza de la Tecnología. Villahermosa, Tab.
Tel 993 1311688
Cel. 9931 689207
Reply | Threaded
Open this post in threaded view
|

Re: Contribution to ApplicationStateManager not called on ApplicationModule

Marvin Monroe
Hi,
may we have a look at your web.xml? Maybe your app isn’t called 'application‘.


> Am 07.05.2017 um 06:46 schrieb yazmin georgina quintal <[hidden email]>:
>
> I have this code con ApplicationModule (T.5.4.3), but I do not see my contribution method being called:
>     @Contribute(value = ApplicationStateManager.class)
>     public static void provideStateCreators(MappedConfiguration<Class, ApplicationStateContribution> configuration) {
>    
>     System.out.println("provideStateCreators");
>
>     configuration.add(Cotizacion.class,
>         new ApplicationStateContribution(CayenneConstants.ENTITY, new ApplicationStateCreator<Cotizacion>() {
>             @Override
>             public Cotizacion create() {
>             System.out.println("contributeApplicationStateManager.create call");
>             return new Cotizacion();
>             }
>         }
>         ));
>     }
> Thanks.
>
> Saludos.
> Atte. Yazmín Georgina Quintal Moo
> Local 63 y 64 de Plaza de la Tecnología. Villahermosa, Tab.
> Tel 993 1311688
> Cel. 9931 689207


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Contribution to ApplicationStateManager not called on ApplicationModule

yazmin georgina quintal-2
Thank you for your interest.
I found the contribution was called asyncronously when needed, no during app initialization... so I was wrong.


 Saludos.
 Atte. Yazmín Georgina Quintal Moo
Local 63 y 64 de Plaza de la Tecnología. Villahermosa, Tab.
Tel 993 1311688
Cel. 9931 689207

      De: Christian Riedel <[hidden email]>
 Para: Tapestry users <[hidden email]>; yazmin georgina quintal <[hidden email]>
 Enviado: Domingo, 7 de mayo, 2017 9:14:29
 Asunto: Re: Contribution to ApplicationStateManager not called on ApplicationModule
   
Hi,
may we have a look at your web.xml? Maybe your app isn’t called 'application‘.


> Am 07.05.2017 um 06:46 schrieb yazmin georgina quintal <[hidden email]>:
>
> I have this code con ApplicationModule (T.5.4.3), but I do not see my contribution method being called:
>    @Contribute(value = ApplicationStateManager.class)
>    public static void provideStateCreators(MappedConfiguration<Class, ApplicationStateContribution> configuration) {
>   
>    System.out.println("provideStateCreators");
>
>    configuration.add(Cotizacion.class,
>        new ApplicationStateContribution(CayenneConstants.ENTITY, new ApplicationStateCreator<Cotizacion>() {
>            @Override
>            public Cotizacion create() {
>            System.out.println("contributeApplicationStateManager.create call");
>            return new Cotizacion();
>            }
>        }
>        ));
>    }
> Thanks.
>
> Saludos.
> Atte. Yazmín Georgina Quintal Moo
> Local 63 y 64 de Plaza de la Tecnología. Villahermosa, Tab.
> Tel 993 1311688
> Cel. 9931 689207


   
Reply | Threaded
Open this post in threaded view
|

Re: Contribution to ApplicationStateManager not called on ApplicationModule

Thiago H. de Paula Figueiredo
Hi!

Indeed, almost every Tapestry-IoC service is only created when first used.
In other words, lazily.

On Mon, May 8, 2017 at 10:57 AM, yazmin georgina quintal <
[hidden email]> wrote:

> Thank you for your interest.
> I found the contribution was called asyncronously when needed, no during
> app initialization... so I was wrong.
>
>
>  Saludos.
>  Atte. Yazmín Georgina Quintal Moo
> Local 63 y 64 de Plaza de la Tecnología. Villahermosa, Tab.
> Tel 993 1311688
> Cel. 9931 689207
>
>       De: Christian Riedel <[hidden email]>
>  Para: Tapestry users <[hidden email]>; yazmin georgina
> quintal <[hidden email]>
>  Enviado: Domingo, 7 de mayo, 2017 9:14:29
>  Asunto: Re: Contribution to ApplicationStateManager not called on
> ApplicationModule
>
> Hi,
> may we have a look at your web.xml? Maybe your app isn’t called
> 'application‘.
>
>
> > Am 07.05.2017 um 06:46 schrieb yazmin georgina quintal <
> [hidden email]>:
> >
> > I have this code con ApplicationModule (T.5.4.3), but I do not see my
> contribution method being called:
> >    @Contribute(value = ApplicationStateManager.class)
> >    public static void provideStateCreators(MappedConfiguration<Class,
> ApplicationStateContribution> configuration) {
> >
> >    System.out.println("provideStateCreators");
> >
> >    configuration.add(Cotizacion.class,
> >        new ApplicationStateContribution(CayenneConstants.ENTITY, new
> ApplicationStateCreator<Cotizacion>() {
> >            @Override
> >            public Cotizacion create() {
> >            System.out.println("contributeApplicationStateManager.create
> call");
> >            return new Cotizacion();
> >            }
> >        }
> >        ));
> >    }
> > Thanks.
> >
> > Saludos.
> > Atte. Yazmín Georgina Quintal Moo
> > Local 63 y 64 de Plaza de la Tecnología. Villahermosa, Tab.
> > Tel 993 1311688
> > Cel. 9931 689207
>
>
>
>



--
Thiago