Package org.apache.ojb.broker.accesslayer

Examples of org.apache.ojb.broker.accesslayer.LookupException


        }
      }
      return dataSource.getConnection();
    }
    catch (Exception ex) {
      throw new LookupException("Could not obtain connection from data source", ex);
    }
  }
View Full Code Here


     * @see org.apache.ojb.broker.accesslayer.ConnectionFactory#lookupConnection(org.apache.ojb.broker.metadata.JdbcConnectionDescriptor)
     */
    public Connection lookupConnection(final JdbcConnectionDescriptor conDesc)
    throws LookupException {
        if (ConnectionFactoryImpl.manager == null) {
            throw new LookupException("ConnectionFactoryImpl is not initialized! Please check your cocoon.xconf");
        }

        try {
            return ((DataSourceComponent) ConnectionFactoryImpl.datasources.select(conDesc.getJcdAlias())).getConnection();
        } catch (final ServiceException e) {
            throw new LookupException("Cannot lookup DataSource " +
                                      conDesc.getJcdAlias(), e);
        } catch (final SQLException e) {
            throw new LookupException("Cannot get connection from DataSource " +
                                      conDesc.getJcdAlias(), e);
        }
    }
View Full Code Here

     * @see org.apache.ojb.broker.accesslayer.ConnectionFactory#lookupConnection(org.apache.ojb.broker.metadata.JdbcConnectionDescriptor)
     */
    public Connection lookupConnection(final JdbcConnectionDescriptor conDesc)
        throws LookupException {
        if (null == ConnectionFactoryAvalonDataSource.manager) {
            throw new LookupException("ServiceManager was not set!");
        }

        try {
            return ((DataSourceComponent)ConnectionFactoryAvalonDataSource.dbselector.select(conDesc.getJcdAlias())).getConnection();
        } catch (final ServiceException se) {
            throw new LookupException("Cannot lookup DataSources named " + conDesc.getJcdAlias(), se);
        } catch (final SQLException sqle) {
            throw new LookupException("Cannot get Connection from DataSource named " +
                                      conDesc.getDbAlias(), sqle);
        }
    }
View Full Code Here

     * @see org.apache.ojb.broker.accesslayer.ConnectionFactory#lookupConnection(org.apache.ojb.broker.metadata.JdbcConnectionDescriptor)
     */
    public Connection lookupConnection(final JdbcConnectionDescriptor conDesc)
        throws LookupException {
        if (null == ConnectionFactoryAvalonDataSource.manager) {
            throw new LookupException("ServiceManager was not set!");
        }

        try {
            return ((DataSourceComponent)ConnectionFactoryAvalonDataSource.dbselector.select(conDesc.getJcdAlias())).getConnection();
        } catch (final ServiceException se) {
            throw new LookupException("Cannot lookup DataSources named " + conDesc.getJcdAlias(), se);
        } catch (final SQLException sqle) {
            throw new LookupException("Cannot get Connection from DataSource named " +
                                      conDesc.getDbAlias(), sqle);
        }
    }
View Full Code Here

    //

    public Connection lookupConnection(final JdbcConnectionDescriptor conDesc)
    throws LookupException {
        if (ConnectionFactoryImpl.manager == null) {
            throw new LookupException("ConnectionFactoryImpl is not initialized! Please check your cocoon.xconf");
        }

        try {
            return ((DataSourceComponent) ConnectionFactoryImpl.datasources.select(conDesc.getJcdAlias())).getConnection();
        } catch (final ServiceException e) {
            throw new LookupException("Cannot lookup DataSource " +
                                      conDesc.getJcdAlias(), e);
        } catch (final SQLException e) {
            throw new LookupException("Cannot get connection from DataSource " +
                                      conDesc.getJcdAlias(), e);
        }
    }
View Full Code Here

     * @see org.apache.ojb.broker.accesslayer.ConnectionFactory#lookupConnection(org.apache.ojb.broker.metadata.JdbcConnectionDescriptor)
     */
    public Connection lookupConnection(final JdbcConnectionDescriptor conDesc)
        throws LookupException {
        if (null == ConnectionFactoryAvalonDataSource.manager) {
            throw new LookupException("ServiceManager was not set!");
        }

        try {
            return ((DataSourceComponent)ConnectionFactoryAvalonDataSource.dbselector.select(conDesc.getJcdAlias())).getConnection();
        } catch (final ServiceException se) {
            throw new LookupException("Cannot lookup DataSources named " + conDesc.getJcdAlias(), se);
        } catch (final SQLException sqle) {
            throw new LookupException("Cannot get Connection from DataSource named " +
                                      conDesc.getDbAlias(), sqle);
        }
    }
View Full Code Here

    //

    public Connection lookupConnection(final JdbcConnectionDescriptor conDesc)
    throws LookupException {
        if (ConnectionFactoryImpl.manager == null) {
            throw new LookupException("ConnectionFactoryImpl is not initialized! Please check your cocoon.xconf");
        }

        try {
            return ((DataSourceComponent) ConnectionFactoryImpl.datasources.select(conDesc.getJcdAlias())).getConnection();
        } catch (final ServiceException e) {
            throw new LookupException("Cannot lookup DataSource " +
                                      conDesc.getJcdAlias(), e);
        } catch (final SQLException e) {
            throw new LookupException("Cannot get connection from DataSource " +
                                      conDesc.getJcdAlias(), e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.ojb.broker.accesslayer.LookupException

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.