Package org.sdnplatform.sync.error

Examples of org.sdnplatform.sync.error.PersistException


        this.dataSource = dataSource;

        try {
            initTable();
        } catch (SQLException sqle) {
            throw new PersistException("Could not initialize persistent storage",
                                       sqle);
        }
    }
View Full Code Here


            dbConnection = getConnection();
            stmt = dbConnection.prepareStatement(getSql(SELECT_KEY));
            return doSelect(stmt, getKeyAsString(key));

        } catch (Exception e) {
            throw new PersistException("Could not retrieve key" +
                    " from database",
                    e);
        } finally {
            cleanupSQL(dbConnection, stmt);
        }
View Full Code Here

            } catch (SyncException e) {
                dbConnection.rollback();
                throw e;
            } catch (Exception e) {
                dbConnection.rollback();
                throw new PersistException("Could not retrieve key from database",
                                           e);
            } finally {
                cleanupSQL(dbConnection, stmt, update);
            }
        } catch (SQLException e) {
            cleanupSQL(dbConnection);
            throw new PersistException("Could not clean up", e);
        }
    }
View Full Code Here

                    if (stmt != null)
                        stmt.close();
                }
            }
        } catch (SQLException e) {
            throw new PersistException("Could not close statement", e);
        } finally {
            try {
                if (dbConnection != null && !dbConnection.isClosed())
                    dbConnection.close();
            } catch (SQLException e) {
                throw new PersistException("Could not close connection", e);
            }
        }
    }
View Full Code Here

                    hasNextSet = false;
                    return new Pair<ByteArray,
                                    List<Versioned<byte[]>>>(key, vlist);
                } catch (Exception e) {
                    throw new SyncRuntimeException("Error in DB Iterator",
                                                   new PersistException(e));
                }
            } else {
                throw new NoSuchElementException();
            }
        }
View Full Code Here

TOP

Related Classes of org.sdnplatform.sync.error.PersistException

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.