5 Replies Latest reply on Feb 28, 2008 10:01 AM by Adrian Brock

    configure MDB instances w/ JBOSS 4.2.2

    hhel cepa Newbie


      I am using JBOSS 4.2.2 and EJB 3.0
      I have a single queue and I would like to configure the number of MDB instances which will consume messages from that queue.
      I have read quite a few post regarding this issue, but I wasn't able to properly configure the number of MDBS appart from the EJB 3.0 annotation. All the time, I get 15 MDBs instances created!

      Here is what I did:

      1. modify deploy/ejb3-interceptors-aop.xml
      ==> in , I tried changing @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.StrictMaxPool.class, maxSize=100, timeout=10000)
      this does not work

      2. modify conf/standardjboss.xml
      ==> invoker-proxy-binding/message-driven-bean
      I changed the MinimumSize and MaximumSize
      This does not work either

      3. modify jboss.xml in my ear
      ==> I added my own invoker-proxy-binding and linked my MDB to it. the jboss.xml looks like:

      <invoker-mbean>default</invoker-mbean> <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
      <proxy-factory-config> DefaultJMSProvider StdJMSPool
      <configuration-name>Standard Message Driven Bean</configuration-name>



      This does not work either: I still have 15 MDBs created!

      4. add EJB3.0 annotation in MDB:
      @MessageDriven(name="JMSAdapter", activationConfig = {
      @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
      @ActivationConfigProperty(propertyName="destination", propertyValue="queue/bulkCommandsQueueFile"),
      @ActivationConfigProperty(propertyName = "maxSession", propertyValue = "100"),
      @ActivationConfigProperty(propertyName = "minSession", propertyValue = "100")

      This works fine, but I would like to control the number of mdbs through JBOSS configuration and not via code.

      Could you guys tell me what I did wrong here?