|
From: Vance K. <va...@us...> - 2007-02-18 10:40:43
|
User: vancek
Date: 07/02/18 02:40:43
Modified: andromda-ejb3/src/main/resources/META-INF/andromda
namespace.xml metafacades.xml
andromda-ejb3/src/test/uml EJB3CartridgeTestModel.xml.zip
andromda-ejb3/src/test/expected cartridge-output.zip
andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades
EJB3MessageDrivenFacadeLogicImpl.java
Log:
fix default subscription durability for topics - set as NonDurable
Revision Changes Path
1.37 +11 -0 cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/namespace.xml
Index: namespace.xml
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/namespace.xml,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -w -r1.36 -r1.37
--- namespace.xml 13 Feb 2007 02:41:40 -0000 1.36
+++ namespace.xml 18 Feb 2007 10:40:41 -0000 1.37
@@ -677,6 +677,17 @@
</ul>
</documentation>
</property>
+ <property name="messageDrivenTopicSubscriptionDurability">
+ <default>NonDurable</default>
+ <documentation>
+ The default topic subscription durability.
+ Possible values are:
+ <ul>
+ <li>Durable</li>
+ <li>NonDurable</li>
+ </ul>
+ </documentation>
+ </property>
</propertyGroup>
<propertyGroup name="Entity Properties">
<property name="entityViewType">
1.31 +1 -0 cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/metafacades.xml
Index: metafacades.xml
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/metafacades.xml,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -w -r1.30 -r1.31
--- metafacades.xml 17 Feb 2007 14:09:08 -0000 1.30
+++ metafacades.xml 18 Feb 2007 10:40:41 -0000 1.31
@@ -223,6 +223,7 @@
<property reference="messageDrivenImplementationNamePattern"/>
<property reference="messageDrivenListenerNamePattern"/>
<property reference="messageDrivenDestinationType"/>
+ <property reference="messageDrivenTopicSubscriptionDurability"/>
<property reference="messageDrivenTestNamePattern"/>
<property reference="messageDrivenTestPackageNamePattern"/>
</metafacade>
1.5 +264 -262 cartridges/andromda-ejb3/src/test/uml/EJB3CartridgeTestModel.xml.zip
<<Binary file>>
1.6 +463 -452 cartridges/andromda-ejb3/src/test/expected/cartridge-output.zip
<<Binary file>>
1.13 +17 -6 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3MessageDrivenFacadeLogicImpl.java
Index: EJB3MessageDrivenFacadeLogicImpl.java
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3MessageDrivenFacadeLogicImpl.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -w -r1.12 -r1.13
--- EJB3MessageDrivenFacadeLogicImpl.java 11 Feb 2007 14:06:37 -0000 1.12
+++ EJB3MessageDrivenFacadeLogicImpl.java 18 Feb 2007 10:40:43 -0000 1.13
@@ -31,7 +31,13 @@
/**
* The property which stores the default destination type
*/
- public static final String MDB_DESTINATION_TYPE = "messageDrivenDestinationType";
+ public static final String MESSAGE_DRIVEN_DESTINATION_TYPE = "messageDrivenDestinationType";
+
+ /**
+ * The property which stores the default subscription durability for a Topic
+ */
+ public static final String MESSAGE_DRIVEN_TOPIC_SUBSCRIPTION_DURABILITY =
+ "messageDrivenTopicSubscriptionDurability";
/**
* The property which stores the pattern defining the JMS message driven bean name.
@@ -97,7 +103,7 @@
String destinationType = (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_EJB_MDB_DESTINATION_TYPE);
if (StringUtils.isBlank(destinationType))
{
- destinationType = (String)this.getConfiguredProperty(MDB_DESTINATION_TYPE);
+ destinationType = (String)this.getConfiguredProperty(MESSAGE_DRIVEN_DESTINATION_TYPE);
}
/**
@@ -262,12 +268,17 @@
*/
protected java.lang.String handleGetSubscriptionDurability()
{
- String durability = null;
- if (StringUtils.equalsIgnoreCase(getDestinationType(), EJB3Globals.MDB_DESTINATION_TYPE_TOPIC))
+ String subscriptionDurability = null;
+ if (this.isDestinationTypeTopic())
{
- durability = (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_EJB_MDB_DURABILITY);
+ subscriptionDurability = String.valueOf(
+ this.getConfiguredProperty(MESSAGE_DRIVEN_TOPIC_SUBSCRIPTION_DURABILITY));
+ if (this.findTaggedValue(EJB3Profile.TAGGEDVALUE_EJB_MDB_DURABILITY) != null)
+ {
+ subscriptionDurability = (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_EJB_MDB_DURABILITY);
+ }
}
- return durability;
+ return subscriptionDurability;
}
/**
|