Package uk.gov.nationalarchives.droid.profile.datasource

Examples of uk.gov.nationalarchives.droid.profile.datasource.DerbyPooledDataSource


     * {@inheritDoc}
     */
    @Override
    public void freezeDatabase(String profileId) {
        ApplicationContext ctx = profileInstanceManagers.get(profileId);
        DerbyPooledDataSource dataSource = (DerbyPooledDataSource) ctx
                .getBean(DATA_SOURCE_BEAN_NAME);
        try {
            dataSource.freeze();
            //CHECKSTYLE:OFF no choice here - the datasource throws Exception
        } catch (Exception e) {
            // CHECKSTYLE:ON
            throw new RuntimeException(e.getMessage(), e);
        }
View Full Code Here


     * {@inheritDoc}
     */
    @Override
    public void thawDatabase(String profileId) {
        ApplicationContext ctx = profileInstanceManagers.get(profileId);
        DerbyPooledDataSource dataSource = (DerbyPooledDataSource) ctx
                .getBean(DATA_SOURCE_BEAN_NAME);
        try {
            dataSource.thaw();
            //CHECKSTYLE:OFF no choice here - the datasource throws Exception
        } catch (Exception ex) {
            // CHECKSTYLE:ON
            Logger.getLogger(SpringProfileInstanceFactory.class.getName()).log(Level.SEVERE, null, ex);
        }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public Connection getConnection(String profileId) {
        ApplicationContext ctx = profileInstanceManagers.get(profileId);
        DerbyPooledDataSource dataSource = (DerbyPooledDataSource) ctx
                .getBean(DATA_SOURCE_BEAN_NAME);
        try {
            return dataSource.getConnection();
        } catch (SQLException e) {
            throw new ProfileException(e.getMessage(), e);
        }
    }
View Full Code Here

TOP

Related Classes of uk.gov.nationalarchives.droid.profile.datasource.DerbyPooledDataSource

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.