Try using the weblogic work manager settings to limit the number of simultaneous threads. The max-threads constraint can be applied to a work manager configured for a specific MDB (or as part of a pool if you apply it to multiple beans)
so for example in weblogic-application.xml you will have
<wls:work-manager> <wls:name>MyMDBWorkManager</wls:name> <wls:max-threads-constraint-name>MyMDBMaxThreads</wls:max-threads-constraint-name> </wls:work-manager>
and applies to beans in weblogic-ejb-jar.xml like this: (this works even when MDB is annotated)
<wls:weblogic-enterprise-bean> <wls:ejb-name>MyMDB</wls:ejb-name> <wls:dispatch-policy>MyMDBWorkManager</wls:dispatch-policy> </wls:weblogic-enterprise-bean>
The MyMDBMaxThreads restriction can be specified in weblogic-application.xml or directly in the WL admin console so that it can be configured on the fly.
source share