| 
      
      
      From: Vance K. <va...@us...> - 2007-04-25 03:47:53
      
     | 
|   User: vancek  
  Date: 07/04/24 20:47:54
  Modified:    andromda-ejb3/src/site changes.xml
               andromda-ejb3/src/main/resources/templates/ejb3/config/jboss
                        jboss.xml.vsl
               andromda-ejb3/src/main/uml EJB3MetafacadeModel.xml.zip
               andromda-ejb3/src/main/resources/META-INF/andromda
                        metafacades.xml namespace.xml
               andromda-ejb3/src/main/resources/templates/ejb3/config
                        ejb-jar.xml.vsl
               andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3
                        EJB3Globals.java
               andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades
                        EJB3MessageDrivenFacadeLogicImpl.java
  Log:
  fix issues with outdated jboss mdb setting.  remove minPoolSize, renamed maxPoolSize to maxSession, renamed durability to subscriptionDurability and added mdb-subscription-id to jboss.xml for durable topics
  
  Revision  Changes    Path
  1.14      +7 -1      cartridges/andromda-ejb3/src/site/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/changes.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -w -r1.13 -r1.14
  --- changes.xml	16 Apr 2007 14:09:48 -0000	1.13
  +++ changes.xml	25 Apr 2007 03:47:49 -0000	1.14
  @@ -429,7 +429,7 @@
           Add interceptors definition to ejb-jar.xml for the SeamInterceptor.
         </action>
         <action dev="vancek" type="update">
  -        By default, if a Seam component does not have it's scopte type specified, then the default stateless
  +        By default, if a Seam component does not have it's scope type specified, then the default stateless
           scope type is assigned to stateless session beans and a conversation scope type is specified for all
           other types of beans.
         </action>
  @@ -440,6 +440,12 @@
         <action dev="vancek" type="fix">
           Fix URLs in howto6.xml for referencing main AndroMDA project.
         </action>
  +      <action dev="vancek" due-to="Obfuscator" type="update">
  +        Update the cartridge to reflect the changes for MDB in JBoss 4.0.5.GA.  These changes include rename of
  +        activation config from durability to subscriptionDurability, the addition of mdb-subscription-id in jboss.xml
  +        when a topic is durable, removal of minPoolSize activation config and rename of maxPoolSize to maxSession
  +        activation config.  Reference http://galaxy.andromda.org/forum/viewtopic.php?p=21537#21537.
  +      </action>
       </release>
     </body>
   </document>
  \ No newline at end of file
  
  
  
  1.5       +3 -0      cartridges/andromda-ejb3/src/main/resources/templates/ejb3/config/jboss/jboss.xml.vsl
  
  Index: jboss.xml.vsl
  ===================================================================
  RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/config/jboss/jboss.xml.vsl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -r1.4 -r1.5
  --- jboss.xml.vsl	3 Jun 2006 15:36:48 -0000	1.4
  +++ jboss.xml.vsl	25 Apr 2007 03:47:49 -0000	1.5
  @@ -48,6 +48,9 @@
           <message-driven>
               <ejb-name>${mdb.messageDrivenName}</ejb-name>
               <destination-jndi-name>${mdb.destination}</destination-jndi-name>
  +#**##if ($mdb.subscriptionDurable)
  +            <mdb-subscription-id>${mdb.durableSubscriptionId}</mdb-subscription-id>
  +#**##end
           </message-driven>
           
   #end
  
  
  
  1.54      +255 -285  cartridges/andromda-ejb3/src/main/uml/EJB3MetafacadeModel.xml.zip
  
  	<<Binary file>>
  
  
  1.33      +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.32
  retrieving revision 1.33
  diff -u -w -r1.32 -r1.33
  --- metafacades.xml	16 Apr 2007 14:09:43 -0000	1.32
  +++ metafacades.xml	25 Apr 2007 03:47:50 -0000	1.33
  @@ -227,6 +227,7 @@
           <property reference="messageDrivenTopicSubscriptionDurability"/>
           <property reference="messageDrivenTestNamePattern"/>
           <property reference="messageDrivenTestPackageNamePattern"/>
  +        <property reference="messageDrivenDurableSubscriptionIdPattern"/>
   	</metafacade>
   	<metafacade class="org.andromda.cartridges.ejb3.metafacades.EJB3MessageDrivenOperationFacadeLogicImpl">
   		<mapping>
  
  
  
  1.39      +7 -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.38
  retrieving revision 1.39
  diff -u -w -r1.38 -r1.39
  --- namespace.xml	16 Apr 2007 14:09:43 -0000	1.38
  +++ namespace.xml	25 Apr 2007 03:47:50 -0000	1.39
  @@ -585,6 +585,13 @@
                       the message driven bean test class.
                   </documentation>
               </property>
  +            <property name="messageDrivenDurableSubscriptionIdPattern">
  +                <default>{0}SubscriptionId</default>
  +                <documentation>
  +                    The pattern to use when constructing the durable subscription
  +                    ID for a MDB.  Only use for topics with durable subscription.
  +                </documentation>
  +            </property>
   			<property name="interceptorNamePattern">
   			    <default>{0}</default>
   			    <documentation>
  
  
  
  1.10      +4 -2      cartridges/andromda-ejb3/src/main/resources/templates/ejb3/config/ejb-jar.xml.vsl
  
  Index: ejb-jar.xml.vsl
  ===================================================================
  RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/config/ejb-jar.xml.vsl,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -w -r1.9 -r1.10
  --- ejb-jar.xml.vsl	16 Apr 2007 14:09:42 -0000	1.9
  +++ ejb-jar.xml.vsl	25 Apr 2007 03:47:50 -0000	1.10
  @@ -107,19 +107,21 @@
   #*  *##end
   #*  *##if ($mdb.destinationTypeTopic)
                   <activation-config-property>
  -                    <activation-config-property-name>durability</activation-config-property-name>
  +                    <activation-config-property-name>subscriptionDurability</activation-config-property-name>
                       <activation-config-property-value>${mdb.subscriptionDurability}</activation-config-property-value>
                   </activation-config-property>
   #*  *##end
   #*  *##if ($mdb.minimumPoolSize > 0)
  +                <!-- Not available in JBoss 4.0.5+
                   <activation-config-property>
                       <activation-config-property-name>minPoolSize</activation-config-property-name>
                       <activation-config-property-value>${mdb.minimumPoolSize}</activation-config-property-value>
                   </activation-config-property>
  +                -->
   #*  *##end
   #*  *##if ($mdb.maximumPoolSize > 0)
                   <activation-config-property>
  -                    <activation-config-property-name>maxPoolSize</activation-config-property-name>
  +                    <activation-config-property-name>maxSession</activation-config-property-name>
                       <activation-config-property-value>${mdb.maximumPoolSize}</activation-config-property-value>
                   </activation-config-property>
   #*  *##end
  
  
  
  1.15      +10 -0     cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/EJB3Globals.java
  
  Index: EJB3Globals.java
  ===================================================================
  RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/EJB3Globals.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -w -r1.14 -r1.15
  --- EJB3Globals.java	10 Jul 2006 05:39:26 -0000	1.14
  +++ EJB3Globals.java	25 Apr 2007 03:47:51 -0000	1.15
  @@ -229,6 +229,16 @@
       public static final String MDB_DESTINATION_TYPE_QUEUE = "javax.jms.Queue";
       
       /**
  +     * Represents the durable subscription topic
  +     */
  +    public static final String MDB_SUBSCRIPTION_DURABLE = "Durable";
  +    
  +    /**
  +     * Represents the non durable subscription topic
  +     */
  +    public static final String MDB_SUBSCRIPTION_NONDURABLE = "NonDurable";
  +    
  +    /**
        * The namespace delimiter (seperates namespaces).
        */
       public static final char NAMESPACE_DELIMITER = '.';
  
  
  
  1.14      +37 -0     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.13
  retrieving revision 1.14
  diff -u -w -r1.13 -r1.14
  --- EJB3MessageDrivenFacadeLogicImpl.java	18 Feb 2007 10:40:43 -0000	1.13
  +++ EJB3MessageDrivenFacadeLogicImpl.java	25 Apr 2007 03:47:51 -0000	1.14
  @@ -64,6 +64,12 @@
        */
       private static final String MESSAGE_DRIVEN_TEST_PACKAGE_NAME_PATTERN = "messageDrivenTestPackageNamePattern";
       
  +    /**
  +     * The property which stores the pattern defining the JMS durable subscription ID
  +     */
  +    private static final String MESSAGE_DRIVEN_DURABLE_SUBSCRIPTION_ID_PATTERN = 
  +        "messageDrivenDurableSubscriptionIdPattern";
  +    
       //  ---------------- constructor -------------------------------
       
       public EJB3MessageDrivenFacadeLogicImpl (Object metaObject, String context)
  @@ -282,6 +288,37 @@
       }
   
       /**
  +     * @see org.andromda.cartridges.ejb3.metafacades.EJB3MessageDrivenFacadeLogic#handleIsSubscriptionDurable()
  +     */
  +    protected boolean handleIsSubscriptionDurable()
  +    {
  +        return StringUtils.equalsIgnoreCase(this.getSubscriptionDurability(), EJB3Globals.MDB_SUBSCRIPTION_DURABLE) ? 
  +                true : false;
  +    }
  +
  +    /**
  +     * @see org.andromda.cartridges.ejb3.metafacades.EJB3MessageDrivenFacadeLogic#handleIsSubscriptionNonDurable()
  +     */
  +    protected boolean handleIsSubscriptionNonDurable()
  +    {
  +        return StringUtils.equalsIgnoreCase(this.getSubscriptionDurability(), EJB3Globals.MDB_SUBSCRIPTION_NONDURABLE) ? 
  +                true : false;
  +    }
  +
  +    /**
  +     * @see org.andromda.cartridges.ejb3.metafacades.EJB3MessageDrivenFacadeLogic#handleGetDurableSubscriptionId()
  +     */
  +    protected String handleGetDurableSubscriptionId()
  +    {
  +        String durableSubscriptionIdPattern = 
  +            (String)this.getConfiguredProperty(MESSAGE_DRIVEN_DURABLE_SUBSCRIPTION_ID_PATTERN);
  +
  +        return MessageFormat.format(
  +                durableSubscriptionIdPattern,
  +                new Object[] {StringUtils.trimToEmpty(this.getName())});
  +    }
  +    
  +    /**
        * @see org.andromda.cartridges.ejb3.metafacades.EJB3MessageDrivenFacade#getTransactionManagement()
        */
       protected java.lang.String handleGetTransactionManagement()
  
  
  
 |