Package javax.jdo

Examples of javax.jdo.JDOFatalDataStoreException


  }
  public RuntimeException newFatalDataStoreRuntimeException(String msg) {
    return new JDOFatalDataStoreException(msg);
  }
  public RuntimeException newFatalDataStoreRuntimeException(Throwable nested) {
    return new JDOFatalDataStoreException("", nested);
  }
View Full Code Here


          tx.setRollbackOnly();
          txControl.setVoidCallable(1);
          tx.getRollbackOnly();
          txControl.setReturnValue(true, 1);
          tx.commit();
          txControl.setThrowable(new JDOFatalDataStoreException(), 1);
          tx.isActive();
          txControl.setReturnValue(false, 1);
          txControl.replay();

          return tt.execute(new TransactionCallback() {
View Full Code Here

    }

    try {
      createTemplate().execute(new JdoCallback() {
        public Object doInJdo(PersistenceManager pm) {
          throw new JDOFatalDataStoreException();
        }
      });
      fail("Should have thrown JdoResourceFailureException");
    }
    catch (JdoResourceFailureException ex) {
View Full Code Here

  public void testParticipatingTransactionWithRollbackOnly() {
    given(pmf.getPersistenceManager()).willReturn(pm);
    given(pm.currentTransaction()).willReturn(tx);
    given(tx.isActive()).willReturn(true);
    given(tx.getRollbackOnly()).willReturn(true);
    willThrow(new JDOFatalDataStoreException()).given(tx).commit();

    PlatformTransactionManager tm = new JdoTransactionManager(pmf);
    final TransactionTemplate tt = new TransactionTemplate(tm);
    final List l = new ArrayList();
    l.add("test");
View Full Code Here

            if (jpe.isFatal())
            {
                //sadly JDOFatalDataStoreException dont allow nested exceptions and failed objects together
                if (jpe.getFailedObject() != null)
                {
                    return new JDOFatalDataStoreException(jpe.getMessage(), jpe.getFailedObject());
                }
                else if (jpe.getNestedExceptions() != null)
                {
                    return new JDOFatalDataStoreException(jpe.getMessage(), jpe.getNestedExceptions());
                }
                else
                {
                    return new JDOFatalDataStoreException(jpe.getMessage(), jpe);
                }
            }
            else
            {
                if (jpe.getNestedExceptions() != null)
View Full Code Here

TOP

Related Classes of javax.jdo.JDOFatalDataStoreException

Copyright © 2018 www.massapicom. 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.