3 Replies Latest reply on Dec 8, 2008 10:06 AM by jaikiran pai

    Problem in injecting simple env entries in EJB

    arun vikram Newbie

      Hi ,
      I am trying to inject environment entries as below and I get the error "[ResourceHandler] Not injecting duration, no matching enc injector".

      ejb-jar.xml



      <ejb-name>TimerEjb</ejb-name>

      gov.gsa.ejb.test.MyTimerBeanRemote
      <ejb-class>gov.gsa.ejb.test.MyTimerBean</ejb-class>
      <session-type>Stateless</session-type>
      <env-entry>
      Initial Duration
      <env-entry-name>gov.gsa.ejb.test.MyTimerBean/duration</env-entry-name>
      <env-entry-type>java.lang.String</env-entry-type>
      <env-entry-value>300000</env-entry-value>
      <injection-target>
      <injection-target-class>gov.gsa.ejb.test.MyTimerBean</injection-target-class>
      <injection-target-name>duration</injection-target-name>
      </injection-target>
      </env-entry>




      SESSION BEAN
      ============

      public class MyTimerBean implements MyTimerBeanRemote{

      private SessionContext context;

      @Resource String duration ;


      According to EJB3-CORE spec , the environment entry should get injected.


      Appreciate your reply.

      Thanks,
      Plethora