Examples of SystemException


Examples of com.arjuna.mw.wsas.exceptions.SystemException

    return toReturn;
      }
      catch (NoActivityException ex)
      {
    throw new SystemException(ex.toString());
      }
  }
    }
View Full Code Here

Examples of com.arjuna.wst.SystemException

        eventLog.addEvent(participantName, EventLogEvent.COMPLETE);
        log.info("[BA COORDINATOR COMPL SERVICE] Participant complete() - logged: " + EventLogEvent.COMPLETE);
       
        if(ServiceCommand.isPresent(ServiceCommand.SYSTEM_EXCEPTION_ON_COMPLETE, serviceCommands)) {
            log.info("[BA COORDINATOR COMPL SERVICE] Participant complete() - intentionally throwing " + SystemException.class.getName());
            throw new SystemException("Intentionally throwing system exception to get compensation method on run");
        }
    }
View Full Code Here

Examples of com.googlecode.prolog_cafe.lang.SystemException

    T obj = getOrNull(engine);
    if (obj == null) {
      //unless createValue() is overridden, will return null
      obj = createValue(engine);
      if (obj == null) {
        throw new SystemException("No " + key + " available");
      }
      set(engine, obj);
    }
    return obj;
  }
View Full Code Here

Examples of com.liferay.portal.SystemException

            query.addScalar("Book.title", Type.STRING);
            query.addScalar("max_Transaction__id", Type.LONG);
            System.out.println(qString);
            result = (List<Long>) QueryUtil.list(query, getDialect(), -1, -1);
        } catch (Exception e) {
            throw new SystemException(e);
        } finally {
            closeSession(session);
        }

        return result;
View Full Code Here

Examples of com.liferay.portal.kernel.exception.SystemException

      }

      return 0;
    }
    catch (Exception e) {
      throw new SystemException(e);
    }
    finally {
      closeSession(session);
    }
  }
View Full Code Here

Examples of it.hotel.system.exception.SystemException

    Connection conn = null;
    try {
      conn = this.getDataSource().getConnection();
    } catch (SQLException e) {
      SystemUtils.logThrowable(e, this, "getConnection");
      throw new SystemException("Error in creation of datasource", e);
    }
    return conn;
  }
View Full Code Here

