Package javax.jdo

Examples of javax.jdo.JDOException


    private void checkMCFStarted() {
    if (!mcf.started) {
      try {
        mcf.start();
      } catch (ResourceException e) {
        throw new JDOException("JDO Connector: cannot initialize the ManagedConnectionFactory.", e);
      }
    }
    }
View Full Code Here


      // The connection is already closed
      return;
    }
        if (localTransaction != null) {
            if (!managedConnection.localTransactionTerminated()) {
                throw new JDOException("JDO Connector: cannot close connection while a LocalTransaction is still active.");
            }
        }
        try {
            managedConnection.dissociateConnection(this);
        } catch (ResourceException e) {
            throw new JDOException("JDO Connector: problem while closing a connection.", e);
        } finally {
            localTransaction = null;
            managedConnection = null;
        }
  }
View Full Code Here

        return managedConnection == null;
    }

    public Transaction currentTransaction() {
        if (managedConnection == null) {
            throw new JDOException(NO_ACTIVE_CONNECTION);
        }
        //if transaction mode is not normal, return this
        if (connectionFactory.getTransactionMode() != SpeedoProperties.TRANSACTION_BMODE_NORMAL) {
          if(connectionFactory.getTransactionMode() == SpeedoProperties.TRANSACTION_BMODE_UT) {
            try {
              if (userTransaction == null) {
                Context ic = new InitialContext();
                userTransaction = (UserTransaction) ic.lookup("javax.transaction.UserTransaction");
              }
              logger.log(BasicLevel.DEBUG, "UserTransaction is used.");
            } catch (Exception e) {
              throw new JDOException("Error with JTA UserTransaction", e);
        }
          }
          return this;
        } else {
          return ((JDOPOManagerItf) managedConnection.getPOManager()).currentTransaction();
View Full Code Here

        }
    }

    public void evict(Object o) {
        if (managedConnection == null) {
            throw new JDOException(NO_ACTIVE_CONNECTION);
        }
        ((JDOPOManagerItf) managedConnection.getPOManager()).evict(o);
    }
View Full Code Here

        ((JDOPOManagerItf) managedConnection.getPOManager()).evict(o);
    }

    public void evictAll(Object[] objects) {
        if (managedConnection == null) {
            throw new JDOException(NO_ACTIVE_CONNECTION);
        }
        ((JDOPOManagerItf) managedConnection.getPOManager()).evictAll(objects);
    }
View Full Code Here

        ((JDOPOManagerItf) managedConnection.getPOManager()).evictAll(objects);
    }

    public void evictAll(Collection collection) {
        if (managedConnection == null) {
            throw new JDOException(NO_ACTIVE_CONNECTION);
        }
        ((JDOPOManagerItf) managedConnection.getPOManager()).evictAll(collection);
    }
View Full Code Here

        ((JDOPOManagerItf) managedConnection.getPOManager()).evictAll(collection);
    }

    public void evictAll() {
        if (managedConnection == null) {
            throw new JDOException(NO_ACTIVE_CONNECTION);
        }
        ((JDOPOManagerItf) managedConnection.getPOManager()).evictAll();
    }
View Full Code Here

        ((JDOPOManagerItf) managedConnection.getPOManager()).evictAll();
    }

    public void refresh(Object o) {
        if (managedConnection == null) {
            throw new JDOException(NO_ACTIVE_CONNECTION);
        }
        ((JDOPOManagerItf) managedConnection.getPOManager()).refresh(o);
    }
View Full Code Here

        ((JDOPOManagerItf) managedConnection.getPOManager()).refresh(o);
    }

    public void refreshAll(Object[] objects) {
        if (managedConnection == null) {
            throw new JDOException(NO_ACTIVE_CONNECTION);
        }
        ((JDOPOManagerItf) managedConnection.getPOManager()).refreshAll(objects);
    }
View Full Code Here

        ((JDOPOManagerItf) managedConnection.getPOManager()).refreshAll(objects);
    }

    public void refreshAll(Collection collection) {
        if (managedConnection == null) {
            throw new JDOException(NO_ACTIVE_CONNECTION);
        }
        ((JDOPOManagerItf) managedConnection.getPOManager()).refreshAll(collection);
    }
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.