Package org.objectweb.perseus.persistence.api

Examples of org.objectweb.perseus.persistence.api.PersistenceException


            } else if (e.getCause() != null) {
                ne = new JDOUserException(e.getMessage(), e.getCause());
            } else {
                ne = new JDOUserException(e.getMessage());
            }
            throw new PersistenceException(ne);
        }
    }
View Full Code Here


        if (pc != null) {
            pc.invalidatePrefetchBuffer(thisT);
        }
        logger.log(BasicLevel.DEBUG, "Ending beforeWSPrepare");
        if (exceptions != null) {
            throw new PersistenceException(new SpeedoRuntimeException(
                    "Impossible to prepare instances before flushing",
                    (Exception[]) exceptions.toArray(
                            new Exception[exceptions.size()])));
        }
    }
View Full Code Here

          "Begin a local transaction on the connection: " + connection);
    }
    try {
      connection.setAutoCommit(false);
    } catch (SQLException e) {
      throw new PersistenceException(e);
    }
  }
View Full Code Here

    }
    try {
      connection.commit();
      connection.setAutoCommit(true);
    } catch (SQLException e) {
      throw new PersistenceException(e);
    }
  }
View Full Code Here

    }
    try {
      connection.rollback();
      connection.setAutoCommit(true);
    } catch (SQLException e) {
      throw new PersistenceException(e);
    }
  }
View Full Code Here

          connection = (Connection) mapper.getConnection();
        } else {
          connection = (Connection) mapper.getConnection(cs);
        }
      } catch (PException e) {
        throw new PersistenceException("Impossible to fetch a SQL connection", e);
      }
      if (logger !=null && logger.isLoggable(BasicLevel.DEBUG)) {
        logger.log(BasicLevel.DEBUG, "Allocate a connection: " + connection);
      }
      if (transactional && !txManagedExternaly) {
View Full Code Here

        logger.log(BasicLevel.DEBUG, "Close the connection: " + connection);
      }
      try {
        mapper.closeConnection(connection);
      } catch (PException e) {
        throw new PersistenceException(e);
      } finally {
        connection = null;
      }
    }
  }
View Full Code Here

                    }
                }
            }
            return oid;
        } catch (PException e) {
            throw new PersistenceException(e);
        }
    }
View Full Code Here

                    }
                }
            }
            return oid;
        } catch (PException e) {
            throw new PersistenceException(e);
        }
    }
View Full Code Here

                    "unexport ctx=" + context + " / oid=" + oid);
        }
        try {
            ((PName) oid).unexport(context);
        } catch (PException e) {
            throw new PersistenceException(e);
        }
      registerUnexport(context.getWorkingSet(), oid);
    }
View Full Code Here

TOP

Related Classes of org.objectweb.perseus.persistence.api.PersistenceException

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.