Pindi
Pindi

Reputation: 23

How to configure pool size of Message Driven Bean

I would like to configure the pool size of a MDB but just one. I deploy my application on JBOSS 6 or Glassfish 3 so the solution must be standard.

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

Can you help me ? thanks.

Upvotes: 2

Views: 3811

Answers (3)

MaDa
MaDa

Reputation: 10762

This is not settable through standard Java EE 6 activation config properties, which are:

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

All others are provider-specific.

Upvotes: 0

Preston
Preston

Reputation: 3271

You'll need a sun-ejb-jar.xm which goes in the META-INF folder.

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>

Upvotes: 1

pdudits
pdudits

Reputation: 916

For glassfish, you can specify bean's max-pool-size to 1 in glassfish-ejb-jar.xml. See deployment guide.

Upvotes: 3

Related Questions