aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From timothyjw...@apache.org
Subject svn commit: r1240975 - in /aries/trunk/transaction/transaction-blueprint: ./ src/main/java/org/apache/aries/transaction/ src/main/java/org/apache/aries/transaction/annotations/ src/main/java/org/apache/aries/transaction/parsing/ src/main/resources/OSGI...
Date Mon, 06 Feb 2012 11:04:57 GMT
Author: timothyjward
Date: Mon Feb  6 11:04:56 2012
New Revision: 1240975

URL: http://svn.apache.org/viewvc?rev=1240975&view=rev
Log:
ARIES-626: Support Basic transaction configuration using annotations. No enhancement to existing tx function (i.e. methods with the same name and different arguments always have the same transaction behaviour)

Added:
    aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/annotations/
    aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/annotations/Transaction.java   (with props)
    aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/annotations/TransactionPropagationType.java   (with props)
    aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/annotations/packageinfo
    aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/AnnotationParser.java   (with props)
    aries/trunk/transaction/transaction-blueprint/src/main/resources/org/apache/aries/transaction/parsing/transactionv12.xsd   (with props)
    aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/AnnotationEnablingNameSpaceHandlerTest.java   (with props)
    aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/AnnotationParserTest.java   (with props)
    aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/pojo/
    aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/pojo/AnnotatedPojo.java   (with props)
    aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/pojo/BadlyAnnotatedPojo1.java   (with props)
    aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/pojo/BadlyAnnotatedPojo2.java   (with props)
    aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/aries7.xml   (with props)
    aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/aries8.xml   (with props)
    aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/aries9.xml   (with props)
    aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/bundlewide-aries4.xml   (with props)
    aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/bundlewide-aries5.xml   (with props)
    aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/bundlewide-aries6.xml   (with props)
    aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/enable-annotations.xml   (with props)
    aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/enable-annotations2.xml   (with props)
    aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/mixed-aries2.xml   (with props)
Modified:
    aries/trunk/transaction/transaction-blueprint/pom.xml
    aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/Constants.java
    aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/TxElementHandler.java
    aries/trunk/transaction/transaction-blueprint/src/main/resources/OSGI-INF/blueprint/transaction.xml
    aries/trunk/transaction/transaction-blueprint/src/main/resources/org/apache/aries/transaction/nls/blueprintTx.properties
    aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/BaseNameSpaceHandlerSetup.java
    aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/BundleWideNameSpaceHandlerTest.java
    aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/NameSpaceHandlerTest.java

Modified: aries/trunk/transaction/transaction-blueprint/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/pom.xml?rev=1240975&r1=1240974&r2=1240975&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/pom.xml (original)
+++ aries/trunk/transaction/transaction-blueprint/pom.xml Mon Feb  6 11:04:56 2012
@@ -42,7 +42,8 @@
         <!-- Export package versions are maintained in packageinfo files -->
 
         <aries.osgi.export.pkg>
-            org.apache.aries.transaction.exception
+            org.apache.aries.transaction.exception,
+            org.apache.aries.transaction.annotations
         </aries.osgi.export.pkg>
         <aries.osgi.import>
             org.osgi.framework,

Modified: aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/Constants.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/Constants.java?rev=1240975&r1=1240974&r2=1240975&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/Constants.java (original)
+++ aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/Constants.java Mon Feb  6 11:04:56 2012
@@ -18,6 +18,7 @@
  */
 package org.apache.aries.transaction;
 
+import java.lang.reflect.Modifier;
 import java.util.regex.Pattern;
 
 import org.apache.aries.util.nls.MessageUtil;
@@ -27,10 +28,15 @@ public class Constants {
     public static final String BEAN = "bean";
     public static final String VALUE = "value";
     public static final String METHOD = "method";
+    public static final String TX12_SCHEMA = "transactionv12.xsd";
     public static final String TX11_SCHEMA = "transactionv11.xsd";
     public static final String TX10_SCHEMA = "transactionv10.xsd";
     
+    public static final String ANNOTATION_PARSER_BEAN_NAME = ".org_apache_aries_transaction_annotations";
+    public static final int BANNED_MODIFIERS = Modifier.PRIVATE | Modifier.STATIC;
+    
     public final static String TRANSACTION10URI = "http://aries.apache.org/xmlns/transactions/v1.0.0";
     public final static String TRANSACTION11URI = "http://aries.apache.org/xmlns/transactions/v1.1.0";
+    public final static String TRANSACTION12URI = "http://aries.apache.org/xmlns/transactions/v1.2.0";
     public static final MessageUtil MESSAGES = MessageUtil.createMessageUtil(Constants.class, "org.apache.aries.transaction.nls.blueprintTx");
 }

Added: aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/annotations/Transaction.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/annotations/Transaction.java?rev=1240975&view=auto
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/annotations/Transaction.java (added)
+++ aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/annotations/Transaction.java Mon Feb  6 11:04:56 2012
@@ -0,0 +1,12 @@
+package org.apache.aries.transaction.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface Transaction {
+   TransactionPropagationType value() default TransactionPropagationType.Required;
+}

Propchange: aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/annotations/Transaction.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/annotations/TransactionPropagationType.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/annotations/TransactionPropagationType.java?rev=1240975&view=auto
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/annotations/TransactionPropagationType.java (added)
+++ aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/annotations/TransactionPropagationType.java Mon Feb  6 11:04:56 2012
@@ -0,0 +1,5 @@
+package org.apache.aries.transaction.annotations;
+
+public enum TransactionPropagationType {
+	Mandatory, Never, NotSupported, Required, RequiresNew, Supports
+}

Propchange: aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/annotations/TransactionPropagationType.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/annotations/packageinfo
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/annotations/packageinfo?rev=1240975&view=auto
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/annotations/packageinfo (added)
+++ aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/annotations/packageinfo Mon Feb  6 11:04:56 2012
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+version 0.3.1

Added: aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/AnnotationParser.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/AnnotationParser.java?rev=1240975&view=auto
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/AnnotationParser.java (added)
+++ aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/AnnotationParser.java Mon Feb  6 11:04:56 2012
@@ -0,0 +1,73 @@
+package org.apache.aries.transaction.parsing;
+
+import java.lang.reflect.Method;
+
+import org.apache.aries.blueprint.BeanProcessor;
+import org.apache.aries.blueprint.ComponentDefinitionRegistry;
+import org.apache.aries.blueprint.Interceptor;
+import org.apache.aries.transaction.Constants;
+import org.apache.aries.transaction.TxComponentMetaDataHelper;
+import org.apache.aries.transaction.TxInterceptorImpl;
+import org.apache.aries.transaction.annotations.Transaction;
+import org.osgi.service.blueprint.reflect.BeanMetadata;
+
+public class AnnotationParser implements BeanProcessor {
+
+	private final ComponentDefinitionRegistry cdr;
+	private final Interceptor interceptor;
+	private final TxComponentMetaDataHelper helper;
+	
+	public AnnotationParser(ComponentDefinitionRegistry cdr, Interceptor i, TxComponentMetaDataHelper helper) {
+		this.cdr = cdr;
+		this.interceptor = i;
+		this.helper = helper;
+	}
+
+	public void afterDestroy(Object arg0, String arg1) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public Object afterInit(Object arg0, String arg1, BeanCreator arg2,
+			BeanMetadata arg3) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void beforeDestroy(Object arg0, String arg1) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public Object beforeInit(Object arg0, String arg1, BeanCreator arg2,
+			BeanMetadata arg3) {
+        Class<?> c = arg0.getClass();
+        boolean interceptorAssigned = false; 
+        while(c != Object.class) {
+            for(Method m : c.getDeclaredMethods()) {
+                int modifiers = m.getModifiers();
+                if((modifiers & Constants.BANNED_MODIFIERS) != 0)
+                    throw new IllegalArgumentException(Constants.MESSAGES.getMessage("private.or.static.method", m));
+			    Transaction t = m.getAnnotation(Transaction.class);
+			    if(t != null && helper.getComponentMethodTxAttribute(arg3, m.getName()) == null) {
+			    	helper.setComponentTransactionData(cdr, arg3, t.value().toString(), m.getName());
+			    	
+			    	outer: if(!!!interceptorAssigned) {
+			    		for(Interceptor i : cdr.getInterceptors(arg3)) {
+			    			if(i == interceptor) {
+			    				interceptorAssigned = true;
+			    				break outer;
+			    			}
+			    		}
+			            cdr.registerInterceptorWithComponent(arg3, interceptor);
+			            interceptorAssigned = true;
+			    	}
+			    }
+			    
+		    }
+            c = c.getSuperclass();
+		}
+		return arg0;
+	}
+
+}

Propchange: aries/trunk/transaction/transaction-blueprint/src/main/java/org/apache/aries/transaction/parsing/AnnotationParser.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

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=1240975&r1=1240974&r2=1240975&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  6 11:04:56 2012
@@ -35,6 +35,7 @@ import org.apache.aries.blueprint.Interc
 import org.apache.aries.blueprint.NamespaceHandler;
 import org.apache.aries.blueprint.ParserContext;
 import org.apache.aries.blueprint.PassThroughMetadata;
+import org.apache.aries.blueprint.reflect.PassThroughMetadataImpl;
 import org.apache.aries.transaction.BundleWideTxData;
 import org.apache.aries.transaction.Constants;
 import org.apache.aries.transaction.TxComponentMetaDataHelper;
@@ -63,11 +64,11 @@ public class TxElementHandler implements
         if (LOGGER.isDebugEnabled())
             LOGGER.debug("parser asked to parse .. " + elt);
 
+        ComponentDefinitionRegistry cdr = pc.getComponentDefinitionRegistry();
         if ("transaction".equals(elt.getLocalName())) {
             if (LOGGER.isDebugEnabled())
                 LOGGER.debug("parser adding interceptor for " + elt);
 
-            ComponentDefinitionRegistry cdr = pc.getComponentDefinitionRegistry();
             ComponentMetadata meta = cdr.getComponentDefinition("blueprintBundle");
             Bundle blueprintBundle = null;
             if (meta instanceof PassThroughMetadata) {
@@ -96,6 +97,15 @@ public class TxElementHandler implements
                           .getAttribute(Constants.METHOD));
               }
             }
+        } else if ("enable-annotations".equals(elt.getLocalName())) {
+            Node n = elt.getChildNodes().item(0);
+            if(n == null || Boolean.parseBoolean(n.getNodeValue())) {
+                //We need to register a bean processor to add annotation-based config
+                if(!!!cdr.containsComponentDefinition(Constants.ANNOTATION_PARSER_BEAN_NAME)) {
+                    cdr.registerComponentDefinition(new PassThroughMetadataImpl(Constants.ANNOTATION_PARSER_BEAN_NAME,
+                	        new AnnotationParser(cdr, interceptor, metaDataHelper)));
+                }
+            }
         }
         
         if (LOGGER.isDebugEnabled())
@@ -119,11 +129,14 @@ public class TxElementHandler implements
 
     public URL getSchemaLocation(String arg0)
     {
-    	if (arg0.equals(Constants.TRANSACTION10URI)) {
+    	if (Constants.TRANSACTION10URI.equals(arg0)) {
     	    return this.getClass().getResource(Constants.TX10_SCHEMA);
-    	} else {
+    	} else if (Constants.TRANSACTION11URI.equals(arg0)) {
     	    return this.getClass().getResource(Constants.TX11_SCHEMA);
+    	} else if (Constants.TRANSACTION12URI.equals(arg0)) {
+    		return this.getClass().getResource(Constants.TX12_SCHEMA);
     	}
+    	return null;
     }
 
     public final void setTxMetaDataHelper(TxComponentMetaDataHelper transactionEnhancer)

Modified: aries/trunk/transaction/transaction-blueprint/src/main/resources/OSGI-INF/blueprint/transaction.xml
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/main/resources/OSGI-INF/blueprint/transaction.xml?rev=1240975&r1=1240974&r2=1240975&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/main/resources/OSGI-INF/blueprint/transaction.xml (original)
+++ aries/trunk/transaction/transaction-blueprint/src/main/resources/OSGI-INF/blueprint/transaction.xml Mon Feb  6 11:04:56 2012
@@ -28,6 +28,7 @@
             	<list>
 				    <value>http://aries.apache.org/xmlns/transactions/v1.0.0</value>
 				    <value>http://aries.apache.org/xmlns/transactions/v1.1.0</value>
+				    <value>http://aries.apache.org/xmlns/transactions/v1.2.0</value>
 			    </list>
 			</entry>
         </service-properties>

Modified: aries/trunk/transaction/transaction-blueprint/src/main/resources/org/apache/aries/transaction/nls/blueprintTx.properties
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/main/resources/org/apache/aries/transaction/nls/blueprintTx.properties?rev=1240975&r1=1240974&r2=1240975&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/main/resources/org/apache/aries/transaction/nls/blueprintTx.properties (original)
+++ aries/trunk/transaction/transaction-blueprint/src/main/resources/org/apache/aries/transaction/nls/blueprintTx.properties Mon Feb  6 11:04:56 2012
@@ -28,6 +28,7 @@ tran.not.found.mandatory=A call is being
 tran.found.never=A call is being made on a method that forbids a transaction but there is a current transaction.
 # {0} transaction configuration
 bundle.wide.tx=There are more than one bundle wide transaction elements that have no method or bean attribute specified {0}.
+private.or.static.method=The method {0} declares a Transaction annotation, but it is declared private or static and cannot be made transactional. 
 
 
 

Added: aries/trunk/transaction/transaction-blueprint/src/main/resources/org/apache/aries/transaction/parsing/transactionv12.xsd
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/main/resources/org/apache/aries/transaction/parsing/transactionv12.xsd?rev=1240975&view=auto
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/main/resources/org/apache/aries/transaction/parsing/transactionv12.xsd (added)
+++ aries/trunk/transaction/transaction-blueprint/src/main/resources/org/apache/aries/transaction/parsing/transactionv12.xsd Mon Feb  6 11:04:56 2012
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<xsd:schema xmlns="http://aries.apache.org/xmlns/transactions/v1.2.0"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://aries.apache.org/xmlns/transactions/v1.2.0"
+    elementFormDefault="qualified" attributeFormDefault="unqualified"
+    version="1.2.0">
+
+    <xsd:annotation>
+        <xsd:documentation>
+      <![CDATA[
+        This is the XML Schema for the OSGi Blueprint declarative transaction 1.2.0 development descriptor.  Blueprint declarative transaction is a custom namespace for OSGi Blueprint service 1.0.0 development descriptor.  It is designed to decorate transaction attribute of the bean components, which can be done at the bean level or at the bundle wide level.  In other words, the transaction element can reside in the bean element or in the root of the blueprint element as a top level transaction element. Blueprint configuration files using this schema must indicate the schema using the transactions/v1.2.0 namespace.  For example,        
+        <transaction xmlns="http://aries.apache.org/xmlns/transactions/v1.2.0">
+        if used as a qualified namespace, "tx" is the recommended namespace prefix.
+      ]]>
+        </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:simpleType name="TtransactionAttribute">
+        <xsd:annotation>
+            <xsd:documentation>
+        <![CDATA[
+          The TtransactionAttribute type defines the transaction attribute for blueprint declarative transaction.  
+        ]]>
+            </xsd:documentation>
+        </xsd:annotation>
+        <xsd:restriction base="xsd:string">
+            <xsd:enumeration value="Required" />
+            <xsd:enumeration value="Mandatory" />
+            <xsd:enumeration value="RequiresNew" />
+            <xsd:enumeration value="Supports" />
+            <xsd:enumeration value="NotSupported" />
+            <xsd:enumeration value="Never" />
+        </xsd:restriction>
+    </xsd:simpleType>
+
+    <xsd:complexType name="Ttransaction">
+        <xsd:annotation>
+            <xsd:documentation>
+        <![CDATA[
+            The Ttransaction defines one or more methods that are intercepted with the specified transaction attribute. Multiple methods names can be wild-carded with a '*'.  Method can be a mixture of fixed string and one wild-card.   Methods can be whitespace or comma separated. The bean attribute refers to the bean component id and can only be used for top level transaction element.  Similar as methods, beans can be whitespace separated and be a mixture of fixed string and one wild-card.
+        ]]>
+            </xsd:documentation>
+        </xsd:annotation>
+        <xsd:attribute name="method" type="xsd:string" />
+        <xsd:attribute name="value" type="TtransactionAttribute"
+            use="optional" default="Required" />
+        <xsd:attribute name="bean" type="xsd:string" />
+    </xsd:complexType>
+
+    <xsd:element name="transaction" type="Ttransaction">
+        <xsd:annotation>
+            <xsd:documentation>
+        <![CDATA[
+          The <transaction> element is the root element for blueprint declarative transaction
+        ]]>
+            </xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+    
+    <xsd:element name="enable-annotations" type="xsd:boolean" default="true">
+        <xsd:annotation>
+            <xsd:documentation>
+        <![CDATA[
+          The <enable-annotations> element is used to enable annotation scanning for @Transaction annotations
+        ]]>
+            </xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+
+</xsd:schema>
\ No newline at end of file

Propchange: aries/trunk/transaction/transaction-blueprint/src/main/resources/org/apache/aries/transaction/parsing/transactionv12.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/AnnotationEnablingNameSpaceHandlerTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/AnnotationEnablingNameSpaceHandlerTest.java?rev=1240975&view=auto
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/AnnotationEnablingNameSpaceHandlerTest.java (added)
+++ aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/AnnotationEnablingNameSpaceHandlerTest.java Mon Feb  6 11:04:56 2012
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.transaction;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import org.apache.aries.blueprint.ComponentDefinitionRegistry;
+import org.apache.aries.blueprint.PassThroughMetadata;
+import org.apache.aries.transaction.parsing.AnnotationParser;
+import org.apache.aries.transaction.pojo.AnnotatedPojo;
+import org.junit.Test;
+import org.osgi.service.blueprint.reflect.BeanMetadata;
+
+public class AnnotationEnablingNameSpaceHandlerTest extends BaseNameSpaceHandlerSetup {
+    
+    @Test
+    public void testAnnotationEnabled() throws Exception
+    {
+      ComponentDefinitionRegistry cdr = parseCDR("enable-annotations.xml");
+            
+      BeanMetadata compTop = (BeanMetadata) cdr.getComponentDefinition("top");
+      
+      assertNotNull(compTop);
+      assertEquals(0, cdr.getInterceptors(compTop).size());
+      assertNull(txenhancer.getComponentMethodTxAttribute(compTop, "increment"));
+      
+      
+      PassThroughMetadata pmd = (PassThroughMetadata) cdr.getComponentDefinition(Constants.ANNOTATION_PARSER_BEAN_NAME);
+      assertNotNull(pmd);
+      
+      AnnotationParser parser  = (AnnotationParser) pmd.getObject();
+      parser.beforeInit(new AnnotatedPojo(), "top", null, compTop);
+      
+      assertEquals("Required", txenhancer.getComponentMethodTxAttribute(compTop, "increment"));
+      assertEquals(1, cdr.getInterceptors(compTop).size());
+    }
+    
+    @Test
+    public void testAnnotationDisabled() throws Exception
+    {
+        ComponentDefinitionRegistry cdr = parseCDR("enable-annotations2.xml");
+              
+        BeanMetadata compTop = (BeanMetadata) cdr.getComponentDefinition("top");
+        
+        assertNotNull(compTop);
+        assertEquals(0, cdr.getInterceptors(compTop).size());
+        assertNull(txenhancer.getComponentMethodTxAttribute(compTop, "increment"));
+        
+        
+        PassThroughMetadata pmd = (PassThroughMetadata) cdr.getComponentDefinition(Constants.ANNOTATION_PARSER_BEAN_NAME);
+        assertNull(pmd);
+    }
+}

Propchange: aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/AnnotationEnablingNameSpaceHandlerTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/AnnotationParserTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/AnnotationParserTest.java?rev=1240975&view=auto
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/AnnotationParserTest.java (added)
+++ aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/AnnotationParserTest.java Mon Feb  6 11:04:56 2012
@@ -0,0 +1,112 @@
+package org.apache.aries.transaction;
+
+import java.util.Arrays;
+
+import org.apache.aries.blueprint.ComponentDefinitionRegistry;
+import org.apache.aries.blueprint.Interceptor;
+import org.apache.aries.blueprint.mutable.MutableBeanMetadata;
+import org.apache.aries.blueprint.reflect.BeanMetadataImpl;
+import org.apache.aries.transaction.parsing.AnnotationParser;
+import org.apache.aries.transaction.pojo.AnnotatedPojo;
+import org.apache.aries.transaction.pojo.BadlyAnnotatedPojo1;
+import org.apache.aries.transaction.pojo.BadlyAnnotatedPojo2;
+import org.apache.aries.unittest.mocks.MethodCall;
+import org.apache.aries.unittest.mocks.MethodCallHandler;
+import org.apache.aries.unittest.mocks.Skeleton;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+
+public class AnnotationParserTest {
+
+	private TxComponentMetaDataHelper helper;
+	private ComponentDefinitionRegistry cdr;
+	private Interceptor i;
+	private AnnotationParser parser;
+	
+	@Before
+	public void setup() {
+        helper = Skeleton.newMock(TxComponentMetaDataHelper.class);
+        Skeleton.getSkeleton(helper).setReturnValue(new MethodCall(TxComponentMetaDataHelper.class,
+	    		"getComponentMethodTxAttribute", ComponentMetadata.class, String.class), null);
+        cdr = Skeleton.newMock(ComponentDefinitionRegistry.class);
+        i = Skeleton.newMock(Interceptor.class);
+        parser = new AnnotationParser(cdr, i, helper);
+	}
+	
+	@Test
+	public void testFindAnnotation() {
+		MutableBeanMetadata mbm = new BeanMetadataImpl();
+		mbm.setId("testPojo");
+		mbm.setClassName(AnnotatedPojo.class.getName());
+	    parser.beforeInit(new AnnotatedPojo(), "testPojo", null, mbm);
+	    
+	    Skeleton.getSkeleton(helper).assertCalledExactNumberOfTimes(new MethodCall(TxComponentMetaDataHelper.class,
+	    		"getComponentMethodTxAttribute", mbm, String.class), 3);
+	    
+	    Skeleton.getSkeleton(helper).assertCalledExactNumberOfTimes(new MethodCall(TxComponentMetaDataHelper.class,
+	    		"setComponentTransactionData", cdr, mbm, "Required", "increment"), 1);
+	    Skeleton.getSkeleton(helper).assertCalledExactNumberOfTimes(new MethodCall(TxComponentMetaDataHelper.class,
+	    		"setComponentTransactionData", cdr, mbm, "Supports", "checkValue"), 1);
+	    Skeleton.getSkeleton(helper).assertCalledExactNumberOfTimes(new MethodCall(TxComponentMetaDataHelper.class,
+	    		"setComponentTransactionData", cdr, mbm, "Mandatory", "getRealObject"), 1);
+	    
+	    Skeleton.getSkeleton(cdr).assertCalledExactNumberOfTimes(new MethodCall(ComponentDefinitionRegistry.class,
+	    		"registerInterceptorWithComponent", mbm, i), 1);
+	}
+	
+	@Test
+	public void testAnnotationsOverridenByXML() {
+		
+		MutableBeanMetadata mbm = new BeanMetadataImpl();
+		mbm.setId("testPojo");
+		mbm.setClassName(AnnotatedPojo.class.getName());
+	    
+		Skeleton.getSkeleton(helper).registerMethodCallHandler(new MethodCall(TxComponentMetaDataHelper.class,
+	    		"getComponentMethodTxAttribute", ComponentMetadata.class, String.class), new MethodCallHandler() {
+					
+					public Object handle(MethodCall arg0, Skeleton arg1) throws Exception {
+						if(arg0.getArguments()[1].equals("increment"))
+							return "Never";
+						
+						return null;
+					}
+				});
+		
+		Skeleton.getSkeleton(cdr).setReturnValue(new MethodCall(ComponentDefinitionRegistry.class,
+				"getInterceptors", mbm), Arrays.asList(i));
+		
+		parser.beforeInit(new AnnotatedPojo(), "testPojo", null, mbm);
+	    
+	    Skeleton.getSkeleton(helper).assertCalledExactNumberOfTimes(new MethodCall(TxComponentMetaDataHelper.class,
+	    		"getComponentMethodTxAttribute", mbm, String.class), 3);
+	    
+	    Skeleton.getSkeleton(helper).assertNotCalled(new MethodCall(TxComponentMetaDataHelper.class,
+	    		"setComponentTransactionData", cdr, mbm, "Required", "increment"));
+	    Skeleton.getSkeleton(helper).assertCalledExactNumberOfTimes(new MethodCall(TxComponentMetaDataHelper.class,
+	    		"setComponentTransactionData", cdr, mbm, "Supports", "checkValue"), 1);
+	    Skeleton.getSkeleton(helper).assertCalledExactNumberOfTimes(new MethodCall(TxComponentMetaDataHelper.class,
+	    		"setComponentTransactionData", cdr, mbm, "Mandatory", "getRealObject"), 1);
+	    
+	    Skeleton.getSkeleton(cdr).assertNotCalled(new MethodCall(ComponentDefinitionRegistry.class,
+	    		"registerInterceptorWithComponent", mbm, i));
+	}
+	
+	
+	@Test(expected=IllegalArgumentException.class)
+	public void testNoPrivateAnnotation() {
+		MutableBeanMetadata mbm = new BeanMetadataImpl();
+		mbm.setId("testPojo");
+		mbm.setClassName(BadlyAnnotatedPojo1.class.getName());
+	    parser.beforeInit(new BadlyAnnotatedPojo1(), "testPojo", null, mbm);
+	}
+	
+	@Test(expected=IllegalArgumentException.class)
+	public void testNoStaticAnnotation() {
+		MutableBeanMetadata mbm = new BeanMetadataImpl();
+		mbm.setId("testPojo");
+		mbm.setClassName(BadlyAnnotatedPojo2.class.getName());
+	    parser.beforeInit(new BadlyAnnotatedPojo2(), "testPojo", null, mbm);
+	}
+	
+}

Propchange: aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/AnnotationParserTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/BaseNameSpaceHandlerSetup.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/BaseNameSpaceHandlerSetup.java?rev=1240975&r1=1240974&r2=1240975&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/BaseNameSpaceHandlerSetup.java (original)
+++ aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/BaseNameSpaceHandlerSetup.java Mon Feb  6 11:04:56 2012
@@ -75,7 +75,7 @@ public class BaseNameSpaceHandlerSetup {
         namespaceHandler.setTxMetaDataHelper(txenhancer);
             
         Properties props = new Properties();
-        props.put("osgi.service.blueprint.namespace", new String[]{"http://aries.apache.org/xmlns/transactions/v1.0.0", "http://aries.apache.org/xmlns/transactions/v1.1.0"});
+        props.put("osgi.service.blueprint.namespace", new String[]{"http://aries.apache.org/xmlns/transactions/v1.0.0", "http://aries.apache.org/xmlns/transactions/v1.1.0", "http://aries.apache.org/xmlns/transactions/v1.2.0"});
         ctx.registerService(NamespaceHandler.class.getName(), namespaceHandler, props);
     }
       

Modified: aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/BundleWideNameSpaceHandlerTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/BundleWideNameSpaceHandlerTest.java?rev=1240975&r1=1240974&r2=1240975&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/BundleWideNameSpaceHandlerTest.java (original)
+++ aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/BundleWideNameSpaceHandlerTest.java Mon Feb  6 11:04:56 2012
@@ -27,10 +27,10 @@ import org.osgi.service.blueprint.reflec
 
 public class BundleWideNameSpaceHandlerTest extends BaseNameSpaceHandlerSetup {
     
-    @Test
-    public void testMultipleElements() throws Exception
+    
+    private void testMultipleElements(String xml) throws Exception
     {
-      ComponentDefinitionRegistry cdr = parseCDR("bundlewide-aries.xml");
+      ComponentDefinitionRegistry cdr = parseCDR(xml);
             
       BeanMetadata compTop = (BeanMetadata) cdr.getComponentDefinition("top1");
       BeanMetadata compDown = (BeanMetadata) cdr.getComponentDefinition("down1");
@@ -47,9 +47,18 @@ public class BundleWideNameSpaceHandlerT
     }
     
     @Test
-    public void testMultipleElements2() throws Exception
+    public void testMultipleElements_110() throws Exception {
+      testMultipleElements("bundlewide-aries.xml");
+    }
+    
+    @Test
+    public void testMultipleElements_120() throws Exception {
+      testMultipleElements("bundlewide-aries4.xml");
+    }
+    
+    private void testMultipleElements2(String xml) throws Exception
     {
-      ComponentDefinitionRegistry cdr = parseCDR("bundlewide-aries2.xml");
+      ComponentDefinitionRegistry cdr = parseCDR(xml);
       
       BeanMetadata compTop = (BeanMetadata) cdr.getComponentDefinition("top2");
       BeanMetadata compDown = (BeanMetadata) cdr.getComponentDefinition("down2");
@@ -75,9 +84,18 @@ public class BundleWideNameSpaceHandlerT
     }
     
     @Test
-    public void testMultipleElements3() throws Exception
+    public void testMultipleElements2_110() throws Exception {
+      testMultipleElements2("bundlewide-aries2.xml");
+    }
+    
+    @Test
+    public void testMultipleElements2_120() throws Exception {
+      testMultipleElements2("bundlewide-aries5.xml");
+    }
+    
+    private void testMultipleElements3(String xml) throws Exception
     {
-      ComponentDefinitionRegistry cdr = parseCDR("bundlewide-aries3.xml");
+      ComponentDefinitionRegistry cdr = parseCDR(xml);
       
       BeanMetadata compTop = (BeanMetadata) cdr.getComponentDefinition("top3");
       BeanMetadata compDown = (BeanMetadata) cdr.getComponentDefinition("down3");
@@ -101,4 +119,14 @@ public class BundleWideNameSpaceHandlerT
       assertEquals("Required", txenhancer.getComponentMethodTxAttribute(compMiddle, "doSomething"));
         
     }
+    
+    @Test
+    public void testMultipleElements3_110() throws Exception {
+      testMultipleElements3("bundlewide-aries3.xml");
+    }
+    
+    @Test
+    public void testMultipleElements3_120() throws Exception {
+      testMultipleElements3("bundlewide-aries6.xml");
+    }
 }

Modified: aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/NameSpaceHandlerTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/NameSpaceHandlerTest.java?rev=1240975&r1=1240974&r2=1240975&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/NameSpaceHandlerTest.java (original)
+++ aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/NameSpaceHandlerTest.java Mon Feb  6 11:04:56 2012
@@ -29,11 +29,10 @@ import org.osgi.service.blueprint.contai
 import org.osgi.service.blueprint.reflect.BeanMetadata;
 
 public class NameSpaceHandlerTest extends BaseNameSpaceHandlerSetup {
-    
-    @Test
-    public void testMultipleElements_100() throws Exception
+	
+    private void testMultipleElements(String xml) throws Exception
     {
-      ComponentDefinitionRegistry cdr = parseCDR("aries.xml");
+      ComponentDefinitionRegistry cdr = parseCDR(xml);
       
       BeanMetadata comp = (BeanMetadata) cdr.getComponentDefinition("top");
       
@@ -43,26 +42,28 @@ public class NameSpaceHandlerTest extend
       assertEquals("Required", txenhancer.getComponentMethodTxAttribute(anon, "doSomething"));
       assertEquals("Never", txenhancer.getComponentMethodTxAttribute(anonToo, "doSomething"));        
     }
+	
+    @Test
+    public void testMultipleElements_100() throws Exception
+    {
+      testMultipleElements("aries.xml");
+    }
     
     @Test
     public void testMultipleElements_110() throws Exception
     {
-      ComponentDefinitionRegistry cdr = parseCDR("aries4.xml");
-        
-      BeanMetadata comp = (BeanMetadata) cdr.getComponentDefinition("top");
-      
-      BeanMetadata anon = (BeanMetadata) (comp.getProperties().get(0)).getValue();
-      BeanMetadata anonToo = (BeanMetadata) (comp.getProperties().get(1)).getValue();
-
-      assertEquals("Required", txenhancer.getComponentMethodTxAttribute(anon, "doSomething"));
-      assertEquals("Never", txenhancer.getComponentMethodTxAttribute(anonToo, "doSomething"));
-        
+      testMultipleElements("aries4.xml");
     }
     
     @Test
-    public void testOptionalMethodAttribute_100() throws Exception
+    public void testMultipleElements_120() throws Exception
     {
-      ComponentDefinitionRegistry cdr = parseCDR("aries2.xml");
+      testMultipleElements("aries7.xml");
+    }
+    
+    private void testOptionalMethodAttribute(String xml) throws Exception
+    {
+      ComponentDefinitionRegistry cdr = parseCDR(xml);
       
       BeanMetadata comp = (BeanMetadata) cdr.getComponentDefinition("top");
       
@@ -75,24 +76,26 @@ public class NameSpaceHandlerTest extend
     }
     
     @Test
+    public void testOptionalMethodAttribute_100() throws Exception
+    {
+      testOptionalMethodAttribute("aries2.xml");
+    }
+    
+    @Test
     public void testOptionalMethodAttribute_110() throws Exception
     {
-      ComponentDefinitionRegistry cdr = parseCDR("aries5.xml");
-      
-      BeanMetadata comp = (BeanMetadata) cdr.getComponentDefinition("top");
-      
-      BeanMetadata anon = (BeanMetadata) (comp.getProperties().get(0)).getValue();
-      BeanMetadata anonToo = (BeanMetadata) (comp.getProperties().get(1)).getValue();
-
-      assertEquals("Required", txenhancer.getComponentMethodTxAttribute(anon, "doSomething"));
-      assertEquals("Never", txenhancer.getComponentMethodTxAttribute(anonToo, "doSomething"));
-        
+      testOptionalMethodAttribute("aries5.xml");
     }
     
     @Test
-    public void testOptionalValueAttribute_100() throws Exception
+    public void testOptionalMethodAttribute_120() throws Exception
+    {
+      testOptionalMethodAttribute("aries8.xml");
+    }
+    
+    private void testOptionalValueAttribute(String xml) throws Exception
     {
-      ComponentDefinitionRegistry cdr = parseCDR("aries3.xml");
+      ComponentDefinitionRegistry cdr = parseCDR(xml);
       
       BeanMetadata comp = (BeanMetadata) cdr.getComponentDefinition("top");
       
@@ -105,24 +108,26 @@ public class NameSpaceHandlerTest extend
     }
     
     @Test
+    public void testOptionalValueAttribute_100() throws Exception
+    {
+      testOptionalValueAttribute("aries3.xml");
+    }
+    
+    @Test
     public void testOptionalValueAttribute_110() throws Exception
     {
-      ComponentDefinitionRegistry cdr = parseCDR("aries6.xml");
-      
-      BeanMetadata comp = (BeanMetadata) cdr.getComponentDefinition("top");
-      
-      BeanMetadata anon = (BeanMetadata) (comp.getProperties().get(0)).getValue();
-      BeanMetadata anonToo = (BeanMetadata) (comp.getProperties().get(1)).getValue();
-
-      assertEquals("Required", txenhancer.getComponentMethodTxAttribute(anon, "doSomething"));
-      assertEquals("Never", txenhancer.getComponentMethodTxAttribute(anonToo, "doSomething"));
-      assertEquals("Required", txenhancer.getComponentMethodTxAttribute(anonToo, "require")); 
+      testOptionalValueAttribute("aries6.xml");
     }
     
     @Test
-    public void testBundleWideAndBeanLevelTx() throws Exception
+    public void testOptionalValueAttribute_120() throws Exception
     {
-      ComponentDefinitionRegistry cdr = parseCDR("mixed-aries.xml");
+      testOptionalValueAttribute("aries9.xml");
+    }
+    
+    private void testBundleWideAndBeanLevelTx(String xml) throws Exception
+    {
+      ComponentDefinitionRegistry cdr = parseCDR(xml);
       
       BeanMetadata compRequiresNew = (BeanMetadata) cdr.getComponentDefinition("requiresNew");
       BeanMetadata compNoTx = (BeanMetadata) cdr.getComponentDefinition("noTx");
@@ -138,9 +143,19 @@ public class NameSpaceHandlerTest extend
     }
     
     @Test
-    public void testLifecycleOld() throws Exception
+    public void testBundleWideAndBeanLevelTx_110() throws Exception {
+      testBundleWideAndBeanLevelTx("mixed-aries.xml");
+    }
+    
+    @Test
+    public void testBundleWideAndBeanLevelTx_120() throws Exception {
+      testBundleWideAndBeanLevelTx("mixed-aries2.xml");
+    }
+    
+    
+    private void testLifecycleOld(String xml) throws Exception
     {
-        ComponentDefinitionRegistry cdr = parseCDR("aries.xml");
+        ComponentDefinitionRegistry cdr = parseCDR(xml);
 
         BeanMetadata comp = (BeanMetadata) cdr.getComponentDefinition("top");
 
@@ -160,9 +175,26 @@ public class NameSpaceHandlerTest extend
     }
     
     @Test
-    public void testLifecycleMixed() throws Exception
+    public void testLifecycleOld() throws Exception
+    {
+    	testLifecycleOld("aries.xml");
+    }
+    
+    @Test
+    public void testLifecycleOld_110() throws Exception
+    {
+    	testLifecycleOld("aries4.xml");
+    }
+    
+    @Test
+    public void testLifecycleOld_120() throws Exception
+    {
+    	testLifecycleOld("aries7.xml");
+    }
+    
+    private void testLifecycleMixed(String xml) throws Exception
     {
-        ComponentDefinitionRegistry cdr = parseCDR("mixed-aries.xml");
+        ComponentDefinitionRegistry cdr = parseCDR(xml);
         
         BeanMetadata compRequiresNew = (BeanMetadata) cdr.getComponentDefinition("requiresNew");
         BeanMetadata compNoTx = (BeanMetadata) cdr.getComponentDefinition("noTx");
@@ -190,4 +222,16 @@ public class NameSpaceHandlerTest extend
         assertNull(txenhancer.getComponentMethodTxAttribute(compAnotherBean, "doSomething"));
         assertNull(txenhancer.getComponentMethodTxAttribute(compAnotherBean, "getWhatever"));   
     }
+    
+    @Test
+    public void testLifecycleMixed_110() throws Exception
+    {
+    	testLifecycleMixed("mixed-aries.xml");
+    }
+    
+    @Test
+    public void testLifecycleMixed_120() throws Exception
+    {
+    	testLifecycleMixed("mixed-aries2.xml");
+    }
 }

Added: aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/pojo/AnnotatedPojo.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/pojo/AnnotatedPojo.java?rev=1240975&view=auto
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/pojo/AnnotatedPojo.java (added)
+++ aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/pojo/AnnotatedPojo.java Mon Feb  6 11:04:56 2012
@@ -0,0 +1,20 @@
+package org.apache.aries.transaction.pojo;
+
+import org.apache.aries.transaction.annotations.Transaction;
+import org.apache.aries.transaction.annotations.TransactionPropagationType;
+
+public class AnnotatedPojo {
+	
+	@Transaction
+	public void increment(String key) {}
+
+	@Transaction(TransactionPropagationType.Supports)
+	protected int checkValue(String key) {
+		return 0;
+	}
+	
+	@Transaction(TransactionPropagationType.Mandatory)
+	Object getRealObject(String key) {
+		return null;
+	}
+}

Propchange: aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/pojo/AnnotatedPojo.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/pojo/BadlyAnnotatedPojo1.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/pojo/BadlyAnnotatedPojo1.java?rev=1240975&view=auto
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/pojo/BadlyAnnotatedPojo1.java (added)
+++ aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/pojo/BadlyAnnotatedPojo1.java Mon Feb  6 11:04:56 2012
@@ -0,0 +1,23 @@
+package org.apache.aries.transaction.pojo;
+
+import org.apache.aries.transaction.annotations.Transaction;
+import org.apache.aries.transaction.annotations.TransactionPropagationType;
+
+public class BadlyAnnotatedPojo1 {
+	
+	@Transaction
+	public void increment(String key) {}
+
+	@Transaction(TransactionPropagationType.Supports)
+	protected int checkValue(String key) {
+		return 0;
+	}
+	
+	@Transaction(TransactionPropagationType.Mandatory)
+	Object getRealObject(String key) {
+		return null;
+	}
+	
+	@Transaction
+	private void doesNotWork() {}
+}

Propchange: aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/pojo/BadlyAnnotatedPojo1.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/pojo/BadlyAnnotatedPojo2.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/pojo/BadlyAnnotatedPojo2.java?rev=1240975&view=auto
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/pojo/BadlyAnnotatedPojo2.java (added)
+++ aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/pojo/BadlyAnnotatedPojo2.java Mon Feb  6 11:04:56 2012
@@ -0,0 +1,22 @@
+package org.apache.aries.transaction.pojo;
+
+import org.apache.aries.transaction.annotations.Transaction;
+import org.apache.aries.transaction.annotations.TransactionPropagationType;
+
+public class BadlyAnnotatedPojo2 {
+	
+	@Transaction
+	public void increment(String key) {}
+
+	@Transaction(TransactionPropagationType.Supports)
+	protected int checkValue(String key) {
+		return 0;
+	}
+	
+	@Transaction(TransactionPropagationType.Mandatory)
+	Object getRealObject(String key) {
+		return null;
+	}
+	
+	public static void alsoDoesNotWork() {}
+}

Propchange: aries/trunk/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/pojo/BadlyAnnotatedPojo2.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/aries7.xml
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/aries7.xml?rev=1240975&view=auto
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/aries7.xml (added)
+++ aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/aries7.xml Mon Feb  6 11:04:56 2012
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint  xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+            xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.2.0">
+
+	
+	<bean id="top" class="org.apache.aries.transaction.TestBean">
+		<property name="txRequired">
+			<bean class="org.apache.aries.transaction.TestTxBean">
+			    <tx:transaction method="*" value="Required"/>
+			</bean>
+		</property>
+		<property name="txNever">
+			<bean class="org.apache.aries.transaction.TestTxBean">
+			    <tx:transaction method="*" value="Never"/>
+			</bean>		
+		</property>
+	</bean>
+</blueprint>
\ No newline at end of file

Propchange: aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/aries7.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/aries8.xml
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/aries8.xml?rev=1240975&view=auto
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/aries8.xml (added)
+++ aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/aries8.xml Mon Feb  6 11:04:56 2012
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint  xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+            xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.2.0">
+
+	
+	<bean id="top" class="org.apache.aries.transaction.TestBean">
+		<property name="txRequired">
+			<bean class="org.apache.aries.transaction.TestTxBean">
+			    <tx:transaction value="Required"/>
+			</bean>
+		</property>
+		<property name="txNever">
+			<bean class="org.apache.aries.transaction.TestTxBean">
+			    <tx:transaction value="Never"/>
+			</bean>		
+		</property>
+	</bean>
+</blueprint>
\ No newline at end of file

Propchange: aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/aries8.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/aries9.xml
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/aries9.xml?rev=1240975&view=auto
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/aries9.xml (added)
+++ aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/aries9.xml Mon Feb  6 11:04:56 2012
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint  xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+            xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.2.0">
+
+	
+	<bean id="top" class="org.apache.aries.transaction.TestBean">
+		<property name="txRequired">
+			<bean class="org.apache.aries.transaction.TestTxBean">
+			    <tx:transaction/>
+			</bean>
+		</property>
+		<property name="txNever">
+			<bean class="org.apache.aries.transaction.TestTxBean">
+			    <tx:transaction value="Never"/>
+			    <tx:transaction method="require"/>
+			</bean>		
+		</property>
+	</bean>
+</blueprint>
\ No newline at end of file

Propchange: aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/aries9.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/bundlewide-aries4.xml
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/bundlewide-aries4.xml?rev=1240975&view=auto
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/bundlewide-aries4.xml (added)
+++ aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/bundlewide-aries4.xml Mon Feb  6 11:04:56 2012
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint  xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+            xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.2.0">
+	<tx:transaction bean="top1" method="*" value="Required"/>
+	<tx:transaction bean="down1" method="*" value="Never"/>
+	
+	<bean id="top1" class="org.apache.aries.transaction.TestBean"/>
+	
+	<bean id="down1" class="org.apache.aries.transaction.TestBean2"/>
+</blueprint>
\ No newline at end of file

Propchange: aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/bundlewide-aries4.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/bundlewide-aries5.xml
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/bundlewide-aries5.xml?rev=1240975&view=auto
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/bundlewide-aries5.xml (added)
+++ aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/bundlewide-aries5.xml Mon Feb  6 11:04:56 2012
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint  xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+            xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.2.0">
+	<tx:transaction bean="top2" method="*" value="NotSupported"/>
+	<tx:transaction bean="down2" method="*" value="Required"/>
+	
+	<bean id="top2" class="org.apache.aries.transaction.TestBean">
+		<tx:transaction method="update*" value="Required"/>
+		<tx:transaction method="update123*" value="RequiresNew"/>
+	</bean>
+	
+    <bean id="down2" class="org.apache.aries.transaction.TestBean2">
+	    <tx:transaction method="update*" value="NotSupported"/>
+	</bean>
+	
+	<bean id="middle2" class="org.apache.aries.transaction.TestBean3"/>
+</blueprint>
\ No newline at end of file

Propchange: aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/bundlewide-aries5.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/bundlewide-aries6.xml
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/bundlewide-aries6.xml?rev=1240975&view=auto
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/bundlewide-aries6.xml (added)
+++ aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/bundlewide-aries6.xml Mon Feb  6 11:04:56 2012
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint  xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+            xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.2.0">
+	<tx:transaction bean="top*" method="*" value="NotSupported"/>
+	<tx:transaction bean="down* middle*" method="*" value="Required"/>
+	
+	<bean id="top3" class="org.apache.aries.transaction.TestBean">
+		<tx:transaction method="update*" value="Required"/>
+		<tx:transaction method="update123*" value="RequiresNew"/>
+	</bean>
+	
+    <bean id="down3" class="org.apache.aries.transaction.TestBean2">
+	    <tx:transaction method="update*" value="NotSupported"/>
+	</bean>
+	
+	<bean id="middle3" class="org.apache.aries.transaction.TestBean3"/>
+</blueprint>
\ No newline at end of file

Propchange: aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/bundlewide-aries6.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/enable-annotations.xml
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/enable-annotations.xml?rev=1240975&view=auto
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/enable-annotations.xml (added)
+++ aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/enable-annotations.xml Mon Feb  6 11:04:56 2012
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint  xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+            xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.2.0">
+
+    <tx:enable-annotations/>
+	
+	<bean id="top" class="org.apache.aries.transaction.pojo.AnnotatedPojo"/>
+</blueprint>
\ No newline at end of file

Propchange: aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/enable-annotations.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/enable-annotations2.xml
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/enable-annotations2.xml?rev=1240975&view=auto
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/enable-annotations2.xml (added)
+++ aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/enable-annotations2.xml Mon Feb  6 11:04:56 2012
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint  xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+            xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.2.0">
+
+	<tx:enable-annotations>false</tx:enable-annotations>
+	
+	<bean id="top" class="org.apache.aries.transaction.TestBean"/>
+</blueprint>
\ No newline at end of file

Propchange: aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/enable-annotations2.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/mixed-aries2.xml
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/mixed-aries2.xml?rev=1240975&view=auto
==============================================================================
--- aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/mixed-aries2.xml (added)
+++ aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/mixed-aries2.xml Mon Feb  6 11:04:56 2012
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+	xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.2.0">
+
+	<tx:transaction/>
+
+	<tx:transaction method="get*" value="Supports" />
+
+	<tx:transaction bean="noTx" value="Never" />
+
+	<tx:transaction bean="someTx" method="get*" value="Mandatory" />
+
+	<bean id="requiresNew" class="foo1">
+		<tx:transaction value="RequiresNew" />
+	</bean>
+
+	<bean id="noTx" class="foo2" />
+
+	<bean id="someTx" class="foo3" />
+
+	<bean id="anotherBean" class="foo4" />
+</blueprint>
\ No newline at end of file

Propchange: aries/trunk/transaction/transaction-blueprint/src/test/resources/org/apache/aries/transaction/mixed-aries2.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message