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.1.xsd"/>
12 <xsd:import namespace="http://www.springframework.org/schema/tool" schemaLocation="http://www.springframework.org/schema/tool/spring-tool-3.1.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.
80 See org.springframework.transaction.annotation.EnableTransactionManagement Javadoc
81 for information on code-based alternatives to this XML element.
82 ]]></xsd:documentation>
84 <xsd:attribute name="transaction-manager" type="xsd:string" default="transactionManager">
86 <xsd:documentation source="java:org.springframework.transaction.PlatformTransactionManager"><![CDATA[
87 The bean name of the PlatformTransactionManager that is to be used
88 to drive transactions.
90 This attribute is not required, and only needs to be specified
91 explicitly if the bean name of the desired PlatformTransactionManager
92 is not 'transactionManager'.
93 ]]></xsd:documentation>
95 <tool:annotation kind="ref">
96 <tool:expected-type type="org.springframework.transaction.PlatformTransactionManager"/>
101 <xsd:attribute name="mode" default="proxy">
103 <xsd:documentation><![CDATA[
104 Should annotated beans be proxied using Spring's AOP framework,
105 or should they rather be weaved with an AspectJ transaction aspect?
107 AspectJ weaving requires spring-aspects.jar on the classpath,
108 as well as load-time weaving (or compile-time weaving) enabled.
110 Note: The weaving-based aspect requires the @Transactional annotation to be
111 defined on the concrete class. Annotations in interfaces will not work
112 in that case (they will rather only work with interface-based proxies)!
113 ]]></xsd:documentation>
116 <xsd:restriction base="xsd:string">
117 <xsd:enumeration value="proxy"/>
118 <xsd:enumeration value="aspectj"/>
122 <xsd:attribute name="proxy-target-class" type="xsd:boolean" default="false">
124 <xsd:documentation><![CDATA[
125 Are class-based (CGLIB) proxies to be created? By default, standard
126 Java interface-based proxies are created.
128 Note: Class-based proxies require the @Transactional annotation to be
129 defined on the concrete class. Annotations in interfaces will not work
130 in that case (they will rather only work with interface-based proxies)!
131 ]]></xsd:documentation>
134 <xsd:attribute name="order" type="xsd:int">
136 <xsd:documentation source="java:org.springframework.core.Ordered"><![CDATA[
137 Controls the ordering of the execution of the transaction advisor
138 when multiple advice executes at a specific joinpoint.
139 ]]></xsd:documentation>
145 <xsd:element name="jta-transaction-manager">
147 <xsd:documentation><![CDATA[
148 Creates a default JtaTransactionManager bean with name "transactionManager",
149 matching the default bean name expected by the "annotation-driven" tag.
150 Automatically detects WebLogic, WebSphere and OC4J: creating a WebLogicJtaTransactionManager,
151 WebSphereUowTransactionManager or OC4JJtaTransactionManager, respectively.
153 For customization needs, consider defining a JtaTransactionManager bean as a regular
154 Spring bean definition with name "transactionManager", replacing this element.
155 ]]></xsd:documentation>
158 <tool:exports type="org.springframework.transaction.jta.JtaTransactionManager"/>
164 <xsd:complexType name="attributesType">
166 <xsd:element name="method" minOccurs="1" maxOccurs="unbounded">
168 <xsd:attribute name="name" type="xsd:string" use="required">
170 <xsd:documentation><![CDATA[
171 The method name(s) with which the transaction attributes are to be
172 associated. The wildcard (*) character can be used to associate the
173 same transaction attribute settings with a number of methods; for
174 example, 'get*', 'handle*', '*Order', 'on*Event', etc.
175 ]]></xsd:documentation>
178 <xsd:attribute name="propagation" default="REQUIRED">
180 <xsd:documentation source="java:org.springframework.transaction.annotation.Propagation"><![CDATA[
181 The transaction propagation behavior.
182 ]]></xsd:documentation>
185 <xsd:restriction base="xsd:string">
186 <xsd:enumeration value="REQUIRED"/>
187 <xsd:enumeration value="SUPPORTS"/>
188 <xsd:enumeration value="MANDATORY"/>
189 <xsd:enumeration value="REQUIRES_NEW"/>
190 <xsd:enumeration value="NOT_SUPPORTED"/>
191 <xsd:enumeration value="NEVER"/>
192 <xsd:enumeration value="NESTED"/>
196 <xsd:attribute name="isolation" default="DEFAULT">
198 <xsd:documentation source="java:org.springframework.transaction.annotation.Isolation"><![CDATA[
199 The transaction isolation level.
200 ]]></xsd:documentation>
203 <xsd:restriction base="xsd:string">
204 <xsd:enumeration value="DEFAULT"/>
205 <xsd:enumeration value="READ_UNCOMMITTED"/>
206 <xsd:enumeration value="READ_COMMITTED"/>
207 <xsd:enumeration value="REPEATABLE_READ"/>
208 <xsd:enumeration value="SERIALIZABLE"/>
212 <xsd:attribute name="timeout" type="xsd:integer" default="-1">
214 <xsd:documentation><![CDATA[
215 The transaction timeout value (in seconds).
216 ]]></xsd:documentation>
219 <xsd:attribute name="read-only" type="xsd:boolean" default="false">
221 <xsd:documentation><![CDATA[
222 Is this transaction read-only?
223 ]]></xsd:documentation>
226 <xsd:attribute name="rollback-for" type="xsd:string">
228 <xsd:documentation><![CDATA[
229 The Exception(s) that will trigger rollback; comma-delimited.
230 For example, 'com.foo.MyBusinessException,ServletException'
231 ]]></xsd:documentation>
234 <xsd:attribute name="no-rollback-for" type="xsd:string">
236 <xsd:documentation><![CDATA[
237 The Exception(s) that will *not* trigger rollback; comma-delimited.
238 For example, 'com.foo.MyBusinessException,ServletException'
239 ]]></xsd:documentation>