簡體   English   中英

如何使用管理控制台和 Jboss 的 CLI 工具為會話和消息驅動的 Bean 配置 Bean 池

[英]How to Configure Bean Pools for Session and Message-Driven Beans using the Management Console and the CLI tool for Jboss

我找到了為 Jboss 版本 EAP 6.0 創建和編輯 bean 池配置的解決方案

https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.1/html/Administration_and_Configuration_Guide/Create_a_Bean_Pool1.html

https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6/html/Administration_and_Configuration_Guide/Edit_a_Bean_Pool1.html

工人 MDB:

@MessageDriven(activationConfig = { @ActivationConfigProperty(prop ertyName="destinationType" , propertyValue="javax.jms.Queue"), @ActivationConfigProperty(propertyName="destination" , propertyValue="queue/replenish") @ActivationConfigProperty(prop ertyName=”minSessions” , propertyValue=”25”) @ActivationConfigProperty(prop ertyName=”maxSessions” , propertyValue=”50”) })

我需要為 Jboss EAP 7.0 和 Jboss AS 6.1.0.Final 提供相同的解決方案? [如何使用管理控制台和 CLI 工具為 Jboss EAP 7.0 和 Jboss AS 6.1.0.Final 創建或編輯 Bean 池,“創建 Bean 池”和“編輯 Bean 池”? slsb-嚴格-最大-池 mdb-嚴格-最大-池]

我找到了這個解決方案,但@pool 是基於注釋的 Jboss 特定的

import org.jboss.ejb3.annotation.Pool;
import org.jboss.ejb3.annotation.defaults.PoolDefaults;
@Stateless
@Pool (value=PoolDefaults.POOL_IMPLEMENTATION_STRICTMAX,maxSize=5,timeout=1000)
@Remote(StrictlyPooledSession.class)
public class StrictlyPooledSessionBean implements StrictlyPooledSession
{
...
}


XML:
<?xml version="1.0" encoding="UTF-8"?>
<aop xmlns="urn:jboss:aop-beans:1.0">

   <domain name="Strictly Pooled Stateless Bean" extends="Stateless Bean" inheritBindings="true">
      <annotation expr="!class(@org.jboss.ejb3.annotation.Pool)">
          @org.jboss.ejb3.annotation.Pool (value="StrictMaxPool", maxSize=5, timeout=10000)
      </annotation>
   </domain>

   <domain name="Strictly Pooled Message Driven Bean" extends="Message Driven Bean" inheritBindings="true">
      <annotation expr="!class(@org.jboss.ejb3.annotation.Pool)">
          @org.jboss.ejb3.annotation.Pool (value="StrictMaxPool", maxSize=5, timeout=10000)
      </annotation>
   </domain>
</aop>

在鏈接中找到: http : //docs.jboss.org/ejb3/docs/reference/1.0.7/html/SessionBean_and_MDB_configuration.html

請建議以上解釋的基於注釋的方法是實現和使用strictMaxPool的正確方法還是不?

如果方法不正確,那么我如何通過 xml 文件或配置文件或基於注釋的方式配置相同的“strictMaxPool”?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM