Package javax.jdo

Examples of javax.jdo.JDOException


     * @return The PersistenceManagerFactory
     */
    public PersistenceManagerFactory getPersistenceManagerFactory()
    {
        // To be implemented by subclasses
        throw new JDOException(LOCALISER_JDO.msg("011003"));
    }
View Full Code Here


            }
            catch (ClassNotResolvedException e)
            {
                String msg = LOCALISER_JDO.msg("011009", cls.getName());
                JPOXLogger.JDO.error(msg);
                throw new JDOException(msg);
            }
        }
        else
        {
            if (cmd.isRequiresExtent())
View Full Code Here

                    return new JDOFatalInternalException(jpe.getMessage(), jpe);
                }
            }
            else if (jpe.getNestedExceptions() != null)
            {
                return new JDOException(jpe.getMessage(), jpe.getNestedExceptions());
            }
            else
            {
                return new JDOException(jpe.getMessage(), jpe);
            }
        }
    }
View Full Code Here

            {
                omfContext.getMetaDataManager().initialise(pumd, omfContext.getClassLoaderResolver(null));
            }
            catch (JPOXException jpe)
            {
                throw new JDOException(jpe.getMessage(),jpe);
            }
        }

        if (props != null)
        {
View Full Code Here

            tx.commit();
        } catch (JDOUserException e) {
            if (positive) {
                String msg = "JDOUserException thrown while executing query:\n" +
                        singleStringQuery;
                throw new JDOException(msg, e);
            }
        } catch (JDOException e) {
            String msg = "JDOException thrown while executing query:\n" +
                    singleStringQuery;
            throw new JDOException(msg, e);
        } finally {
            if (tx.isActive()) {
                tx.rollback();
            }
        }
View Full Code Here

        }
    }

    /** Closes the pmf stored in this instance. */
    protected void closePMF() {
        JDOException failure = null;
        while (pmf != null) {
            try {
                if (!pmf.isClosed())
                    pmf.close();
                pmf = null;
View Full Code Here

        String assertionFailure, JDOException ex) {
        Throwable[] nesteds = ex.getNestedExceptions();
        int numberOfExceptions = nesteds==null ? 0 : nesteds.length;
        PersistenceManager[] result = new PersistenceManager[numberOfExceptions];
        for (int i = 0; i < numberOfExceptions; ++i) {
            JDOException exc = (JDOException)nesteds[i];
            Object failedObject = exc.getFailedObject();
            if (exc.getFailedObject() instanceof PersistenceManager) {
                result[i] = (PersistenceManager)failedObject;
            } else {
                fail(assertionFailure,
                     "Unexpected failed object of type: " +
                     failedObject.getClass().getName());
View Full Code Here

    protected PersistenceManager[] getFailedPersistenceManagers(JDOException ex) {
        Throwable[] nesteds = ex.getNestedExceptions();
        int numberOfExceptions = nesteds==null ? 0 : nesteds.length;
        PersistenceManager[] result = new PersistenceManager[numberOfExceptions];
        for (int i = 0; i < numberOfExceptions; ++i) {
            JDOException exc = (JDOException)nesteds[i];
            Object failedObject = exc.getFailedObject();
            if (exc.getFailedObject() instanceof PersistenceManager) {
                result[i] = (PersistenceManager)failedObject;
            } else {
                fail(ASSERTION_FAILED,
                     "Unexpected failed object of type: " +
                     failedObject.getClass().getName());
View Full Code Here

                pmf = (PersistenceManagerFactory) pmfClass.newInstance();
                if (supportedOptions == null) {
                    supportedOptions = pmf.supportedOptions();
                }
            } catch (ClassNotFoundException ex) {
                throw new JDOException("Cannot find PMF class '" + name + "'.",
                                       ex);
            } catch (InstantiationException ex) {
                throw new JDOException("Cannot instantiate PMF class '" +
                                       name + "'.", ex);
            } catch (IllegalAccessException ex) {
                throw new JDOException("Cannot access PMF class '" + name +
                                       "' or its no-arg constructor.", ex);
            }
        }
        return pmf;
    }
View Full Code Here

        }
    }

    /** Closes the pmf stored in this instance. */
    public static void closePMF() {
        JDOException failure = null;
        while (pmf != null) {
            try {
                if (!pmf.isClosed())
                    pmf.close();
                pmf = null;
View Full Code Here

TOP

Related Classes of javax.jdo.JDOException

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.