Paulo Cesar Reis wrote:
> Hi Nigel,
>
> Thanks for your help :)
>
> I've executed the command on imq broker and for my surprise it says that no
> durable subscription were found. I'm using the follow activation property on
> my MDB's:
> MessageDriven(name="xyz", mappedName="jms/xyz", activationConfig=
> {
> @ActivationConfigProperty(
> propertyName="Durability",
> propertyValue="Durable")
> }
> )
It's subscriptionDurability, not Durability. I would expect that setting a property Durability would cause a warning in
the Glassfish server log then the server is started. This is what I get when I try it (with GF 2.1.1):
RAR8000 : The method setDurability is not present in the class : com.sun.messaging.jms.ra.ActivationSpec
RAR7097: No setter method present for the property Durability in the class com.sun.messaging.jms.ra.ActivationSpec
The "activation spec" config properties are documented at
http://docs.sun.com/app/docs/doc/820-6740/6ni21mjpk?l=en&a=view
Here's an example that ought to work. Note that you *must* set all three.
@MessageDriven(mappedName = "jms/inboundTopic", activationConfig = {
@ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue = "Durable"),
@ActivationConfigProperty(propertyName = "subscriptionName", propertyValue = "mySubName"),
@ActivationConfigProperty(propertyName = "clientId", propertyValue = "myClientName")
})
Nigel