1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
3 <xsd:schema xmlns="http://www.springframework.org/schema/tx"
4 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
5 xmlns:beans="http://www.springframework.org/schema/beans"
6 xmlns:tool="http://www.springframework.org/schema/tool"
7 targetNamespace="http://www.springframework.org/schema/tx"
8 elementFormDefault="qualified"
9 attributeFormDefault="unqualified">
11 <xsd:import namespace="http://www.springframework.org/schema/beans" schemaLocation="http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"/>
12 <xsd:import namespace="http://www.springframework.org/schema/tool" schemaLocation="http://www.springframework.org/schema/tool/spring-tool-3.0.xsd"/>
15 <xsd:documentation><![CDATA[
16 Defines the elements used in the Spring Framework's declarative
17 transaction management infrastructure.
18 ]]></xsd:documentation>
21 <xsd:element name="advice">
24 <xsd:documentation source="java:org.springframework.transaction.interceptor.TransactionInterceptor"><![CDATA[
25 Defines the transactional semantics of the AOP advice that is to be
28 That is, this advice element is where the transactional semantics of
29 any number of methods are defined (where transactional semantics
30 includes the propagation settings, the isolation level, the rollback
32 ]]></xsd:documentation>
35 <tool:exports type="org.springframework.transaction.interceptor.TransactionInterceptor"/>
40 <xsd:extension base="beans:identifiedType">
42 <xsd:element name="attributes" type="attributesType" minOccurs="0" maxOccurs="1"/>
44 <xsd:attribute name="transaction-manager" type="xsd:string" default="transactionManager">
46 <xsd:documentation source="java:org.springframework.transaction.PlatformTransactionManager"><![CDATA[
47 The bean name of the PlatformTransactionManager that is to be used
48 to drive transactions.
50 This attribute is not required, and only needs to be specified
51 explicitly if the bean name of the desired PlatformTransactionManager
52 is not 'transactionManager'.
53 ]]></xsd:documentation>
55 <tool:annotation kind="ref">
56 <tool:expected-type type="org.springframework.transaction.PlatformTransactionManager"/>
66 <xsd:element name="annotation-driven">
69 <xsd:documentation source="java:org.springframework.transaction.annotation.AnnotationTransactionAttributeSource"><![CDATA[
70 Indicates that transaction configuration is defined by Java 5
71 annotations on bean classes, and that proxies are automatically
72 to be created for the relevant annotated beans.
74 The default annotations supported are Spring's @Transactional
75 and EJB3's @TransactionAttribute (if available).
77 Transaction semantics such as propagation settings, the isolation level,
78 the rollback rules, etc are all defined in the annotation metadata.
79 ]]></xsd:documentation>
81 <xsd:attribute name="transaction-manager" type="xsd:string" default="transactionManager">
83 <xsd:documentation source="java:org.springframework.transaction.PlatformTransactionManager"><![CDATA[
84 The bean name of the PlatformTransactionManager that is to be used
85 to drive transactions.
87 This attribute is not required, and only needs to be specified
88 explicitly if the bean name of the desired PlatformTransactionManager
89 is not 'transactionManager'.
90 ]]></xsd:documentation>
92 <tool:annotation kind="ref">
93 <tool:expected-type type="org.springframework.transaction.PlatformTransactionManager"/>
98 <xsd:attribute name="mode" default="proxy">
100 <xsd:documentation><![CDATA[
101 Should annotated beans be proxied using Spring's AOP framework,
102 or should they rather be weaved with an AspectJ transaction aspect?
104 AspectJ weaving requires spring-aspects.jar on the classpath,
105 as well as load-time weaving (or compile-time weaving) enabled.
107 Note: The weaving-based aspect requires the @Transactional annotation to be
108 defined on the concrete class. Annotations in interfaces will not work
109 in that case (they will rather only work with interface-based proxies)!
110 ]]></xsd:documentation>
113 <xsd:restriction base="xsd:string">
114 <xsd:enumeration value="proxy"/>
115 <xsd:enumeration value="aspectj"/>
119 <xsd:attribute name="proxy-target-class" type="xsd:boolean" default="false">
121 <xsd:documentation><![CDATA[
122 Are class-based (CGLIB) proxies to be created? By default, standard
123 Java interface-based proxies are created.
125 Note: Class-based proxies require the @Transactional annotation to be
126 defined on the concrete class. Annotations in interfaces will not work
127 in that case (they will rather only work with interface-based proxies)!
128 ]]></xsd:documentation>
131 <xsd:attribute name="order" type="xsd:int">
133 <xsd:documentation source="java:org.springframework.core.Ordered"><![CDATA[
134 Controls the ordering of the execution of the transaction advisor
135 when multiple advice executes at a specific joinpoint.
136 ]]></xsd:documentation>
142 <xsd:element name="jta-transaction-manager">
144 <xsd:documentation><![CDATA[
145 Creates a default JtaTransactionManager bean with name "transactionManager",
146 matching the default bean name expected by the "annotation-driven" tag.
147 Automatically detects WebLogic, WebSphere and OC4J: creating a WebLogicJtaTransactionManager,
148 WebSphereUowTransactionManager or OC4JJtaTransactionManager, respectively.
150 For customization needs, consider defining a JtaTransactionManager bean as a regular
151 Spring bean definition with name "transactionManager", replacing this element.
152 ]]></xsd:documentation>
155 <tool:exports type="org.springframework.transaction.jta.JtaTransactionManager"/>
161 <xsd:complexType name="attributesType">
163 <xsd:element name="method" minOccurs="1" maxOccurs="unbounded">
165 <xsd:attribute name="name" type="xsd:string" use="required">
167 <xsd:documentation><![CDATA[
168 The method name(s) with which the transaction attributes are to be
169 associated. The wildcard (*) character can be used to associate the
170 same transaction attribute settings with a number of methods; for
171 example, 'get*', 'handle*', '*Order', 'on*Event', etc.
172 ]]></xsd:documentation>
175 <xsd:attribute name="propagation" default="REQUIRED">
177 <xsd:documentation source="java:org.springframework.transaction.annotation.Propagation"><![CDATA[
178 The transaction propagation behavior.
179 ]]></xsd:documentation>
182 <xsd:restriction base="xsd:string">
183 <xsd:enumeration value="REQUIRED"/>
184 <xsd:enumeration value="SUPPORTS"/>
185 <xsd:enumeration value="MANDATORY"/>
186 <xsd:enumeration value="REQUIRES_NEW"/>
187 <xsd:enumeration value="NOT_SUPPORTED"/>
188 <xsd:enumeration value="NEVER"/>
189 <xsd:enumeration value="NESTED"/>
193 <xsd:attribute name="isolation" default="DEFAULT">
195 <xsd:documentation source="java:org.springframework.transaction.annotation.Isolation"><![CDATA[
196 The transaction isolation level.
197 ]]></xsd:documentation>
200 <xsd:restriction base="xsd:string">
201 <xsd:enumeration value="DEFAULT"/>
202 <xsd:enumeration value="READ_UNCOMMITTED"/>
203 <xsd:enumeration value="READ_COMMITTED"/>
204 <xsd:enumeration value="REPEATABLE_READ"/>
205 <xsd:enumeration value="SERIALIZABLE"/>
209 <xsd:attribute name="timeout" type="xsd:integer" default="-1">
211 <xsd:documentation><![CDATA[
212 The transaction timeout value (in seconds).
213 ]]></xsd:documentation>
216 <xsd:attribute name="read-only" type="xsd:boolean" default="false">
218 <xsd:documentation><![CDATA[
219 Is this transaction read-only?
220 ]]></xsd:documentation>
223 <xsd:attribute name="rollback-for" type="xsd:string">
225 <xsd:documentation><![CDATA[
226 The Exception(s) that will trigger rollback; comma-delimited.
227 For example, 'com.foo.MyBusinessException,ServletException'
228 ]]></xsd:documentation>
231 <xsd:attribute name="no-rollback-for" type="xsd:string">
233 <xsd:documentation><![CDATA[
234 The Exception(s) that will *not* trigger rollback; comma-delimited.
235 For example, 'com.foo.MyBusinessException,ServletException'
236 ]]></xsd:documentation>