Package javax.jdo

Examples of javax.jdo.JDOFatalException


        Throwable problem = group.getUncaughtException(t);
        if (problem != null) {
            if (problem instanceof AssertionFailedError)
                throw (AssertionFailedError)problem;
            else
                throw new JDOFatalException( "Thread " + t.getName()+
                                             " results in exception ", problem);
        }
    }
View Full Code Here


            setTearDownThrowable("cleanupPM", t);
        }
       
        if ((pmf == null || pmf.isClosed()) &&
            (this.tearDownInstances.size() > 0 || this.tearDownClasses.size() > 0))
            throw new JDOFatalException ("PMF must not be nullified or closed when tear down instances and /or classes have been added.");
       
        if (pmf != null && pmf.isClosed())
            pmf = null;
       
        try {
            if (cleanupData) {
                localTearDown();
            }
        }
        catch (Throwable t) {
            setTearDownThrowable("localTearDown", t);
        }
       
        if (closePMFAfterEachTest) {
            try {
                closePMF();
            }
            catch (Throwable t) {
                setTearDownThrowable("closePMF", t);
            }
        }
       
        if (this.tearDownThrowable != null) {
            Throwable t = this.tearDownThrowable;
            this.tearDownThrowable = null;
            if (testSucceeded) {
                // runTest succeeded, but this method threw exception => error
                throw new JDOFatalException("Exception during tearDown", t);
            }
        }
    }
View Full Code Here

            JDOException exc = (JDOException)nesteds[i];
            Object failedObject = exc.getFailedObject();
            if (exc.getFailedObject() instanceof PersistenceManager) {
                result[i] = (PersistenceManager)failedObject;
            } else {
                throw new JDOFatalException(assertionFailure,
                     "Unexpected failed object of type: " +
                     failedObject.getClass().getName());
            }
        }
        return result;
View Full Code Here

            resultStream = new PrintStream(new FileOutputStream(file));
            for (Iterator it = supportedOptions.iterator(); it.hasNext();) {
                resultStream.println((String)it.next());
            }
        } catch (FileNotFoundException e) {
            throw new JDOFatalException(
                "dumpSupportedOptions: cannot create file " + file.getName(), e);
        } finally {
            if (resultStream != null)
                resultStream.close();
        }
View Full Code Here

            Throwable problem = group.getUncaughtException(t);
            if (problem != null) {
                if (problem instanceof AssertionFailedError)
                    throw (AssertionFailedError)problem;
                else
                    throw new JDOFatalException( "Thread " + t.getName()+
                                                 " results in exception ", problem);
            }
        }
    }
View Full Code Here

            Throwable problem = group.getUncaughtException(t);
            if (problem != null) {
                if (problem instanceof AssertionFailedError)
                    throw (AssertionFailedError)problem;
                else
                    throw new JDOFatalException( "Thread " + t.getName()+
                                                 " results in exception ", problem);
            }
        }
    }
View Full Code Here

            Throwable problem = group.getUncaughtException(t);
            if (problem != null) {
                if (problem instanceof AssertionFailedError)
                    throw (AssertionFailedError)problem;
                else
                    throw new JDOFatalException( "Thread " + t.getName()+
                                                 " results in exception ", problem);
            }
        }
    }
View Full Code Here

            Throwable problem = group.getUncaughtException(t);
            if (problem != null) {
                if (problem instanceof AssertionFailedError)
                    throw (AssertionFailedError)problem;
                else
                    throw new JDOFatalException( "Thread " + t.getName()+
                                                 " results in exception ", problem);
            }
        }
    }
View Full Code Here

            Throwable throwable = (Throwable)entry.getValue();
            String message = "Uncaught exception " + throwable + " in thread " + thread;
            if( throwable instanceof AssertionFailedError )
                fail(ASSERTION_FAILED, message);
            else
                throw new JDOFatalException(message, throwable);
        }
       
    }
View Full Code Here

                    oos.writeObject(obj);
                    ois = new ObjectInputStream(new ByteArrayInputStream(
                            byteArrayOutputStream.toByteArray()));
                    result = ois.readObject();
                } catch (IOException e) {
                    throw new JDOFatalException(e.getMessage(), e);
                } catch (ClassNotFoundException e) {
                    throw new JDOFatalException(e.getMessage(), e);
                } finally {
                    try {
                        if (oos != null) {
                            oos.close();
                        }
                        if (ois != null) {
                            ois.close();
                        }
                    } catch (IOException e) {
                        throw new JDOFatalException(e.getMessage(), e);
                    }
                }
                break;  
               
            default:
View Full Code Here

TOP

Related Classes of javax.jdo.JDOFatalException

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.