it might be worth taking a look at the rollback from using Guice and trying to work with the injection mechanisms that are already available with Java EE 5.
Regarding finding a suitable βstarting pointβ, unfortunately, the EJB specification does not define the way you can run a bean at startup. However, the EE specification web profile has one thing: you can add a WAR to your application and install the servlet listener component:
http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContextListener.html
You can set this to run when the application is loaded and launched by the container (WebSphere). However, pay attention to problems with class loaders.
source share