Package org.talend.esb.auxiliary.storage.common.exception

Examples of org.talend.esb.auxiliary.storage.common.exception.PersistencyException


                if (dataFileReader.hasNext()) {
                    restoredContext =  genericToContext(dataFileReader.next());
                }
            } catch (IOException e) {
                LOG.log(Level.SEVERE, "Failed to resotre context. IOException. Error message: " + e.getMessage());
                throw new PersistencyException("Error reading context store file "
                        + filePath + "  Underlying error message is:" + e.getMessage());
            } finally {
                if (dataFileReader != null) {
                    try {
                        dataFileReader.close();
View Full Code Here


                dataFileWriter.create(schema, file);
                GenericRecord record = contextToGeneric(context);
                dataFileWriter.append(record);
            } catch (IOException e) {
                 LOG.log(Level.SEVERE, "Failed to sotre context. IOException. Error message: " + e.getMessage());
                throw new PersistencyException("Saving context failed due to error of writing to file " + filePath);
            } finally {
                try {
                    dataFileWriter.close();
                } catch (IOException e) {
                       LOG.log(Level.WARNING, "Failed to close DataFileWriter after storing context. The message is: " + e.getMessage());
View Full Code Here

                node.setProperty(CONTEXT_DATA_PROPERTY_NAME, context);
                session.save();

            } catch (RepositoryException e) {
                LOG.log(Level.SEVERE, "Failed to sotre object. RepositoryException. Error message: " + e.getMessage());
                throw new PersistencyException("Saving object failed due to error " + e.getMessage());
            } finally {
                releaseSession(session);
            }
        }
    }
View Full Code Here

                return (property == null) ? null : property.getString();
            } catch (PathNotFoundException e) {
                return null;
            } catch (RepositoryException e) {
                LOG.log(Level.SEVERE, "Failed to resotre object. RepositoryException. Error message: " + e.getMessage());
                    throw new PersistencyException("Error retrieving auxiliary store node with the key "
                            + key + "  Underlying error message is:" + e.getMessage());
            } finally {
                releaseSession(session);
            }
        }
View Full Code Here

                throw new ObjectNotFoundException(errorMessage);
            } catch (RepositoryException e) {
                String errorMessage = "Attempt to remove object with key: " + key + " failed. "
                        + "RepositoryException. Error message is: " + e.getMessage();
                LOG.log(Level.WARNING, errorMessage);
                throw new PersistencyException(errorMessage);
            } finally {
                 releaseSession(session);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.talend.esb.auxiliary.storage.common.exception.PersistencyException

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.