简体   繁体   English

如何配置消息驱动Bean的池大小

[英]How to configure pool size of Message Driven Bean

I would like to configure the pool size of a MDB but just one. 我只想配置一个MDB的池大小。 I deploy my application on JBOSS 6 or Glassfish 3 so the solution must be standard. 我将应用程序部署在JBOSS 6或Glassfish 3上,因此该解决方案必须是标准的。

I found for JBOSS maxSession for @ActivationConfigProperty but it is not standard For glassfish i don't find anything to create sun-ejb-jar.xml ... 我为@ActivationConfigProperty找到了JBOSS maxSession,但它不是标准的对于glassfish,我找不到任何创建sun-ejb-jar.xml的东西...

Can you help me ? 你能帮助我吗 ? thanks. 谢谢。

For glassfish, you can specify bean's max-pool-size to 1 in glassfish-ejb-jar.xml. 对于glassfish,可以在glassfish-ejb-jar.xml中将bean的max-pool-size指定为1。 See deployment guide . 请参阅部署指南

You'll need a sun-ejb-jar.xm which goes in the META-INF folder. 您需要一个位于META-INF文件夹中的sun-ejb-jar.xm。

Here's one that you can use / edit. 这是您可以使用/编辑的一个。

<sun-ejb-jar>
    <enterprise-beans>
        <unique-id>0</unique-id>
        <ejb>
            <ejb-name>YOUR EJB NANME</ejb-name>
            <jndi-name>YOUR JNDI NAME</jndi-name>
            <bean-pool>
                <steady-pool-size>1</steady-pool-size>
                <resize-quantity>1</resize-quantity>
                <max-pool-size>3</max-pool-size>
                <pool-idle-timeout-in-seconds>600</pool-idle-timeout-in-seconds>
            </bean-pool>
        </ejb>
    </enterprise-beans>
</sun-ejb-jar>

This is not settable through standard Java EE 6 activation config properties, which are: 这不能通过标准Java EE 6激活配置属性来设置,这些属性是:

  • acknowledgeMode , acknowledgeMode
  • messageSelector , messageSelector
  • subscriptionDurability , subscriptionDurability
  • destinationType . destinationType

All others are provider-specific. 所有其他都是特定于提供程序的。

暂无
暂无

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

相关问题 如何停止将消息传递到消息驱动Bean? - How to stop message delivery to a Message Driven Bean? 如何使用管理控制台和 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 Java 消息驱动 Bean 覆盖 - Java Message Driven Bean Override 如何在JBOSS 7 EJB 3中指定消息驱动Bean依赖关系? - How to specify Message Driven Bean dependencies in JBOSS 7 EJB 3? 将消息驱动的Bean部署到JBoss服务器 - Deploying a Message Driven Bean to JBoss Server 如何将JBoss4消息驱动Bean连接到远程服务器上的主题? - How do I connect a JBoss4 Message Driven Bean to a topic on a remote server? 如何在不对值进行硬编码的情况下为EJB3消息驱动的Bean持久预订指定clientId和subscriptionName? - How do specify clientId and subscriptionName for EJB3 message driven bean durable subscription without hard coding the values? 如何使用ActiveMQ资源适配器修改JBoss EAP 6.4消息驱动Bean的事务超时值? - How to modify the transaction timeout value for a JBoss EAP 6.4 message driven bean using ActiveMQ resource adapter? 消息驱动 bean 不接收来自集群中其他节点的消息 - Message driven bean does not receive message from other nodes in the cluster 正确部署后,Message Driven Bean不使用消息 - Message Driven Bean not consuming message after being deployed correctly
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM