3 Replies Latest reply on Jan 27, 2006 11:23 AM by José Luis Barrera

    Dependency injection failing

    José Luis Barrera Newbie

      I have 2 codes with dependencie injection through EJB3 notations.

      Both codes looks the sames:
      @Resource (name="QueueConnectionFactory")
      public QueueConnectionFactory factory;

      @Resource (name="queue/TrackingQueue", type=Queue.class)
      public Queue queue;
      One code is inside and Stateless EJB3, and the binding to the Queue is failing with this exception:
      "javax.naming.NameNotFoundException: queue not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:514)"

      The other code in a EJB Interceptor is working fine.

      The strangest thing of all is that the QueueConnectionFactory is injected with no problems but the Queue is not.


      Pd. The queue is created at startup.