Package org.apache.excalibur.source

Examples of org.apache.excalibur.source.SourceException


            return new ByteArrayInputStream(new byte[0]);
        } catch (SQLException e) {
            String msg = "Cannot retrieve content from " + this.systemId;
            getLogger().error(msg, e);
            // IOException would be more adequate, but SourceException is cascaded...
            throw new SourceException(msg, e);
        } finally {
            try {
                if (stmt != null) {
                    stmt.close();
                }
View Full Code Here


                datasource = (DataSourceComponent)selector.select(this.datasourceName);

            } catch (Exception e) {
                String msg = "Cannot get datasource '" + this.datasourceName + "'";
                getLogger().error(msg);
                throw new SourceException(msg, e);
            }

            try {
                return datasource.getConnection();
            } catch (Exception e) {
                String msg = "Cannot get connection for datasource '" + this .datasourceName + "'";
                getLogger().error(msg);
                throw new SourceException(msg, e);
            }

        } finally {
            if (datasource != null) {
                selector.release(datasource);
View Full Code Here

            stmt.close();
            return (SourceProperty[]) properties.toArray(
                new SourceProperty[properties.size()]);
        }
        catch (SQLException e) {
            throw new SourceException("Error retrieving properties from database",e);
        }
        finally {
            if (connection != null) {
                try {
                    connection.close();
View Full Code Here

            result.close();
            stmt.close();
            return property;
        }
        catch (SQLException e) {
            throw new SourceException("Error retrieving property from database",e);
        }
        finally {
            if (connection != null) {
                try {
                    connection.close();
View Full Code Here

            if (m_cache != null && count > 0) {
                m_cache.processEvent(new NameValueEvent(m_eventName,source.getURI()));
            }
        }
        catch (SQLException e) {
            throw new SourceException("Error setting property",e);
        }
        finally {
            if (connection != null) {
                try {
                    connection.close();
View Full Code Here

            if (m_cache != null && count > 0) {
                m_cache.processEvent(new NameValueEvent(m_eventName,source.getURI()));
            }
        }
        catch (SQLException e) {
            throw new SourceException("Error removing propery",e);
        }
        finally {
            if (connection != null) {
                try {
                    connection.close();
View Full Code Here

                if (cnx != null) {
                    cnx.close();
                }
            } catch(SQLException sqle2) {
                // PITA
                throw new SourceException("Cannot close connection", sqle2);
            }

            // IOException would be more adequate, but ProcessingException is cascaded...
            throw new SourceException(msg, sqle);
        }
    }
View Full Code Here

                datasource = (DataSourceComponent)selector.select(this.datasourceName);

            } catch(Exception e) {
                String msg = "Cannot get datasource '" + this.datasourceName + "'";
                getLogger().error(msg);
                throw new SourceException(msg, e);
            }

            try {
                return datasource.getConnection();
            } catch(Exception e) {
                String msg = "Cannot get connection for datasource '" + this .datasourceName + "'";
                getLogger().error(msg);
                throw new SourceException(msg, e);
            }

        } finally {
            if (datasource != null) {
                selector.release(datasource);
View Full Code Here

        {
            final StringBuffer message = new StringBuffer();
            message.append( "Exception thrown while creating " );
            message.append( HTTPClientSource.class.getName() );

            throw new SourceException( message.toString(), e );
        }
    }
View Full Code Here

                {
                    fsos.cancel();
                }
                catch ( Exception e )
                {
                    throw new SourceException( "Exception during cancel.", e );
                }
                return;
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.excalibur.source.SourceException

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.