Version 19

    MDB Configuration using the old invoker proxy binding (JMSContainerInvoker)


    Complete and up-to-date details can be found in the dtd






    The delivery to the mdb is handled by the invoker-proxy-binding. Here we consider the JMSContainerInvoker.


    NOTE: A container configuration can have more than one invoker-proxy-binding allowing an

    MDB to make multiple subscriptions.


    NOTE: The spec defined activation config properties are also supported,

    these override the values here.


    Example config (see conf/standardjboss.xml)

            <!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed -->



    • name
      - Used to identify the configuration

    • invoker-mbean
      - Only used in the mbean name for mdbs

    • proxy-factory
      - The implementation class that invokes the mdb container

    • proxy-factory-config
      - XML passed to the proxy factory

      • JMSProviderAdapterJNDI
        - The jndi name of the jms provider see



      • ServerSessionPoolJNDI
        - The name of the



      • CreateJBossMQDestination
        - Whether the destination should be created within JBossMQ if it is not in jndi (true or false - default true)

      • MinimumSize
        - The minimum number of threads that remain active to invoke on the mdb (default 1)

      • MaxmimumSize
        - The maximum number of threads that invoke on the mdb concurrently, and the number of sessions created at deployment (default 15)

      • KeepAliveMillis
        - The time that threads remain active when they are not used (above the minimum) (default 30 seconds)

      • MaxMessages
        - The number of messages to wait for before attempting delivery of the session, each message is still delivered in a separate transaction (default 1)

      • MDBConfig

        • ReconnectIntervalSec
          - The length of time after a connection error occurs before it attempts to reconnect (default 10 seconds)

        • DeliveryActive
          - Whether the MDB should make the subscription at initial deployment or wait for


          on the MBean (true or false - default true)

        • DLQConfig
          - Configuration about the DLQ - remove this to disable the DLQ

          • DestinationQueue
            - The DLQ jndi binding (relative the jndi context provided by the



          • MaxTimesRedelivered
            - The number of redeliveries before the message is sent to the DLQ

          • TimeToLive
            - The time to live of the message sent to the DLQ (default 0 - don't expire the message)

          • DLQUser
            - The user to use when creating the


            to the DLQ

          • DLQPassword
            - The password to use when creating the


            to the DLQ





    The MDB container is basically just a stateless session bean, except that there is no

    proxy bound into jndi. Instead the proxy registers itself as a subscription with JMS.


    Example config (see conf/standardjboss.xml)

          <container-name>Standard Message Driven Bean</container-name>
            <!-- CMT -->
            <interceptor transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT</interceptor>
            <interceptor transaction="Container">org.jboss.ejb.plugins.CallValidationInterceptor</interceptor>
            <interceptor transaction="Container">org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor>
            <!-- BMT -->
            <interceptor transaction="Bean">org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor>
            <interceptor transaction="Bean">org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT</interceptor>
            <interceptor transaction="Bean">org.jboss.ejb.plugins.CallValidationInterceptor</interceptor>



    • See the admin docs for most of this

    • instance-pool
      - The implementation of the pool

    • container-pool-conf
      - Configuration passed to the instance pool

      • MaximumSize
        - The maximum number of instances in the pool, unless the pool is strict, new instances will be created after the maximum is reached but won't be pooled (default 100). To prevent creation of unpooled instances see the strictMaximumSize parameter.

      • strictMaximumSize
        - Boolean flag. Whether the


        should be strict upper limit. If there are more than


        concurrent threads, the excess will block until an instance is free or


        is reached.

      • strictTimeout
        - The length of time in milli-seconds to wait for an instance to become available (returned to the pool) before an exception is thrown (default "forever")


    General Pooling Notes


    In most use cases (common configurations) the delivery server session pool (15 concurrent strictly pooled sessions/threads) throttles the MDB pool (100 instances non strictly pooled) making it irrelevant.




    The deployment is configured in two files.

    • META-INF/ejb-jar.xml

    • META-INF/jboss.xml




    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "">
             <!-- May also be NotSupported -->


    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE jboss PUBLIC
          "-//JBoss//DTD JBOSS 4.0//EN"
             <configuration-name>Standard Message Driven Bean</configuration-name>


    Parameters in jboss.xml jboss/enterprise-beans/message-driven


    • See the ejb spec and admin docs for most of this

    • activation-config
      - override of the activation-config from ejb-jar.xml

    • destination-jndi-name
      - the jndi binding of the destination relative to the



    • local-jndi-name
      - just used to control the MBean name of the MDB

    • mdb-user
      - the user id passed to



    • mdb-passwd
      - the password passed to



    • mdb-client-id
      - the client id passed to the connection (especially important for durable subcriptions that are not pre-configured)

    • mdb-subscription-id
      - the subscription name for durable subscriptions