How to set max pool size in MDB on weblogic 10.3

断了今生、忘了曾经 提交于 2019-12-23 12:50:58

问题


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

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