2 Replies Latest reply on Apr 9, 2010 5:53 AM by Marcus Linke

    EJB3: MessageInflowLocalProxy should implement all EJB interfaces?

    Marcus Linke Newbie

      Hello developers,

       

      i'm currently trying to implement scheduling based on quartz ressource adapter and MDBs with JBoss-4.2.3.GA. Unfortunally currently (for 4.2.3.GA and trunk) there is no support for stateful interruptable quartz jobs that we need here. While trying to implement this by modifying the quartz resource adapter integration i figured out that the MessageIncomingLocalProxy created by JBossMessageEndpointFactory only implements the message listener interface but not all the other interfaces of the MDB. As i found out this is the same behavior as in the current ejb-core trunk too. It stops me from creating a delegating quartz job style dynamic proxy that implements the needed interfaces (StatefulJob AND InterruptableJob) via MessageIncomingLocalProxy.class.getInterfaces(). Is it ever possible to change JBossMessageEndpointFactory to implement this or is it not a good idea for any reason? Can someone explain the details please?

       

      Thanks.

       

      Marcus

        • 1. Re: EJB3: MessageInflowLocalProxy should implement all EJB interfaces?
          Carlo de Wolf Master

          I think your problem stems from the fact that a MDB is only allowed one message listener interface.

           

          See EJB 3.1 FR 5.4.2.

           

          If you want to create a JBoss extension that would allow multiple interfaces please do so on AS 6 code base.

          • 2. Re: EJB3: MessageInflowLocalProxy should implement all EJB interfaces?
            Marcus Linke Newbie

            Hi Carlo,

             

            thanks for the suggestions so far.  As I understand, the container must decide which is the message listener interface. This can be done safely by using the 'messageListenerInterface' element of the 'MessageDriven' annotation in the case that the MDB implements multiple interfaces. But why MessageInflowLocalProxy which is a JBoss specific class can't implement ALL of the MDBs interfaces? It's a proxy of the MDB and it should implement all 'physical' interfaces not only the detected messageListenerInterface in my opinion. Is there any reason why this is not the case?

             

            What do you mean with "...if you want to create a JBoss extension..."? Is there any extension mechanism? Can you point me to the right direction here, please?

             

            Regards

             

            Marcus