also, you can do @ApplicationScoped @PostConstruct; this is what I do in my app. :)
On Mon, Jan 20, 2014 at 10:32 AM, Romain Manni-Bucau <[email protected]>wrote: > the easier will be to rely on ejb @Singleton @Startup. > Romain Manni-Bucau > Twitter: @rmannibucau > Blog: http://rmannibucau.wordpress.com/ > LinkedIn: http://fr.linkedin.com/in/rmannibucau > Github: https://github.com/rmannibucau > > > > 2014/1/20 Martin Strohal <[email protected]>: > > Hi, > > > > I'm using TomEE 1.5.2 and I want some application code to be executed on > application (WAR) startup. It's a loader which reads a configuration file. > The class is a CDI class, but no other class has a reference to it. That's > why it is not created normally. > > What's the best way to do that? Must I convert the class to an EJB? Or > is there a CDI mechanism? > > > > Thanks! > > > > Martin >
