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.
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-
140144private void loadWebLogicTransactionHelper () throws TransactionSystemException {
141145if (this .transactionHelper == null ) {
142146try {
143- Class transactionHelperClass = getClass ().getClassLoader ().loadClass (TRANSACTION_HELPER_CLASS_NAME );
147+ Class <?> transactionHelperClass = getClass ().getClassLoader ().loadClass (TRANSACTION_HELPER_CLASS_NAME );
144148Method getTransactionHelperMethod = transactionHelperClass .getMethod ("getTransactionHelper" );
145149this .transactionHelper = getTransactionHelperMethod .invoke (null );
146150logger .debug ("WebLogic TransactionHelper found" );
@@ -159,7 +163,7 @@ private void loadWebLogicTransactionHelper() throws TransactionSystemException {
159163
160164private void loadWebLogicTransactionClasses () throws TransactionSystemException {
161165try {
162- Class userTransactionClass = getClass ().getClassLoader ().loadClass (USER_TRANSACTION_CLASS_NAME );
166+ Class <?> userTransactionClass = getClass ().getClassLoader ().loadClass (USER_TRANSACTION_CLASS_NAME );
163167this .weblogicUserTransactionAvailable = userTransactionClass .isInstance (getUserTransaction ());
164168if (this .weblogicUserTransactionAvailable ) {
165169this .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 =
175179getClass ().getClassLoader ().loadClass (CLIENT_TRANSACTION_MANAGER_CLASS_NAME );
176180logger .debug ("WebLogic ClientTransactionManager found" );
177181
178182this .weblogicTransactionManagerAvailable = transactionManagerClass .isInstance (getTransactionManager ());
179183if (this .weblogicTransactionManagerAvailable ) {
180- Class transactionClass = getClass ().getClassLoader ().loadClass (TRANSACTION_CLASS_NAME );
184+ Class <?> transactionClass = getClass ().getClassLoader ().loadClass (TRANSACTION_CLASS_NAME );
181185this .forceResumeMethod = transactionManagerClass .getMethod ("forceResume" , Transaction .class );
182186this .setPropertyMethod = transactionClass .getMethod ("setProperty" , String .class , Serializable .class );
183187logger .debug ("Support for WebLogic forceResume available" );
@@ -296,7 +300,6 @@ protected void doJtaResume(JtaTransactionObject txObject, Object suspendedTransa
296300}
297301}
298302
299-
300303@ Override
301304public Transaction createTransaction (String name , int timeout ) throws NotSupportedException , SystemException {
302305if (this .weblogicUserTransactionAvailable && name != null ) {
0 commit comments