java ee - How to restrict the ejb mdb(messsage driven beans) instances via wildfly 10 standalone-full.xml -


we have following configuration in standalone-full.xml of wildfly10.

 <subsystem xmlns="urn:jboss:domain:ejb3:4.0">             <session-bean>                 <stateless>                     <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>                 </stateless>                 <stateful default-access-timeout="5000" cache-ref="simple" passivation-disabled-cache-ref="simple"/>                 <singleton default-access-timeout="5000"/>             </session-bean>             <mdb>                 <resource-adapter-ref resource-adapter-name="${ejb.resource-adapter-name:activemq-ra.rar}"/>                 <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>             </mdb>             <pools>                 <bean-instance-pools>                     <strict-max-pool name="slsb-strict-max-pool" derive-size="from-worker-pools" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="minutes"/>                     <strict-max-pool name="mdb-strict-max-pool" derive-size="from-cpu-count" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="minutes"/>                     <strict-max-pool name="exchangemessagepool" max-pool-size="10" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="minutes"/>                     </bean-instance-pools>             </pools>             </subsystem> 

we have following message driven bean linked exchange message pool.in standalone-full.xml have set max-pool-size 10 number of instances getting created during server startup 30 don't know coming from.is there way can restrict this.if there way restrict number of concurrent threads accessing bean in standalone-full file.

@messagedriven(name = "exchangemessage", activationconfig = {@activationconfigproperty(propertyname = "destinationtype", propertyvalue = "javax.jms.queue"), @activationconfigproperty(propertyname = "destination", propertyvalue = "jms/queue/exchangemessagequeue")}) @permitall @pool("exchangemessagepool") @transactionattribute(transactionattributetype.not_supported) @transactionmanagement(transactionmanagementtype.container) public class exchangemessagebean implements messagelistener { ... } 

if don't specify @resourceadapter uses default pooled-connection-factory named "activemq-ra" has own default , either uses default (which think is 15) in addition specified pool, or both. can annotate mdb maxsessions="n" , limit number of parallel instances n.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -