Tidy up of UserTransaction roll back on throwable as opposed to Exception

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2218 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2006-01-26 15:38:58 +00:00
parent e9e1618479
commit e6788c379f
18 changed files with 28 additions and 28 deletions

View File

@@ -351,7 +351,7 @@ public class CategoriesBean implements IContextListener
categories = Collections.<Node>emptyList();
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
}
catch (Exception err)
catch (Throwable err)
{
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), err.getMessage()), err);

View File

@@ -772,7 +772,7 @@ public class DocumentDetailsBean
approveFolder.getId());
}
}
catch (Exception e)
catch (Throwable e)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}
@@ -877,7 +877,7 @@ public class DocumentDetailsBean
rejectFolder.getId());
}
}
catch (Exception e)
catch (Throwable e)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}
@@ -907,7 +907,7 @@ public class DocumentDetailsBean
// reset the state of the current document
getDocument().reset();
}
catch (Exception e)
catch (Throwable e)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}
@@ -937,7 +937,7 @@ public class DocumentDetailsBean
// reset the state of the current document
getDocument().reset();
}
catch (Exception e)
catch (Throwable e)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}
@@ -985,7 +985,7 @@ public class DocumentDetailsBean
// reset the state of the current document
getDocument().reset();
}
catch (Exception e)
catch (Throwable e)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}
@@ -1100,7 +1100,7 @@ public class DocumentDetailsBean
// commit the transaction
tx.commit();
}
catch (Exception e)
catch (Throwable e)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}

View File

@@ -261,7 +261,7 @@ public class DocumentPropertiesBean
// this failure means the node no longer exists - we cannot show the doc properties screen
outcome = "browse";
}
catch (Exception e)
catch (Throwable e)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}

View File

@@ -121,7 +121,7 @@ public class ExportBean
// reset the bean
reset();
}
catch (Exception e)
catch (Throwable e)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}

View File

@@ -120,7 +120,7 @@ public class ImportBean
// reset the bean
reset();
}
catch (Exception e)
catch (Throwable e)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}

View File

@@ -153,7 +153,7 @@ public class UserShortcutsBean
tx.rollback();
}
}
catch (Exception err)
catch (Throwable err)
{
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), err.getMessage()), err);
@@ -251,7 +251,7 @@ public class UserShortcutsBean
if (logger.isDebugEnabled())
logger.debug("Added node: " + node.getName() + " to the user shortcuts list.");
}
catch (Exception err)
catch (Throwable err)
{
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), err.getMessage()), err);
@@ -308,7 +308,7 @@ public class UserShortcutsBean
logger.debug("Removed node: " + node.getName() + " from the user shortcuts list.");
}
}
catch (Exception err)
catch (Throwable err)
{
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), err.getMessage()), err);
@@ -373,7 +373,7 @@ public class UserShortcutsBean
logger.debug("Removed deleted node: " + node.getName() + " from the user shortcuts list.");
}
}
catch (Exception err)
catch (Throwable err)
{
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
}

View File

@@ -221,7 +221,7 @@ public class ClipboardBean
// refresh UI on success
UIContextService.getInstance(FacesContext.getCurrentInstance()).notifyBeans();
}
catch (Exception err)
catch (Throwable err)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}

View File

@@ -539,7 +539,7 @@ public final class Repository
personNodes = Collections.<Node>emptyList();
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
}
catch (Exception err)
catch (Throwable err)
{
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
context, Repository.ERROR_GENERIC), err.getMessage()), err );

View File

@@ -356,7 +356,7 @@ public abstract class UserMembersBean
personNodes = Collections.<Map>emptyList();
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
}
catch (Exception err)
catch (Throwable err)
{
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
context, Repository.ERROR_GENERIC), err.getMessage()), err );

View File

@@ -273,7 +273,7 @@ public class UsersBean implements IContextListener
// commit the transaction
tx.commit();
}
catch (Exception e)
catch (Throwable e)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}

View File

@@ -243,7 +243,7 @@ public abstract class BaseContentWizard extends AbstractWizardBean
// no outcome
outcome = null;
}
catch (Exception e)
catch (Throwable e)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}

View File

@@ -254,7 +254,7 @@ public abstract class InviteUsersWizard extends AbstractWizardBean
UIContextService.getInstance(context).notifyBeans();
}
catch (Exception e)
catch (Throwable e)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}
@@ -407,7 +407,7 @@ public abstract class InviteUsersWizard extends AbstractWizardBean
// commit the transaction
tx.commit();
}
catch (Exception err)
catch (Throwable err)
{
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), err.getMessage()), err );

View File

@@ -88,7 +88,7 @@ public class NewActionWizard extends BaseActionWizard
// commit the transaction
tx.commit();
}
catch (Exception e)
catch (Throwable e)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}

View File

@@ -112,7 +112,7 @@ public class NewDiscussionWizard extends NewTopicWizard
// commit the transaction
tx.commit();
}
catch (Exception e)
catch (Throwable e)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}
@@ -159,7 +159,7 @@ public class NewDiscussionWizard extends NewTopicWizard
// commit the transaction
tx.commit();
}
catch (Exception e)
catch (Throwable e)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}

View File

@@ -215,7 +215,7 @@ public class NewRuleWizard extends BaseActionWizard
// commit the transaction
tx.commit();
}
catch (Exception e)
catch (Throwable e)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}

View File

@@ -284,7 +284,7 @@ public class NewSpaceWizard extends AbstractWizardBean
// no outcome
outcome = null;
}
catch (Exception e)
catch (Throwable e)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}

View File

@@ -537,7 +537,7 @@ public class NewUserWizard extends AbstractWizardBean
// reset the richlist component so it rebinds to the users list
invalidateUserList();
}
catch (Exception e)
catch (Throwable e)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}

View File

@@ -399,7 +399,7 @@ public class UIRichList extends UIComponentBase implements IDataContainer
tx.commit();
}
}
catch (Exception err)
catch (Throwable err)
{
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
}