1 Reply Latest reply on Jul 22, 2003 7:08 PM by adrian.brock

    Stopped/Deactivated MDB On Startup

      Hi,

      on startup of JBoss I want my MDB to be in a stopped / deactivated state (and activated later by another bean). How can I achieve this?

      Thanks,
      Frank

        • 1. Re: Stopped/Deactivated MDB On Startup

          I just committed support for this, it will be available
          in 3.2.2RC2

          Something like the following in jboss.xml will cause
          the MDB to not receive messages at startup.

          <?xml version="1.0" encoding="utf-8"?>
          <!DOCTYPE jboss PUBLIC
          "-//JBoss//DTD JBOSS 3.2//EN"
          "http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd">

          <invoker-proxy-bindings>
          <invoker-proxy-binding>
          my-message-driven-bean
          <invoker-mbean>default</invoker-mbean>
          <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
          <proxy-factory-config>
          DefaultJMSProvider
          StdJMSPool
          15
          1

          10
          false <!-- !!! HERE !!! -->

          queue/DLQ
          10
          0


          </proxy-factory-config>
          </invoker-proxy-binding>
          </invoker-proxy-bindings>

          <enterprise-beans>
          <message-driven>
          <ejb-name>ObjectMessageBean</ejb-name>
          <configuration-name>Standard Message Driven Bean</configuration-name>
          <destination-jndi-name>queue/testObjectMessage</destination-jndi-name>
          <invoker-bindings>

          <invoker-proxy-binding-name>my-message-driven-bean</invoker-proxy-binding-name>

          </invoker-bindings>
          </message-driven>

          etc.

          I've exposed the JMSContainer invoker as an MBean
          jboss.j2ee:binding=my-message-driven-bean,type=invoker,service=EJB,jndiName=whatver
          which now has startDelivery/stopDelivery operations.

          Regards,
          Adrian