How does the MDB instance picked from a particular container pool?

佐手、 提交于 2019-12-24 23:42:58

问题


I'm wondering how the MDB instance is re-used from a particular container pool.In standardjboss.xml, the standard MDB container pool is configured. In jboss-container.xml ther are two MDB specific container-pool configuration that extends the standard MDB configuration.

There is no where in the source I could see certain MDBs are associated with a particular pool. I want to know how the few MDB instances are re-used from a particual pool and other MDB instance is used from an other MDB pool.

In standardjboss.xml, there standard MDB configuration is set.

<container-configuration>
          <container-name>Standard Message Driven Bean</container-name>
          <call-logging>false</call-logging>
          <invoker-proxy-binding-name>message-driven-bean</invoker-proxy-binding-name>
          <container-interceptors>
            <interceptor>org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor</interceptor>
            <interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
            <interceptor>org.jboss.ejb.plugins.RunAsSecurityInterceptor</interceptor>
            <!-- 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>
            <interceptor>org.jboss.resource.connectionmanager.CachedConnectionInterceptor</interceptor>
          </container-interceptors>
          <instance-pool>org.jboss.ejb.plugins.MessageDrivenInstancePool</instance-pool>
          <instance-cache></instance-cache>
          <persistence-manager></persistence-manager>
          <container-pool-conf>
            <MaximumSize>100</MaximumSize>
          </container-pool-conf>
        </container-configuration>

jboss-container.xml:

<container-configuration extends="Standard Message Driven Bean">
    <container-name>high performance</container-name>
    <container-pool-conf>
    <MaximumSize>5000</MaximumSize>
    </container-pool-conf>
</container-configuration>

<container-configuration extends="Standard Message Driven Bean">
    <container-name>Synchronized MDB</container-name>
    <container-pool-conf>
    <MaximumSize>1</MaximumSize>
    <strictMaximumSize>true</strictMaximumSize>
    </container-pool-conf>
</container-configuration>

So, it is clear that there are two MDB specific pools, how it is mapped with he MDB? That is which MDB instance will be allowed to be create "high performance" and which MDB instances will be restricted to single instance?

Help highly appreciated as I have spend some time figuring this out. Thank you!

来源:https://stackoverflow.com/questions/57182052/how-does-the-mdb-instance-picked-from-a-particular-container-pool

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!