Package org.openxri.exceptions

Examples of org.openxri.exceptions.StoreInternalException


      throw(ex);
    } catch (Exception ex) {

      log.error("", ex);
      rollback(session);
      throw new StoreInternalException(ex, "Cannot access database.");
    }

    // run XRD through the CREATE pipeline

    XRD newXRD;

    try {

      if (createPipeline != null) {

        newXRD = createPipeline.execute(this, xrd, null, null, null, authority, true);
      } else {

        newXRD = xrd;
      }
    } catch (Exception ex) {

      log.error("", ex);
      rollback(session);
      throw new StoreInternalException(ex, "Cannot execute pipeline.");
    }

    // start database session

    session = this.getSessionFactory().getCurrentSession();

    // set XRD

    try {

      session.beginTransaction();

      reattach(session, authority);

      authority.setXrd(newXRD);

      session.update(authority);
      session.flush();
      session.getTransaction().commit();
    } catch (Exception ex) {

      log.error("", ex);
      rollback(session);
      throw new StoreInternalException(ex, "Cannot access database.");
    }

    // start database session

    session = this.getSessionFactory().getCurrentSession();

    // create root subsegment

    DbSubSegment subSegment;

    try {

      session.beginTransaction();

      reattach(session, authority);

      subSegment = new DbSubSegment();
      subSegment.setName(name);
      subSegment.setAuthority(authority);

      session.save(subSegment);
      session.flush();
      session.refresh(subSegment);
      session.getTransaction().commit();
    } catch (Exception ex) {

      log.error("", ex);
      rollback(session);
      throw new StoreInternalException(ex, "Cannot access database.");
    }

    // done

    log.trace("Done.");
View Full Code Here


      throw(ex);
    } catch (Exception ex) {

      log.error("", ex);
      rollback(session);
      throw new StoreInternalException(ex, "Cannot access database.");
    }

    log.trace("Done.");
  }
View Full Code Here

      session.getTransaction().commit();
    } catch (Exception ex) {

      log.error("", ex);
      rollback(session);
      throw new StoreInternalException(ex, "Cannot access database.");
    }

    log.trace("Done.");
  }
View Full Code Here

      throw(ex);
    } catch (Exception ex) {

      log.error("", ex);
      rollback(session);
      throw new StoreInternalException(ex, "Cannot access database.");
    }

    // run XRD through the CREATE pipeline

    XRD newXRD;

    try {

      if (createPipeline != null) {

        newXRD = createPipeline.execute(this, xrd, null, parentAuthority, subSegmentName, authority, true);
      } else {

        newXRD = xrd;
      }
    } catch (Exception ex) {

      log.error("", ex);
      rollback(session);
      throw new StoreInternalException(ex, "Cannot execute pipeline.");
    }

    // start database session

    session = this.getSessionFactory().getCurrentSession();

    // set XRD

    try {

      session.beginTransaction();

      reattach(session, authority);

      authority.setXrd(newXRD);

      session.update(authority);
      session.flush();
      session.getTransaction().commit();
    } catch (Exception ex) {

      log.error("", ex);
      rollback(session);
      throw new StoreInternalException(ex, "Cannot access database.");
    }

    // start database session

    session = this.getSessionFactory().getCurrentSession();

    // create subsegment with this authority

    DbSubSegment subSegment;

    try {

      session.beginTransaction();

      reattach(session, parentAuthority);
      reattach(session, authority);

      subSegment = new DbSubSegment();
      subSegment.setParent((DbAuthorityparentAuthority);
      subSegment.setName(subSegmentName);
      subSegment.setAuthority(authority);

      ((DbAuthority) parentAuthority).getChildren().add(subSegment);
      authority.getSubSegments().add(subSegment);

      session.save(subSegment);
      session.flush();
      session.refresh(subSegment);
      session.getTransaction().commit();
    } catch (Exception ex) {

      log.error("", ex);
      rollback(session);
      throw new StoreInternalException(ex, "Cannot access database.");
    }

    // done

    log.trace("Done.");
View Full Code Here

      throw ex;
    } catch (Exception ex) {

      log.error("", ex);
      rollback(session);
      throw new StoreInternalException(ex, "Cannot access database.");
    }

    // done

    log.trace("Done.");
View Full Code Here

      session.getTransaction().commit();
    } catch (Exception ex) {

      log.error("", ex);
      rollback(session);
      throw new StoreInternalException(ex, "Cannot access database.");
    }

    log.trace("Done.");
  }
View Full Code Here

      session.getTransaction().commit();
    } catch (Exception ex) {

      log.error("", ex);
      rollback(session);
      throw new StoreInternalException(ex, "Cannot access database.");
    }

    // done

    log.trace("Done.");
View Full Code Here

      session.getTransaction().commit();
    } catch (Exception ex) {

      log.error("", ex);
      rollback(session);
      throw new StoreInternalException(ex, "Cannot access database.");
    }

    // done

    log.trace("Done.");
View Full Code Here

      session.getTransaction().commit();
    } catch (Exception ex) {

      log.error("", ex);
      rollback(session);
      throw new StoreInternalException(ex, "Cannot access database.");
    }

    // done

    log.trace("Done.");
View Full Code Here

      session.getTransaction().commit();
    } catch (Exception ex) {

      log.error("", ex);
      rollback(session);
      throw new StoreInternalException(ex, "Cannot access database.");
    }

    // done

    log.trace("Done.");
View Full Code Here

TOP

Related Classes of org.openxri.exceptions.StoreInternalException

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.