2 Replies Latest reply on May 31, 2006 11:35 AM by Ciro Cavani

    Getting a Seam Component in a Servlet

    Giancarlo Corzo Newbie


      I'm trying to get a Seam component in a Servlet, this servlet start with the application (load on start up).

      I use this to get the Component:

      Hashtable env = new Hashtable();
       ctx = new InitialContext(env);
      bean = (Procesador)ctx.lookup("ProcesadorBean/local");

      Because I wanted to inject a Spring Bean in it and start a process.

      My problem is that when I get the Seam component this way the seam doesn't inject the persistent Manager.

      public class ProcesadorBean implements Procesador {
       @In(create = true)
       private EntityManager fonocontrolDatabase;
      Is there any other way to do the same?