6 Replies Latest reply on Sep 6, 2010 9:39 AM by jaikiran

    Looking up no-interface views

    marius.bogoevici

      I'm looking for a way of looking up a no-interface view by the bean class (for weld-int) - is there any way to use the EjbReferenceResolver for that - or is there an equivalent for no-interface views?

       

      Thanks,

      Marius

        • 1. Re: Looking up no-interface views
          jaikiran

          EjbReferenceResolver is indeed the right one for this. Although the current implementation isn't taking into account the nointerface view. I'll add something around this, but that might happen after M4 is released. Is this something that you are looking to be done before M4?

          • 2. Re: Looking up no-interface views
            marius.bogoevici

            Jaikiran,

             

            Thanks for the confirmation.

             

            My only concern is the functionality gap between Weld-int and EJB3.1 in JBAS - i.e. developers can create no-interface views but then they cannot inject them, which gives way to the perception that "EJB injection doesn't work in CDI". If we can close the gap by M4, it would be great - so that's the main reason why this would be a "very good thing to have". Anyway, as soon as the functionality is exposed in the resolver, I can make sure that it's integrated correctly on our side (if it needs to).

             

            Btw, how do you plan on dealing with this? Supply the bean class as the "interface" of the EJB reference ?

             

            Marius

            • 3. Re: Looking up no-interface views
              jaikiran

              Hi Marius,

              Marius Bogoevici wrote:

               

              My only concern is the functionality gap between Weld-int and EJB3.1 in JBAS - i.e. developers can create no-interface views but then they cannot inject them, which gives way to the perception that "EJB injection doesn't work in CDI". If we can close the gap by M4, it would be great - so that's the main reason why this would be a "very good thing to have".

              Yes, that would lead to obvious user deployment issues. And having that working would be certainly be a very good thing. Given the current priorities for EJB3.1 with AS 6.0 M4, I am not really sure when I'll be able to look into this, but I promise to spend time on this whenever I get some.

               

              Marius Bogoevici wrote:

               

              Btw, how do you plan on dealing with this? Supply the bean class as the "interface" of the EJB reference ?

               

              Yes, that's the plan right now.

               

              I'll update this thread once I am something ready around this.

              • 4. Re: Looking up no-interface views
                kabirkhan

                jaikiran pai wrote:

                Marius Bogoevici wrote:

                 

                Btw, how do you plan on dealing with this? Supply the bean class as the "interface" of the EJB reference ?

                 

                Yes, that's the plan right now.

                 

                I'll update this thread once I am something ready around this.

                If you're planning on generating classes, javassist now contains a superfast ClassFileWriter API. It is lower level than the CtClass API, meaning you have to code in the Opcodes yourself, but it is fast and outperforms ASM.

                • 5. Re: Looking up no-interface views
                  pmuir

                  Until EJB 3 supports this, I'm just logging a warning the no-interface ejbs won't be removed properly by Weld.

                  • 6. Re: Looking up no-interface views
                    jaikiran

                    Marius/Pete, this https://jira.jboss.org/browse/EJBTHREE-2143 has now been integrated in AS trunk. More details here https://community.jboss.org/thread/155745?tstart=0