Examples of javax.transaction.SystemException

                  log.trace(error + " " + TxConnectionEventListener.this);

               // Wrap the error to give a reasonable stacktrace since the resource
               // could have been enlisted by a different thread
               if (enlistError == FAILED_TO_ENLIST)
                  throw new SystemException(FAILED_TO_ENLIST + " tx=" + currentTx);
               else
               {
                  SystemException e = new SystemException(error);
                  e.initCause(enlistError);
                  throw e;
               }
            }
            if (enlisted == false)
            {
View Full Code Here

Examples of javax.transaction.SystemException

                  {
                     ConnectionListener cl = null;
                     try
                     {
                        if (tm == null)
                           throw new SystemException("TM is null");

                        tm.begin();

                        long startGetConnection = System.currentTimeMillis();
                        cl = cm.getManagedConnection(subject, cri);
                        cl.enlist();
                        long endGetConnection = System.currentTimeMillis();

                        TxConnectionManagerStressTestCase.this.connectionCount.incrementAndGet();

                        Thread.sleep(sleepTime);

                        if (tm == null)
                           throw new SystemException("TM is null");

                        tm.commit();

                        long startReturnConnection = System.currentTimeMillis();
                        if (!trackByTx)
                        {
                           cl.delist();
                           cm.returnManagedConnection(cl, false);
                        }
                        cl = null;
                        long endReturnConnection = System.currentTimeMillis();
                       
                        duration += (endReturnConnection - startGetConnection);
                        getConnection += (endGetConnection - startGetConnection);
                        returnConnection += (endReturnConnection - startReturnConnection);
                        heldConnection += (startReturnConnection - endGetConnection);
                      }
                      catch (NotSupportedException nse)
                      {
                         TxConnectionManagerStressTestCase.this.log.info("error: iterationCount: " + j + ", connectionCount: " + TxConnectionManagerStressTestCase.this.connectionCount.get() + " " + nse.getMessage());
                         TxConnectionManagerStressTestCase.this.errorCount.incrementAndGet();
                         TxConnectionManagerStressTestCase.this.error = nse;
                         TxConnectionManagerStressTestCase.this.failed = true;
                      }
                      catch (SystemException se)
                      {
                         TxConnectionManagerStressTestCase.this.log.info("error: iterationCount: " + j + ", connectionCount: " + TxConnectionManagerStressTestCase.this.connectionCount.get() + " " + se.getMessage());
                         TxConnectionManagerStressTestCase.this.errorCount.incrementAndGet();
                         TxConnectionManagerStressTestCase.this.error = se;
                         TxConnectionManagerStressTestCase.this.failed = true;
                      }
                      catch (RollbackException rbe)
                      {
                         TxConnectionManagerStressTestCase.this.log.info("error: iterationCount: " + j + ", connectionCount: " + TxConnectionManagerStressTestCase.this.connectionCount.get() + " " + rbe.getMessage());
                         TxConnectionManagerStressTestCase.this.errorCount.incrementAndGet();
                         TxConnectionManagerStressTestCase.this.error = rbe;
                         TxConnectionManagerStressTestCase.this.failed = true;
                      }
                      catch (HeuristicMixedException hme)
                      {
                         TxConnectionManagerStressTestCase.this.log.info("error: iterationCount: " + j + ", connectionCount: " + TxConnectionManagerStressTestCase.this.connectionCount.get() + " " + hme.getMessage());
                         TxConnectionManagerStressTestCase.this.errorCount.incrementAndGet();
                         TxConnectionManagerStressTestCase.this.error = hme;
                         TxConnectionManagerStressTestCase.this.failed = true;
                      }
                      catch (HeuristicRollbackException hre)
                      {
                         TxConnectionManagerStressTestCase.this.log.info("error: iterationCount: " + j + ", connectionCount: " + TxConnectionManagerStressTestCase.this.connectionCount.get() + " " + hre.getMessage());
                         TxConnectionManagerStressTestCase.this.errorCount.incrementAndGet();
                         TxConnectionManagerStressTestCase.this.error = hre;
                         TxConnectionManagerStressTestCase.this.failed = true;
                      }
                      catch (ResourceException re)
                      {
                         TxConnectionManagerStressTestCase.this.log.info("error: iterationCount: " + j + ", connectionCount: " + TxConnectionManagerStressTestCase.this.connectionCount.get() + " " + re.getMessage());
                         TxConnectionManagerStressTestCase.this.errorCount.incrementAndGet();
                         TxConnectionManagerStressTestCase.this.error = re;
                         TxConnectionManagerStressTestCase.this.failed = true;
                      }
                      catch (InterruptedException ie)
                      {
                         break;
                      }
                      finally
                      {
                         if (cl != null)
                            cm.returnManagedConnection(cl, true);

                         try
                         {
                            if (tm == null)
                               throw new SystemException("TM is null");

                            Transaction tx = tm.getTransaction();
                            if (tx != null)
                               log.info("TX STATUS=" + TxUtils.getStatusAsString(tx.getStatus()));
                            if (tx != null && TxUtils.isUncommitted(tx))
View Full Code Here

Examples of javax.transaction.SystemException

      catch (RemoteException e)
      {
         // destroy session gone bad.
         destroySession();
         logCauseException(e);
         throw new SystemException(e.toString());
      }
      catch (Exception e)
      {
         logCauseException(e);
         throw new SystemException(e.toString());
      }
   }
View Full Code Here

Examples of javax.transaction.SystemException

      catch (RemoteException e)
      {
         // destroy session gone bad.
         destroySession();
         logCauseException(e);
         throw new SystemException(e.toString());
      }
      catch(CannotConnectException e)
      {
         // destroy session gone bad.
         destroySession();
         logCauseException(e);
         throw new SystemException(e.toString());
      }     
      catch (Exception e)
      {
         logCauseException(e);
         throw new SystemException(e.toString());
      }
      finally
      {
         info.pop();
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.