GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Resource-based PlatformTransactionManager implementations defensively… · candrews/spring-framework@2e4eb9f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • spring-jdbc/src/main/java/org/springframework/jdbc/datasource
    • DataSourceTransactionManager.java
  • spring-jms/src/main/java/org/springframework/jms/connection
    • JmsTransactionManager.java
  • spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4
    • HibernateTransactionManager.java
  • spring-orm/src/main/java/org/springframework/orm
    • hibernate3
      • HibernateTransactionManager.java
    • jdo
      • JdoTransactionManager.java
    • jpa
      • JpaTransactionManager.java
  • spring-tx/src/main/java/org/springframework/jca/cci/connection
    • CciLocalTransactionManager.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceTransactionManager.java‎

Copy file name to clipboardExpand all lines: spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceTransactionManager.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ protected void doBegin(Object transaction, TransactionDefinition definition) {
238238
}
239239
}
240240

241-
catch (Exception ex) {
241+
catch (Throwable ex) {
242242
DataSourceUtils.releaseConnection(con, this.dataSource);
243243
throw new CannotCreateTransactionException("Could not open JDBC Connection for transaction", ex);
244244
}
Collapse file

‎spring-jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager.java‎

Copy file name to clipboardExpand all lines: spring-jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager.java
+2-2Lines changed: 2 additions & 2 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.
@@ -196,7 +196,7 @@ protected void doBegin(Object transaction, TransactionDefinition definition) {
196196
TransactionSynchronizationManager.bindResource(
197197
getConnectionFactory(), txObject.getResourceHolder());
198198
}
199-
catch (JMSException ex) {
199+
catch (Throwable ex) {
200200
if (con != null) {
201201
try {
202202
con.close();
Collapse file

‎spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/HibernateTransactionManager.java‎

Copy file name to clipboardExpand all lines: spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/HibernateTransactionManager.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ protected void doBegin(Object transaction, TransactionDefinition definition) {
500500
txObject.getSessionHolder().setSynchronizedWithTransaction(true);
501501
}
502502

503-
catch (Exception ex) {
503+
catch (Throwable ex) {
504504
if (txObject.isNewSession()) {
505505
try {
506506
if (session.getTransaction().isActive()) {
Collapse file

‎spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateTransactionManager.java‎

Copy file name to clipboardExpand all lines: spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateTransactionManager.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ protected void doBegin(Object transaction, TransactionDefinition definition) {
583583
txObject.getSessionHolder().setSynchronizedWithTransaction(true);
584584
}
585585

586-
catch (Exception ex) {
586+
catch (Throwable ex) {
587587
if (txObject.isNewSession()) {
588588
try {
589589
if (session.getTransaction().isActive()) {
Collapse file

‎spring-orm/src/main/java/org/springframework/orm/jdo/JdoTransactionManager.java‎

Copy file name to clipboardExpand all lines: spring-orm/src/main/java/org/springframework/orm/jdo/JdoTransactionManager.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ public int getTimeout() {
366366
closePersistenceManagerAfterFailedBegin(txObject);
367367
throw ex;
368368
}
369-
catch (Exception ex) {
369+
catch (Throwable ex) {
370370
closePersistenceManagerAfterFailedBegin(txObject);
371371
throw new CannotCreateTransactionException("Could not open JDO PersistenceManager for transaction", ex);
372372
}
Collapse file

‎spring-orm/src/main/java/org/springframework/orm/jpa/JpaTransactionManager.java‎

Copy file name to clipboardExpand all lines: spring-orm/src/main/java/org/springframework/orm/jpa/JpaTransactionManager.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ public int getTimeout() {
425425
closeEntityManagerAfterFailedBegin(txObject);
426426
throw ex;
427427
}
428-
catch (Exception ex) {
428+
catch (Throwable ex) {
429429
closeEntityManagerAfterFailedBegin(txObject);
430430
throw new CannotCreateTransactionException("Could not open JPA EntityManager for transaction", ex);
431431
}
Collapse file

‎spring-tx/src/main/java/org/springframework/jca/cci/connection/CciLocalTransactionManager.java‎

Copy file name to clipboardExpand all lines: spring-tx/src/main/java/org/springframework/jca/cci/connection/CciLocalTransactionManager.java
+3-4Lines changed: 3 additions & 4 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.
@@ -29,8 +29,8 @@
2929
import org.springframework.transaction.TransactionSystemException;
3030
import org.springframework.transaction.support.AbstractPlatformTransactionManager;
3131
import org.springframework.transaction.support.DefaultTransactionStatus;
32-
import org.springframework.transaction.support.TransactionSynchronizationManager;
3332
import org.springframework.transaction.support.ResourceTransactionManager;
33+
import org.springframework.transaction.support.TransactionSynchronizationManager;
3434

3535
/**
3636
* {@link org.springframework.transaction.PlatformTransactionManager} implementation
@@ -141,7 +141,6 @@ protected boolean isExistingTransaction(Object transaction) {
141141
@Override
142142
protected void doBegin(Object transaction, TransactionDefinition definition) {
143143
CciLocalTransactionObject txObject = (CciLocalTransactionObject) transaction;
144-
145144
Connection con = null;
146145

147146
try {
@@ -169,7 +168,7 @@ protected void doBegin(Object transaction, TransactionDefinition definition) {
169168
ConnectionFactoryUtils.releaseConnection(con, getConnectionFactory());
170169
throw new CannotCreateTransactionException("Could not begin local CCI transaction", ex);
171170
}
172-
catch (ResourceException ex) {
171+
catch (Throwable ex) {
173172
ConnectionFactoryUtils.releaseConnection(con, getConnectionFactory());
174173
throw new TransactionSystemException("Unexpected failure on begin of CCI local transaction", ex);
175174
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.