Package org.objectweb.speedo.api

Examples of org.objectweb.speedo.api.SpeedoRuntimeException


    protected void manageInheritance(String superName) {
        // Verifies inheritance
        String superClass = moClass.getSuperClassName();
        if (superClass != null && !superClass.equals(superName.replace('/', '.'))) {
            throw new SpeedoRuntimeException("Class " + moClass.getFQName() + " has actually " +
                    superName + " as super class, whereas the .jdo file spcifies '"
                    + moClass.getSuperClassName() + "'");
        }
    }
View Full Code Here


            SpeedoField current = (SpeedoField) it.next();
            if (debug) {
                logger.log(BasicLevel.DEBUG, "treat  field " + current.name);
            }
            if (!finder.fillInfo(current)) {
                throw new SpeedoRuntimeException(
                        "Persistent Field " + current.name +
                        " not defined in class " + name);
            }
            if (current.persistenceStatus == SpeedoField.UNKNOWN) {
                current.persistenceStatus =
View Full Code Here

    public void open(Object connectionspec) {
      resetPMOnOpen(connectionspec);
        try {
            tx.activate();
        } catch (PersistenceException e) {
            throw new SpeedoRuntimeException(
                    "Impossible to open this persistence manager", e);
        }
    }
View Full Code Here

        }
        bindPMThread();
        try {
            tpm.close(tx);
        } catch (PersistenceException e) {
            throw new SpeedoRuntimeException(
                    "Impossible to close the persistence manager",
                    ExceptionHelper.getNested(e));
        } finally {
      nbUse--;
            //Forget the information to access to the data store.
View Full Code Here

            return null;
        }
        PersistentObjectItf po = (PersistentObjectItf) o;
        assertPOManager(po);
        if (!po.speedoIsActive()) {
            throw new SpeedoRuntimeException("Non persistent object does not have identifier: " + o);
        }
        try {
            return pnc.encodeAbstract(po.getPName());
        } catch (PException e) {
            throw new SpeedoRuntimeException(
                    "Problem while encoding persistent name.",
                    new Exception[]{ExceptionHelper.getNested(e)});
        }
    }
View Full Code Here

        assertIsOpen();
        bindPMThread();
        try {
            return pnc.decodeAbstract(s, aClass);
        } catch (PException e) {
            throw new SpeedoRuntimeException("Invalid persistent object identifier "
                    + s + " for the class " + aClass, new Exception[]{e});
        }
    }
View Full Code Here

      tpm.prepare(tx);
    } catch (PersistenceException e) {
      Exception ie = ExceptionHelper.getNested(e);
      logger.log(BasicLevel.ERROR,
          "Error during the preparation of the transaction:", ie);
      throw new SpeedoRuntimeException("", ie);
    }
  }
View Full Code Here

    } catch (PersistenceException e) {
      Exception ie = ExceptionHelper.getNested(e);
      logger.log(BasicLevel.ERROR, "Error during the "
          + (commit ? "commit" : "rollback")
          + " of the transaction:", ie);
      throw new SpeedoRuntimeException("", ie);
    } finally {
      closePOManager();
    }
  }
View Full Code Here

            } else {
                //do not reload if present in the cache
                return tpm.readIntention(tx, pn, null).getCacheEntry();
            }
        } catch (PersistenceException e) {
            throw new SpeedoRuntimeException(e);
        } catch (PException e) {
            throw new SpeedoRuntimeException(e);
        }
    }
View Full Code Here

     * Verify the persistence manager is open.
     * @exception SpeedoRuntimeException if the pomanager is closed.
     */
    protected void assertIsOpen() {
        if (nbUse == 0)
            throw new SpeedoRuntimeException("The persistent manager is closed.");
    }
View Full Code Here

TOP

Related Classes of org.objectweb.speedo.api.SpeedoRuntimeException

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.