7 Replies Latest reply on Mar 31, 2009 9:22 AM by jaikiran

    Deploying an EJB3 MDB as stopped?

      This is on a JBoss-4.0.4 Patch 1.

      I know that for non EJB3 MDB you can configure the 'DeliveryActive' attribute in MDBConfig (in a user defined invoker configuration) and your MDB will be deployed but not started. Starting it can be done at a later point through JMX.

      I browsed through annotations and source code in EJB3 implementation for MDBs and I could not find anything similar. I know EJB3 is using AOP now and ignoring standardjboss.xml. The org.jboss.ejb3.mdb.MDBConfig class has nothing similar to that either.

      So the question is if there is a way to achive the same functionality in EJB3 as it used to be the case for EJB 2.x?

      Thanks,
      Florian

        • 1. Re: Deploying an EJB3 MDB as stopped?

          I temporarily solved the issue by writing an EJB3 MDB interceptor that blocks the execution until the server up signal is available. While not ideal it works very well.

          It would be nice to have the same feature that is already available for EJB2.x MDBs to the new EJB3 ones though.

          Thanks,
          Florian

          • 2. Re: Deploying an EJB3 MDB as stopped?
            sappenin

            Would you mind posting your code? I could use what you wrote.

            Thanks!

            David

            • 3. Re: Deploying an EJB3 MDB as stopped?
              pbaker01

              Hi,
              I would also like to deploy our MDBs with 'DeliveryActive' (or something equivalent) set to false. But deliveryActive does not seem to work with EJB3.

              How can I deloy an MDB so that the MDB does not start consuming messages at start up?

              Using: JBoss 4.2.3 or JBoss 5.0

              • 4. Re: Deploying an EJB3 MDB as stopped?
                pbaker01

                Hi again, I have continued to research this problem but still have not found a solution.

                JBoss 5.0.0 GA
                JBoss Messaging

                I'll state my problem a different way.
                I have a message producer that can generate upward to 50K messages. I would like to be able to control when the MDBs consume the messages. I would like this control to be performed using JMX or programatically.

                1) There are no operations on the MDB via jmx to stopDelivery().
                So, how do I prevent the MDB from consuming the messages?
                2) Is there a code example of how to stop the MDB (using invoker??) ?

                During this testing cycle I am deploying the application via Eclipse as an exploded archive.

                In jmx the following entries are displayed for: jboss.j2ee

                ear=WAB_EJB.jar,jar=WAB_EJB.jar,service=EJB3
                jar=WAB_EJB.jar,name=AirlineEjbBean,service=EJB3
                jar=WAB_EJB.jar,name=SSMListener,service=EJB3
                jar=WAB_EJB.jar,name=SsimEjbBean,service=EJB3
                jar=WAB_EJB.jar,name=SubscriberEjbBean,service=EJB3
                service=EARClassLoaderDeployer
                service=EARDeployer


                When I select the SSMListener (the MDB), there is only one operation: getTimerService.
                How do I expose stopDelivery()?

                Any help will be GREATLY appreocated.
                Paul - ATL

                • 5. Re: Deploying an EJB3 MDB as stopped?

                  Any idea? I have the exact same problem.

                  • 6. Re: Deploying an EJB3 MDB as stopped?

                    I mean using the standard start/stop methods on the MDB works, but the DeliveryActive attribute doesn't.

                    • 7. Re: Deploying an EJB3 MDB as stopped?
                      jaikiran

                       

                      "chtimi2" wrote:
                      I mean using the standard start/stop methods on the MDB works, but the DeliveryActive attribute doesn't.


                      I answered this in your other post http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4222339#4222339, a few minutes back.