问题
I need to set the max pool size on a MDB on weblogic 10.3.
I inserted this annotation on MDB directly
@ActivationConfigProperty(propertyName="MaxPoolSize", propertyValue="1")})
but it seems not to work.
Is there any other option to set?
回答1:
Try using weblogic work manager settings to constrain the number of concurrent threads. The max-threads-constraint can be applied to a work manager set up for the specific MDB (or as part of a pool if you apply it to more than one bean)
so, for instance in weblogic-application.xml you'd have
<wls:work-manager>
<wls:name>MyMDBWorkManager</wls:name>
<wls:max-threads-constraint-name>MyMDBMaxThreads</wls:max-threads-constraint-name>
</wls:work-manager>
and applied to the beans in weblogic-ejb-jar.xml like so: (this works even when the 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' constraint can be specified in weblogic-application.xml, or directly in the WL Admin Console so it can be tuned on the fly.
来源:https://stackoverflow.com/questions/8939292/how-to-set-max-pool-size-in-mdb-on-weblogic-10-3