payara / Payara

Payara Server is an open source middleware platform that supports reliable and secure deployments of Java EE (Jakarta EE) and MicroProfile applications in any environment: on premise, in the cloud or hybrid.
http://www.payara.fish
Other
884 stars 306 forks source link

Allow MDB to specify the resource adapter to use in the Activation Config #440

Closed smillidge closed 9 years ago

smillidge commented 9 years ago

Currently in Payara and GlassFish if an MDB wants to use a specific resource adapter it has to be specified in the glassfish-ejb.xml.

Add an ActivationConfigProperty to specify the resource adapter to use.

For example

@MessageDriven(name = "testmdb", activationConfig = {
    @ActivationConfigProperty(propertyName = "destinationLookup", propertyValue = "jms/queue/MY.MAGIC.OUT"),
    @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
    @ActivationConfigProperty(propertyName = "destination", propertyValue = "MY.MAGIC.OUT"),
    @ActivationConfigProperty(propertyName = "resourceAdapter", propertyValue = "activemq-rar-5.12.0")

})
adrianofsp commented 8 years ago

Hi. Do you know how to increase the number of MDB sessions for consumers? I need to increase de number of consumers, but I'm using de activemq as ResourceAdapter and I have only one consumer.

I tried maxSessions but is not allowed with activemq only with HornetMQ Thanks. Best Regards.

smillidge commented 8 years ago

You can add a deployment descriptor like below to your deployment to specify MDB pool size;

<glassfish-ejb-jar>
    <enterprise-beans>
        <ejb>
            <ejb-name>BeanName</ejb-name>
            <bean-pool>
                <steady-pool-size>6</steady-pool-size>
                <resize-quantity>1</resize-quantity>
                <max-pool-size>6</max-pool-size>
            </bean-pool>
        </ejb>
    </enterprise-beans>
</glassfish-ejb-jar>
adrianofsp commented 8 years ago

Unfortunately I'm using jboss eap 6.2 I'll check the jboss docs. Thanks! Em 1 de fev de 2016 7:43 PM, "Steve Millidge" notifications@github.com escreveu:

You can add a deployment descriptor like below to your deployment to specify MDB pool size;

BeanName 6 1 6

— Reply to this email directly or view it on GitHub https://github.com/payara/Payara/issues/440#issuecomment-178207489.