2016-07-28 9 views
1

wildfly10のstandalone-full.xmlに次の設定があります。wildfly 10を使用してejb mdb(メッセージ駆動型Bean)インスタンスを制限する方法standalone-full.xml

<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> 

私たちは、10として、最大プールサイズを設定しているが、インスタンスの数は、サーバの間に作成されたばかりのスタンドアロン・full.xml pool.In交換メッセージとリンクされている次のメッセージ駆動型Beanを持っていますスタートアップは30ですが、どこから来ているのか分かりません。私たちはこれを何らかの方法で制限できます。このBeanにアクセスする同時スレッドの数をスタンドアロンフルファイルで制限する方法があれば。あなたが@ResourceAdapterを指定しない場合

@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 
{ 
... 
} 
+0

[静的コンテンツ(画像など)を配信するためのWildflyの設定方法](http://stackoverflow.com/questions/22684037/how-to-configure-wildfly-to-serve-static-content- like-images) –

+0

あなたはそれを行う方法を考え出しましたか?私は[このスレッドでも同様のシナリオでそれを試しています(http://stackoverflow.com/q/40806160/3231778) – BonanzaOne

答えて

0

は、それが「ActiveMQの-RA」(私は15であると思う)そのデフォルト値を独自のデフォルトを持っており、いずれかの使用で命名デフォルトのプールされた接続工場を使用しています指定したプールへの追加、またはその両方を行います。 maxSessions = "n"でMDBに注釈を付けると、並列インスタンスの数がnに制限されます。

関連する問題