6 Replies Latest reply on May 4, 2006 10:44 PM by bdecoste

    @EJB in @Service for 4.0.4.CR2

      In 4.0.4RC1, I used @EJB to inject interfaces into my @Service beans.

      This doesn't seem to work in 4.0.4.CR2. @EJB is ignored.

      Is this by design, and if so, is there an alternative besides doing JNDI lookups?

      Thanks,
      Jeff

        • 1. Re: @EJB in @Service for 4.0.4.CR2

          Should I file a bug against this?

          Jeff

          • 2. Re: @EJB in @Service for 4.0.4.CR2
            propatalent

            I'm having the exact same problem. It looks like the binding works properly but the objects are never injected.

            
            2006-05-04 15:04:19,499 DEBUG [org.jboss.ejb3.EJBContainer] binding enc: env/com.tradedesksoftware.oms.service.OmsServiceBean/_factory to java:/ConnectionFactory
             2006-05-04 15:04:19,499 DEBUG [org.jboss.ejb3.EJBContainer] binding enc: env/oms/Application to oms-full-ear/oms/Application/local
             2006-05-04 15:04:19,499 DEBUG [org.jboss.ejb3.EJBContainer] binding enc: env/OmsDBConfig to oms-full-ear/OmsDBConfig/local
             2006-05-04 15:04:19,499 DEBUG [org.jboss.ejb3.EJBContainer] binding enc: env/com.tradedesksoftware.oms.service.OmsServiceBean/_topic to topic/OmsTopic
             2006-05-04 15:04:19,499 DEBUG [org.jboss.ejb3.EJBContainer] binding enc: env/service/Manager to oms-full-ear/service/Manager/local
            2006-05-04 15:04:19,546 DEBUG [org.jboss.ejb3.security.JaccHelper] service/Oms has no @SecurityDomain - skipping JACC configuration
            2006-05-04 15:04:19,546 INFO [org.jboss.ejb3.EJBContainer] STARTED EJB: com.tradedesksoftware.oms.service.OmsServiceBean ejbName: service/Oms
            2006-05-04 15:04:19,546 DEBUG [org.jboss.system.ServiceController] Creating service com.tradedesk:service=oms
            2006-05-04 15:04:19,546 DEBUG [org.jboss.system.ServiceController] adding depends in ServiceController.register: [com.tradedesk:service=tsi-protocol-layer]
            2006-05-04 15:04:19,546 DEBUG [org.jboss.system.ServiceController] recording that com.tradedesk:service=oms depends on com.tradedesk:service=tsi-protocol-layer
            2006-05-04 15:04:19,562 INFO [com.tradedesksoftware.oms.service.OmsServiceBean] Creating Oms Services.
            2006-05-04 15:04:19,562 DEBUG [org.jboss.system.ServiceController] Creating dependent components for: com.tradedesk:service=oms dependents are: []
            2006-05-04 15:04:19,562 DEBUG [org.jboss.system.ServiceController] starting service com.tradedesk:service=oms
            2006-05-04 15:04:19,562 INFO [com.tradedesksoftware.oms.service.OmsServiceBean] Start()
            2006-05-04 15:04:19,562 DEBUG [com.tradedesksoftware.oms.service.OmsServiceBean] Injection : [Settings=null, ServiceManager=null, Topic=null, Factory=null]
            2006-05-04 15:04:19,562 WARN [org.jboss.system.ServiceController] Problem starting service com.tradedesk:service=oms
            javax.ejb.EJBException: java.lang.NullPointerException


            -Jeff

            • 3. Re: @EJB in @Service for 4.0.4.CR2
              • 4. Re: @EJB in @Service for 4.0.4.CR2
                bdecoste

                There were problems with injections into Service beans for RC5 and RC6. These problems have been corrected in RC7 - injections now occur prior to the start() lifecycle method is called in the Service. Were you trying to access the injected EJB in the start method?

                • 5. Re: @EJB in @Service for 4.0.4.CR2

                   

                  "bdecoste" wrote:
                  There were problems with injections into Service beans for RC5 and RC6. These problems have been corrected in RC7 - injections now occur prior to the start() lifecycle method is called in the Service. Were you trying to access the injected EJB in the start method?


                  I was (am), yep. Glad to hear it's fixed. Any ETA on RC7?

                  Thanks,
                  Jeff Schnitzer
                  http://subetha.tigris.org/

                  • 6. Re: @EJB in @Service for 4.0.4.CR2
                    bdecoste

                    Before Java One - should be end of next week.