简体   繁体   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

I found solution for creating and editing the bean pool configuration for Jboss version EAP 6.0我找到了为 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.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 https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6/html/Administration_and_Configuration_Guide/Edit_a_Bean_Pool1.html

Worker MDB:工人 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”) })

I need same solution for both Jboss EAP 7.0 and Jboss AS 6.1.0.Final ?我需要为 Jboss EAP 7.0 和 Jboss AS 6.1.0.Final 提供相同的解决方案? [ How To create or edit bean pools, “Create a Bean Pool” and , “Edit a Bean Pool” using the Management Console and the CLI tool for both Jboss EAP 7.0 and Jboss AS 6.1.0.Final ? [如何使用管理控制台和 CLI 工具为 Jboss EAP 7.0 和 Jboss AS 6.1.0.Final 创建或编辑 Bean 池,“创建 Bean 池”和“编辑 Bean 池”? slsb-strict-max-pool mdb-strict-max-pool ] slsb-严格-最大-池 mdb-严格-最大-池]

I found this solution but @pool is annotation based Jboss specific one我找到了这个解决方案,但@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>

Found in Link: http://docs.jboss.org/ejb3/docs/reference/1.0.7/html/SessionBean_and_MDB_configuration.html在链接中找到: http : //docs.jboss.org/ejb3/docs/reference/1.0.7/html/SessionBean_and_MDB_configuration.html

Please suggest Above explained annotation based is this right way to Implement and use strictMaxPool or NOT?请建议以上解释的基于注释的方法是实现和使用strictMaxPool的正确方法还是不?

If it's not Right way then How I can configure the same "strictMaxPool" throught the xml file or configuration Files or annotation based ?如果方法不正确,那么我如何通过 xml 文件或配置文件或基于注释的方式配置相同的“strictMaxPool”?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM