aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mahrw...@apache.org
Subject svn commit: r1073016 - /aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/TxElementHandler.java
Date Mon, 21 Feb 2011 15:24:05 GMT
Author: mahrwald
Date: Mon Feb 21 15:24:03 2011
New Revision: 1073016

URL: http://svn.apache.org/viewvc?rev=1073016&view=rev
Log:
ARIES-578: Fix failure in sample tests around handling dry parse invocation of tx namespace
handler

Modified:
    aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/TxElementHandler.java

Modified: aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/TxElementHandler.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/TxElementHandler.java?rev=1073016&r1=1073015&r2=1073016&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/TxElementHandler.java
(original)
+++ aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/TxElementHandler.java
Mon Feb 21 15:24:03 2011
@@ -68,32 +68,34 @@ public class TxElementHandler implements
                 LOGGER.debug("parser adding interceptor for " + elt);
 
             ComponentDefinitionRegistry cdr = pc.getComponentDefinitionRegistry();
-            
-            if (cm == null) {
-                // if the enclosing component is null, then we assume this is the top element
                
-                
-                String bean = elt.getAttribute(Constants.BEAN);
-                registerComponentsWithInterceptor(cdr, bean);
-
-                metaDataHelper.populateBundleWideTransactionData(pc.getComponentDefinitionRegistry(),

-                        elt.getAttribute(Constants.VALUE), elt.getAttribute(Constants.METHOD),
bean);
-            } else {
-                cdr.registerInterceptorWithComponent(cm, interceptor);
-                if (LOGGER.isDebugEnabled())
-                    LOGGER.debug("parser setting comp trans data for " + elt.getAttribute(Constants.VALUE)
+ "  "
-                            + elt.getAttribute(Constants.METHOD));
-    
-                metaDataHelper.setComponentTransactionData(cdr, cm, elt.getAttribute(Constants.VALUE),
elt
-                        .getAttribute(Constants.METHOD));
-            }
-            
             ComponentMetadata meta = cdr.getComponentDefinition("blueprintBundle");
             Bundle blueprintBundle = null;
             if (meta instanceof PassThroughMetadata) {
                 blueprintBundle = (Bundle) ((PassThroughMetadata) meta).getObject();
             }
 
-            registered.put(cdr, blueprintBundle);
+            // don't register components if we have no bundle (= dry parse)
+            if (blueprintBundle != null) {
+              registered.put(cdr, blueprintBundle);
+              
+              if (cm == null) {
+                  // if the enclosing component is null, then we assume this is the top element
                
+                  
+                  String bean = elt.getAttribute(Constants.BEAN);
+                  registerComponentsWithInterceptor(cdr, bean);
+  
+                  metaDataHelper.populateBundleWideTransactionData(pc.getComponentDefinitionRegistry(),

+                          elt.getAttribute(Constants.VALUE), elt.getAttribute(Constants.METHOD),
bean);
+              } else {
+                  cdr.registerInterceptorWithComponent(cm, interceptor);
+                  if (LOGGER.isDebugEnabled())
+                      LOGGER.debug("parser setting comp trans data for " + elt.getAttribute(Constants.VALUE)
+ "  "
+                              + elt.getAttribute(Constants.METHOD));
+      
+                  metaDataHelper.setComponentTransactionData(cdr, cm, elt.getAttribute(Constants.VALUE),
elt
+                          .getAttribute(Constants.METHOD));
+              }
+            }
         }
         
         if (LOGGER.isDebugEnabled())



Mime
View raw message