Skip to content

Commit f5f2604

Browse files
committed
fixed bug in TranHandler
1 parent 93e344e commit f5f2604

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/main/java/org/teasoft/beex/transaction/TranHandler.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
import org.teasoft.honey.osql.core.SessionFactory;
3131

3232
/**
33+
* Tran Handler for @Tran.
34+
* <br>The transaction will use same connection,
35+
* <br>it mean that all operations of same transaction will do in same dataSource.
3336
* @author Kingstar
3437
* @since 1.17
3538
*/
@@ -65,10 +68,13 @@ public Object tranAround(ProceedingJoinPoint joinPoint) throws Throwable {
6568
transaction.commit();
6669
} catch (Exception e) {
6770
transaction.rollback();
68-
Logger.warn(e.getMessage(), e);
71+
// Logger.warn(e.getMessage(), e);
72+
Logger.warn("Catch Exception in TranHandler.tranAround: "+e.getMessage());
73+
Logger.info(MSG + " end.");
74+
throw e; //fixed 2.4.0.8
6975
}
7076

71-
Logger.info(MSG + " end...");
77+
Logger.info(MSG + " end.");
7278
return returnValue;
7379
}
7480

0 commit comments

Comments
 (0)