thanks! 2016-05-23 15:02 GMT+02:00 Romain Manni-Bucau <[email protected]>:
> without more info you'll not get much help I fear. Providing a github > project showing the issue will make it trivial to solve IMO. > > > Romain Manni-Bucau > @rmannibucau <https://twitter.com/rmannibucau> | Blog > <http://rmannibucau.wordpress.com> | Github < > https://github.com/rmannibucau> | > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber > <http://www.tomitribe.com> | JavaEE Factory > <https://javaeefactory-rmannibucau.rhcloud.com> > > 2016-05-23 15:01 GMT+02:00 Gregory Orciuch <[email protected]>: > > > Hi, > > any further idea how to enable log4j ? > > > > 2016-05-20 11:57 GMT+02:00 Gregory Orciuch <[email protected]>: > > > > > Yeap directly, actually I only pull the openejb-core for the > > > ApplicationComposer > > > > > > 2016-05-20 11:56 GMT+02:00 Romain Manni-Bucau <[email protected]>: > > > > > >> 2016-05-20 11:54 GMT+02:00 Gregory Orciuch <[email protected]>: > > >> > > >> > 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 ? > > >> > > > >> > > > >> do you use log4j API directly? TomEE uses JUL by default and needs to > be > > >> configured to use log4j but not your code. > > >> > > >> > > >> > 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 > > >> > > > > > >> > > > > >> > > > >> > > > > > > > > >
