How to set max pool size in MDB on weblogic 10.3

I need to set the maximum pool size on MDB on weblogic 10.3.

I pasted this annotation directly on MDB

@ActivationConfigProperty(propertyName="MaxPoolSize", propertyValue="1")}) 

but it does not seem to work.

Is there any other installation option?

+4
source share
1 answer

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.

+7
source

Source: https://habr.com/ru/post/1392006/


All Articles