2. Great. works. .setInitOnStartup(true) does the trick. For group
reference. Something like this: ejbJar.addEnterpriseBean(new
SingletonBean(CacheInitBean.class)).setInitOnStartup(true);

1. It's kinda blind on log4j stuff. Added the log4j maven test dependency,
then added the log4j.properties to src/test/resources . Log level is
fine... what else ?

2016-05-20 11:47 GMT+02:00 Romain Manni-Bucau <[email protected]>:

> Hello
>
> 2016-05-20 11:34 GMT+02:00 Gregory Orciuch <[email protected]>:
>
> > Hi,
> >
> > I think I'm facing an configuration issue here.
> > So having the @Singleton and @Startup Bean which is added in application
> > composer as below:
> > @Module
> >     public EjbJar beans() {
> >         EjbJar ejbJar = new EjbJar("ejb-beans");
> >
> >         ejbJar.addEnterpriseBean(new SingletonBean(CacheInitBean.class));
> > ....
> >
> >
> > This guy needs to perform a @PostConstruct actions, and I do not see the
> > logs out and seems like the PostConstruct is not fired at all
> >
> > So two questions
> > 1. How to ensure the log4j works for ApplicationComposer's created beans
> ?
> >
>
> What's your issue? adding the jars and config should be enough
>
>
> > 2. Why @Startup seems to be skipped ?
> >
> >
> You set up a SingletonBean so you need to set setInitOnStartup
>
>
> > BR,
> > Gregory
> >
>

Reply via email to