WriteableView writeable = getWriteableView(readableView, source); if (!writeable.join(t)) { t.rollback(); throw new TransactionFailure("Cannot enlist " + source.getProxyType() + " in transaction", null); t.rollback(); throw e; } catch (Exception e) { t.rollback(); throw new TransactionFailure(e.getMessage(), e); System.out.println("Retryable..."); t.rollback(); throw new TransactionFailure(e.getMessage(), e); } catch (TransactionFailure e) { System.out.println("failure, not retryable..."); t.rollback(); throw e;
for (WriteableView view : views) { if (!view.join(t)) { t.rollback(); throw new TransactionFailure("Cannot enlist " + view.getMasterView().getProxyType() + " in transaction", null); System.out.println("Retryable..."); t.rollback(); return null; } catch (TransactionFailure e) { t.rollback(); throw e; t.rollback(); Throwable throwable = e.getCause(); if (throwable instanceof PropertyVetoException) throw new TransactionFailure(throwable.toString(), throwable); t.rollback(); throw e; } catch (Exception e) { t.rollback(); throw new TransactionFailure(e.getMessage(), e);
final protected void rollback() { if (t != null) { t.rollback(); } }
private static void commit(final Transaction t) throws TransactionFailure { try { t.commit(); } catch (final RetryableException e) { t.rollback(); throw new TransactionFailure(e.getMessage(), e); } catch (final TransactionFailure e) { //cdebug("failure, not retryable..."); t.rollback(); throw e; } }
private void joinTransaction(final Transaction t, final WriteableView writeable) throws TransactionFailure { if (!writeable.join(t)) { t.rollback(); throw new TransactionFailure("Cannot enlist " + writeable.getProxyType() + " in transaction", null); } }
public void registerTenantWithAppInDomainXML( final String appName, final ExtendedDeploymentContext context) throws TransactionFailure { final Transaction t = new Transaction(); try { final AppTenant appTenant_w = writeableTenantForApp( appName, t); appTenant_w.setContextRoot(context.getAppProps().getProperty(ServerTags.CONTEXT_ROOT)); appTenant_w.setTenant(context.getTenant()); t.commit(); } catch (TransactionFailure ex) { t.rollback(); throw ex; } catch (Throwable ex) { t.rollback(); throw new TransactionFailure(ex.getLocalizedMessage(), ex); } }
public void registerTenantWithAppInDomainXML( final String appName, final ExtendedDeploymentContext context) throws TransactionFailure { final Transaction t = new Transaction(); try { final AppTenant appTenant_w = writeableTenantForApp( appName, t); appTenant_w.setContextRoot(context.getAppProps().getProperty(ServerTags.CONTEXT_ROOT)); appTenant_w.setTenant(context.getTenant()); t.commit(); } catch (TransactionFailure ex) { t.rollback(); throw ex; } catch (Throwable ex) { t.rollback(); throw new TransactionFailure(ex.getLocalizedMessage(), ex); } }
WriteableView writeable = getWriteableView(readableView, source); if (!writeable.join(t)) { t.rollback(); throw new TransactionFailure("Cannot enlist " + source.getProxyType() + " in transaction", null); t.rollback(); throw e; } catch (Exception e) { t.rollback(); throw new TransactionFailure(e.getMessage(), e); System.out.println("Retryable..."); t.rollback(); throw new TransactionFailure(e.getMessage(), e); } catch (TransactionFailure e) { System.out.println("failure, not retryable..."); t.rollback(); throw e;
for (WriteableView view : views) { if (!view.join(t)) { t.rollback(); throw new TransactionFailure("Cannot enlist " + view.getMasterView().getProxyType() + " in transaction", null); System.out.println("Retryable..."); t.rollback(); return null; } catch (TransactionFailure e) { t.rollback(); throw e; t.rollback(); Throwable throwable = e.getCause(); if (throwable instanceof PropertyVetoException) throw new TransactionFailure(throwable.toString(), throwable); t.rollback(); throw e; } catch (Exception e) { t.rollback(); throw new TransactionFailure(e.getMessage(), e);
WriteableView writeable = getWriteableView(readableView, source); if (!writeable.join(t)) { t.rollback(); throw new TransactionFailure("Cannot enlist " + source.getProxyType() + " in transaction", null); t.rollback(); throw e; } catch (Exception e) { t.rollback(); throw new TransactionFailure(e.getMessage(), e); System.out.println("Retryable..."); t.rollback(); throw new TransactionFailure(e.getMessage(), e); } catch (TransactionFailure e) { System.out.println("failure, not retryable..."); t.rollback(); throw e;
WriteableView writeable = getWriteableView(readableView, source); if (!writeable.join(t)) { t.rollback(); throw new TransactionFailure("Cannot enlist " + source.getProxyType() + " in transaction", null); t.rollback(); throw e; } catch (Exception e) { t.rollback(); throw new TransactionFailure(e.getMessage(), e); System.out.println("Retryable..."); t.rollback(); throw new TransactionFailure(e.getMessage(), e); } catch (TransactionFailure e) { System.out.println("failure, not retryable..."); t.rollback(); throw e;
WriteableView writeable = getWriteableView(readableView, source); if (!writeable.join(t)) { t.rollback(); throw new TransactionFailure("Cannot enlist " + source.getProxyType() + " in transaction", null); t.rollback(); throw e; } catch (Exception e) { t.rollback(); throw new TransactionFailure(e.getMessage(), e); System.out.println("Retryable..."); t.rollback(); throw new TransactionFailure(e.getMessage(), e); } catch (TransactionFailure e) { System.out.println("failure, not retryable..."); t.rollback(); throw e;
public Transaction prepareAppConfigChanges(final DeploymentContext context) throws TransactionFailure { final Properties appProps = context.getAppProps(); final DeployCommandParameters deployParams = context.getCommandParameters(DeployCommandParameters.class); Transaction t = new Transaction(); try { // prepare the application element ConfigBean newBean = ((ConfigBean)ConfigBean.unwrap(applications)).allocate(Application.class); Application app = newBean.createProxy(); Application app_w = t.enroll(app); setInitialAppAttributes(app_w, deployParams, appProps, context); context.addTransientAppMetaData(ServerTags.APPLICATION, app_w); } catch(TransactionFailure e) { t.rollback(); throw e; } catch (Exception e) { t.rollback(); throw new TransactionFailure(e.getMessage(), e); } return t; }
public Transaction prepareAppConfigChanges(final DeploymentContext context) throws TransactionFailure { final Properties appProps = context.getAppProps(); final DeployCommandParameters deployParams = context.getCommandParameters(DeployCommandParameters.class); Transaction t = new Transaction(); try { // prepare the application element ConfigBean newBean = ((ConfigBean)ConfigBean.unwrap(applications)).allocate(Application.class); Application app = newBean.createProxy(); Application app_w = t.enroll(app); setInitialAppAttributes(app_w, deployParams, appProps, context); context.addTransientAppMetaData(ServerTags.APPLICATION, app_w); } catch(TransactionFailure e) { t.rollback(); throw e; } catch (Exception e) { t.rollback(); throw new TransactionFailure(e.getMessage(), e); } return t; }
transaction.rollback(); Logger logger = LogDomains.getLogger(LbConfig.class, LogDomains.ADMIN_LOGGER);
transaction.rollback(); Logger logger = LogDomains.getLogger(LbConfig.class, LogDomains.ADMIN_LOGGER);
t.rollback(); throw new RuntimeException("Error upgrading application", ex);
t.rollback(); throw new RuntimeException("Error upgrading application", ex);