File tree Expand file tree Collapse file tree 4 files changed +9
-15
lines changed
spring-jms/src/main/java/org/springframework/jms/connection
spring-orm/src/main/java/org/springframework/orm Expand file tree Collapse file tree 4 files changed +9
-15
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2018 the original author or authors.
2
+ * Copyright 2002-2020 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -505,7 +505,7 @@ protected void closeConnection(Connection con) {
505
505
logger .debug ("Ignoring Connection state exception - assuming already closed: " + ex );
506
506
}
507
507
catch (Throwable ex ) {
508
- logger .debug ("Could not close shared JMS Connection" , ex );
508
+ logger .warn ("Could not close shared JMS Connection" , ex );
509
509
}
510
510
}
511
511
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2018 the original author or authors.
2
+ * Copyright 2002-2020 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -170,11 +170,8 @@ public static void closeSession(@Nullable Session session) {
170
170
try {
171
171
session .close ();
172
172
}
173
- catch (HibernateException ex ) {
174
- logger .debug ("Could not close Hibernate Session" , ex );
175
- }
176
173
catch (Throwable ex ) {
177
- logger .debug ( "Unexpected exception on closing Hibernate Session" , ex );
174
+ logger .error ( "Failed to release Hibernate Session" , ex );
178
175
}
179
176
}
180
177
}
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2018 the original author or authors.
2
+ * Copyright 2002-2020 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -427,11 +427,8 @@ public static void closeEntityManager(@Nullable EntityManager em) {
427
427
em .close ();
428
428
}
429
429
}
430
- catch (PersistenceException ex ) {
431
- logger .debug ("Could not close JPA EntityManager" , ex );
432
- }
433
430
catch (Throwable ex ) {
434
- logger .debug ( "Unexpected exception on closing JPA EntityManager" , ex );
431
+ logger .error ( "Failed to release JPA EntityManager" , ex );
435
432
}
436
433
}
437
434
}
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2018 the original author or authors.
2
+ * Copyright 2002-2020 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -603,9 +603,9 @@ protected void doCleanupAfterCompletion(Object transaction) {
603
603
getJpaDialect ().releaseJdbcConnection (conHandle ,
604
604
txObject .getEntityManagerHolder ().getEntityManager ());
605
605
}
606
- catch (Exception ex ) {
606
+ catch (Throwable ex ) {
607
607
// Just log it, to keep a transaction-related exception.
608
- logger .error ("Could not close JDBC connection after transaction" , ex );
608
+ logger .error ("Failed to release JDBC connection after transaction" , ex );
609
609
}
610
610
}
611
611
}
You can’t perform that action at this time.
0 commit comments