[jboss-dev-forums] [Design of EJB 3.0] - Re: EJBTHREE-1670 - Quartz scheduler integration failing on
jaikiran
do-not-reply at jboss.com
Mon Jan 19 01:57:22 EST 2009
The JCA 1.5 spec says:
anonymous wrote : B.2.1 JMS ActivationSpec JavaBean Properties
| The following is a description of the recommended set of JMS ActivationSpec
| JavaBean properties:
|
|
| B.2.1.5 subscriptionDurability
| This property applies only to endpoints (message-driven beans) that receive
| messages published to a JMS Topic. ....
| ....
| Specifying a value for the subscriptionDurability property on the ActivationSpec
| JavaBean is optional. If no value is specified, NonDurable is assumed.
|
So i guess, the default value should be set by the JMS activation spec (which is already being done - see below) instead of the JBossMessageDrivenBeanMetadata. The JMS activation spec already handles defaulting the value to NonDurable:
package org.jboss.resource.adapter.jms.inflow;
| ...
| public class JmsActivationSpec implements ActivationSpec
| {
|
| ...
| /** The subscription durability */
| private boolean subscriptionDurability;
| ...
| /**
| * @return the subscriptionDurability.
| */
| public String getSubscriptionDurability()
| {
| if (subscriptionDurability)
| return "Durable";
| else
| return "NonDurable";
| }
|
| /**
| * @param subscriptionDurability The subscriptionDurability to set.
| */
| public void setSubscriptionDurability(String subscriptionDurability)
| {
| this.subscriptionDurability = "Durable".equals(subscriptionDurability);
| }
| ...
| }
|
So to fix this issue, we have to just remove the default value setting in the JBossMessageDrivenBeanMetadata and MessageDrivenBeanMetadata:
Index: jboss/JBossMessageDrivenBeanMetaData.java
| ===================================================================
| --- jboss/JBossMessageDrivenBeanMetaData.java (revision 82794)
| +++ jboss/JBossMessageDrivenBeanMetaData.java (working copy)
| @@ -76,7 +76,7 @@
| private String acknowledgeMode;
|
| /** The subscription durability */
| - private SubscriptionDurability subscriptionDurability = SubscriptionDurability.NonDurable;
| + private SubscriptionDurability subscriptionDurability;
|
| /** The destination jndi name */
| private String destinationJndiName;
| Index: spec/MessageDrivenBeanMetaData.java
| ===================================================================
| --- spec/MessageDrivenBeanMetaData.java (revision 82794)
| +++ spec/MessageDrivenBeanMetaData.java (working copy)
| @@ -75,7 +75,7 @@
| private String acknowledgeMode;
|
| /** The subscription durability */
| - private SubscriptionDurability subscriptionDurability = SubscriptionDurability.NonDurable;
| + private SubscriptionDurability subscriptionDurability;
|
| /**
| * Create a new MessageDrivenBeanMetaData.
|
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4202742#4202742
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4202742
More information about the jboss-dev-forums
mailing list