5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-06 06:30:37 +08:00

SQOOP-1128: Sqoop2: SqoopException being nested into another SqoopException in Repository

(Mengwei Ding via Venkat Ranganathan)
This commit is contained in:
Venkat Ranganathan 2013-07-08 20:14:08 -07:00
parent 96a02dfee9
commit 251c8334fa

View File

@ -464,6 +464,11 @@ public final void upgradeConnector(MConnector oldConnector, MConnector newConnec
throw new SqoopException(RepositoryError.JDBCREPO_0027, msg);
}
} catch (SqoopException ex) {
if(tx != null) {
tx.rollback();
}
throw ex;
} catch (Exception ex) {
if(tx != null) {
tx.rollback();
@ -558,6 +563,11 @@ public final void upgradeFramework(MFramework framework) {
throw new SqoopException(RepositoryError.JDBCREPO_0027, msg);
}
} catch (SqoopException ex) {
if(tx != null) {
tx.rollback();
}
throw ex;
} catch (Exception ex) {
if(tx != null) {
tx.rollback();