Package com.totalchange.jizz.data.blobs

Examples of com.totalchange.jizz.data.blobs.JizzBlobException


                    readFromDbToFile(conn, blobRef);
                }
            });
        } catch (SQLException sEx) {
            logger.error("Error reading Blob with ref " + blobRef, sEx);
            throw new JizzBlobException("Error reading Blob with ref "
                    + blobRef, sEx);
        }
    }
View Full Code Here


                    in.close();
                }
            } catch (IOException ioEx) {
                logger.error("Error writing Blob with ref " + blobRef
                        + " to temp file " + getTempFile(), ioEx);
                throw new JizzBlobException("Error writing Blob with ref "
                        + blobRef + " to temp file " + getTempFile(), ioEx);
            }
        } finally {
            rs.close();
            ps.close();
View Full Code Here

        try {
            return new FileInputStream(getTempFile());
        } catch (IOException ioEx) {
            logger.error("Error creating FileInputStream for temp file "
                    + getTempFile(), ioEx);
            throw new JizzBlobException(
                    "Error creating FileInputStream for temp file "
                            + getTempFile(), ioEx);
        }
    }
View Full Code Here

        try {
            session = em.unwrap(Session.class);
        } catch (Throwable th) {
            logger.error("Failed to unwrap Hibernate Session from JPA "
                    + "EntityManager: " + th.getMessage(), th);
            throw new JizzBlobException("Failed to unwrap Hibernate Session "
                    + "from JPA EntityManager: " + th.getMessage(), th);
        }

        try {
            session.doWork(new org.hibernate.jdbc.Work() {
                @Override
                public void execute(Connection connection) throws SQLException {
                    try {
                        work.execute(connection);
                    } catch (Throwable th) {
                        logger.error(
                                "Error executing JDBC work package: "
                                        + th.getMessage(), th);
                        throw th;
                    }
                }
            });
        } catch (Throwable th) {
            logger.error(
                    "Error executing JDBC work package: " + th.getMessage(), th);
            throw new JizzBlobException("Error executing JDBC work package: "
                    + th.getMessage(), th);
        }
    }
View Full Code Here

                    }
                }
            });
        } catch (SQLException sEx) {
            logger.error("Error deleting JDBC file entry", sEx);
            throw new JizzBlobException(sEx);
        }
    }
View Full Code Here

                ps.close();
                in.close();
            }
        } catch (IOException ioEx) {
            logger.error("Error committing JDBC file " + tmp, ioEx);
            throw new JizzBlobException("Error committing JDBC file " + tmp,
                    ioEx);
        }
    }
View Full Code Here

                    getTempFile());
            return new FileOutputStream(getTempFile());
        } catch (IOException ioEx) {
            logger.error("Error creating FileOutputStream for temp file "
                    + getTempFile(), ioEx);
            throw new JizzBlobException(
                    "Error creating FileOutputStream for temp file "
                            + getTempFile(), ioEx);
        }
    }
View Full Code Here

                    stickInDb(conn);
                }
            });
        } catch (SQLException sEx) {
            logger.error("Error committing JDBC blob", sEx);
            throw new JizzBlobException("Error committing JDBC blob", sEx);
        }

        logger.trace("Committed JDBC file, cleaning up");
        cleanup();
View Full Code Here

            logger.trace("Returning newly created temporary file {}", tempFile);
            return tempFile;
        } catch (IOException ioEx) {
            logger.error("Failed to create temporary file", ioEx);
            throw new JizzBlobException(ioEx);
        }
    }
View Full Code Here

TOP

Related Classes of com.totalchange.jizz.data.blobs.JizzBlobException

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.