1 2 Previous Next 18 Replies Latest reply on Apr 25, 2007 2:06 AM by Carsten Hoehne

    Initialization code

    Sander Mak Newbie

      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).

        1 2 Previous Next