[jboss-user] [JBoss Seam] - Initialization code

Sammy8306 do-not-reply at jboss.com
Fri Apr 13 04:23:04 EDT 2007


Well, my first steps with seam are succesful. However, I'm wondering how I should add code that should only run (once) at the initialization of the web-app. My first idea was to create an application scoped component, auto-create set to true and to put the code in the constructor. However, there are 2 problems: this component is only instantiated when I inject it somewhere (makes sense, lazy instantiation).  Furthermore, I need access to the Seam managed EntityManager. I tried to inject it into the application component, however injected values are not available in the constructor, it seems (which makes sense as well).  

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036974#4036974

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036974



More information about the jboss-user mailing list