Update of /cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/mdb
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15900/modules/ejb/src/xdoclet/modules/ejb/mdb

Modified Files:
        MdbTagsHandler.java 
Log Message:
Added the activation-config-property tag (XDT-1279)

Index: MdbTagsHandler.java
===================================================================
RCS file: 
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/mdb/MdbTagsHandler.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** MdbTagsHandler.java 14 Aug 2004 19:35:58 -0000      1.11
--- MdbTagsHandler.java 1 Mar 2005 13:19:14 -0000       1.12
***************
*** 153,156 ****
--- 153,208 ----
          return getMessageDrivenClassFor(getCurrentClass());
      }
+ 
+ 
+     /**
+      * Evaluate the body block if the current class has a activation config
+      *
+      * @param template              The body of the block tag
+      * @param attributes
+      * @exception XDocletException
+      * @doc.tag                     type="block"
+      */
+     public void ifHasActivationConfig(String template, Properties attributes) 
throws XDocletException
+     {
+         if (hasActivationConfig()) {
+             generate(template);
+         }
+     }
+ 
+     /**
+      * Returns true if the current class has a activation config
+      *
+      * @return                      <code>true</code> if the current class 
has a activation config
+      * @exception XDocletException
+      */
+     private boolean hasActivationConfig() throws XDocletException
+     {
+         Properties props = new Properties();
+ 
+         props.setProperty("tagName", "ejb.bean");
+         props.setProperty("paramName", "destination-type");
+         if (hasTag(props, FOR_CLASS)) {
+             return true;
+         }
+ 
+         props.setProperty("paramName", "acknowledge-mode");
+         if (hasTag(props, FOR_CLASS)) {
+             return true;
+         }
+ 
+         props.setProperty("paramName", "subscription-durability");
+         if (hasTag(props, FOR_CLASS)) {
+             return true;
+         }
+ 
+         props.setProperty("paramName", "message-selector");
+         if (hasTag(props, FOR_CLASS)) {
+             return true;
+         }
+ 
+         props.setProperty("tagName", "ejb.activation-config-property");
+         props.setProperty("paramName", "");
+         return hasTag(props, FOR_CLASS);
+     }
  }
  



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
xdoclet-devel mailing list
xdoclet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to