Package org.apache.ojb.broker

Examples of org.apache.ojb.broker.PersistenceBrokerException


            out.close();
            conn.disconnect();   
        }
        catch (Throwable t)
        {
            throw new PersistenceBrokerException(t);
        }
        return result;
  }
View Full Code Here


    ois.close();
    out.close();
    conn.disconnect();
    if (! result.booleanValue())
    {
      throw new PersistenceBrokerException("could not add reader!");   
    }
    }
View Full Code Here

    ois.close();
    out.close();
    conn.disconnect();
    if (! result.booleanValue())
    {
      throw new PersistenceBrokerException("could not remove reader!");   
    }

    }
View Full Code Here

    ois.close();
    out.close();
    conn.disconnect();
    if (! result.booleanValue())
    {
      throw new PersistenceBrokerException("could not remove writer!");   
    }

  }
View Full Code Here

    ois.close();
    out.close();
    conn.disconnect();
    if (! result.booleanValue())
    {
      throw new PersistenceBrokerException("could not remove writer!");   
    }

  }
View Full Code Here

    ois.close();
    out.close();
    conn.disconnect();
    if (! result.booleanValue())
    {
      throw new PersistenceBrokerException("could not set writer!");   
    }

  }
View Full Code Here

            }
            catch (PBFactoryException e)
            {
                log.error("Cannot obtain PersistenceBroker from PersistenceBrokerFactory, " +
                        "found PBKey was " + curDB.getPBKey(), e);
                throw new PersistenceBrokerException(e);
            }
        }
        return broker;
    }
View Full Code Here

            else
            {
                con = this.connectionFactory.lookupConnection(jcd);
            }
           
            if (con == null) throw new PersistenceBrokerException("Cannot get connection for " + jcd);
            if (jcd.getUseAutoCommit() == JdbcConnectionDescriptor.AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE)
            {
                try
                {
                    this.originalAutoCommitState = con.getAutoCommit();
                }
                catch (SQLException e)
                {
                    throw new PersistenceBrokerException("Cannot request autoCommit state on the connection", e);
                }
            }
            if (log.isDebugEnabled()) log.debug("Request new connection from ConnectionFactory: " + con);
        }
View Full Code Here

        catch (LookupException e)
        {
            /**
             * must throw to notify user that we couldn't start a connection
             */
            throw new PersistenceBrokerException("Can't lookup a connection", e);
        }
        if (log.isDebugEnabled()) log.debug("localBegin was called for con " + connection);
        if (jcd.getUseAutoCommit() == JdbcConnectionDescriptor.AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE)
        {
            if (log.isDebugEnabled()) log.debug("Try to change autoCommit state to 'false'");
View Full Code Here

    public void localRollback()
    {
        log.info("Rollback was called, do rollback on current connection " + con);
        if (!this.isInLocalTransaction)
        {
            throw new PersistenceBrokerException("Not in transaction, cannot abort");
        }
        try
        {
            //truncate the local transaction
            this.isInLocalTransaction = false;
View Full Code Here

TOP

Related Classes of org.apache.ojb.broker.PersistenceBrokerException

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.