Skip to content

Commit e4d83bb

Browse files
committed
Refined javadoc for WebLogic/WebSphere transaction setup
Issue: SPR-10777 (cherry picked from commit 9035a97)
1 parent f88f5ed commit e4d83bb

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

spring-tx/src/main/java/org/springframework/transaction/jta/WebLogicJtaTransactionManager.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2013 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -56,6 +56,11 @@
5656
* "transactionManager"/"transactionManagerName", passing in existing handles
5757
* or specifying corresponding JNDI locations to look up.
5858
*
59+
* <p><b>NOTE: This JtaTransactionManager is intended to refine specific transaction
60+
* demarcation behavior on Spring's side. It will happily co-exist with independently
61+
* configured WebLogic transaction strategies in your persistence provider, with no
62+
* need to specifically connect those setups in any way.</b>
63+
*
5964
* @author Juergen Hoeller
6065
* @since 1.1
6166
* @see org.springframework.transaction.TransactionDefinition#getName
@@ -136,11 +141,10 @@ protected TransactionManager retrieveTransactionManager() throws TransactionSyst
136141
}
137142
}
138143

139-
140144
private void loadWebLogicTransactionHelper() throws TransactionSystemException {
141145
if (this.transactionHelper == null) {
142146
try {
143-
Class transactionHelperClass = getClass().getClassLoader().loadClass(TRANSACTION_HELPER_CLASS_NAME);
147+
Class<?> transactionHelperClass = getClass().getClassLoader().loadClass(TRANSACTION_HELPER_CLASS_NAME);
144148
Method getTransactionHelperMethod = transactionHelperClass.getMethod("getTransactionHelper");
145149
this.transactionHelper = getTransactionHelperMethod.invoke(null);
146150
logger.debug("WebLogic TransactionHelper found");
@@ -159,7 +163,7 @@ private void loadWebLogicTransactionHelper() throws TransactionSystemException {
159163

160164
private void loadWebLogicTransactionClasses() throws TransactionSystemException {
161165
try {
162-
Class userTransactionClass = getClass().getClassLoader().loadClass(USER_TRANSACTION_CLASS_NAME);
166+
Class<?> userTransactionClass = getClass().getClassLoader().loadClass(USER_TRANSACTION_CLASS_NAME);
163167
this.weblogicUserTransactionAvailable = userTransactionClass.isInstance(getUserTransaction());
164168
if (this.weblogicUserTransactionAvailable) {
165169
this.beginWithNameMethod = userTransactionClass.getMethod("begin", String.class);
@@ -171,13 +175,13 @@ private void loadWebLogicTransactionClasses() throws TransactionSystemException
171175
}
172176

173177
// Obtain WebLogic ClientTransactionManager interface.
174-
Class transactionManagerClass =
178+
Class<?> transactionManagerClass =
175179
getClass().getClassLoader().loadClass(CLIENT_TRANSACTION_MANAGER_CLASS_NAME);
176180
logger.debug("WebLogic ClientTransactionManager found");
177181

178182
this.weblogicTransactionManagerAvailable = transactionManagerClass.isInstance(getTransactionManager());
179183
if (this.weblogicTransactionManagerAvailable) {
180-
Class transactionClass = getClass().getClassLoader().loadClass(TRANSACTION_CLASS_NAME);
184+
Class<?> transactionClass = getClass().getClassLoader().loadClass(TRANSACTION_CLASS_NAME);
181185
this.forceResumeMethod = transactionManagerClass.getMethod("forceResume", Transaction.class);
182186
this.setPropertyMethod = transactionClass.getMethod("setProperty", String.class, Serializable.class);
183187
logger.debug("Support for WebLogic forceResume available");
@@ -296,7 +300,6 @@ protected void doJtaResume(JtaTransactionObject txObject, Object suspendedTransa
296300
}
297301
}
298302

299-
300303
@Override
301304
public Transaction createTransaction(String name, int timeout) throws NotSupportedException, SystemException {
302305
if (this.weblogicUserTransactionAvailable && name != null) {

spring-tx/src/main/java/org/springframework/transaction/jta/WebSphereUowTransactionManager.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2013 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -71,6 +71,11 @@
7171
* simply specify the actual location through this transaction manager's
7272
* "uowManagerName" bean property.
7373
*
74+
* <p><b>NOTE: This JtaTransactionManager is intended to refine specific transaction
75+
* demarcation behavior on Spring's side. It will happily co-exist with independently
76+
* configured WebSphere transaction strategies in your persistence provider, with no
77+
* need to specifically connect those setups in any way.</b>
78+
*
7479
* @author Juergen Hoeller
7580
* @since 2.5
7681
* @see #setUowManager

0 commit comments

Comments
 (0)