2 Replies Latest reply on Jan 26, 2007 8:49 AM by berkum

    @EJB annotation support in seam

    berkum

      Hello.

      I would like to know if it is possible to use the @EJB annotation with seam in order to inject ejbs. I have tried with the examples to replace the @In annotations with @EJB thinking they were quite the same but I am getting the following error when starting the server ( I replaced @In on user attribute in RegistrationAction of registration project). Anyone did it ?

      Thanks


      --- MBeans waiting for other MBeans ---
      ObjectName: jboss.j2ee:ear=Registration.ear,jar=RegistrationEJB.jar,name=RegisterAction,service=EJB3
      State: FAILED
      Reason: java.lang.RuntimeException: could not resolve global JNDI name for @EJB for container RegisterAction: reference class: org.jboss.seam.example.registration.User ejbLink: not used by any EJBs
      I Depend On:
      persistence.units:ear=Registration.ear,jar=RegistrationEJB.jar,unitName=pocDatabase

        • 1. Re: @EJB annotation support in seam
          pmuir

          You use @EJB for injecting EJBs, @In for injecting Seam components. They aren't interchangeable.

          • 2. Re: @EJB annotation support in seam
            berkum

            Thank you.

            I started last week with seam and this is the conclusion I was coming to but I needed confirmation. I think I will look for a seam FAQ first.

            That said, seam jar file will always have to be deployed with the EAR and will still need a JAVAEE 5 app server in order to work, right ?

            Regards.