Package org.rhq.core.db.upgrade

Examples of org.rhq.core.db.upgrade.ServerVersionColumnUpgrader


    @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
    public void createServerVersionColumnIfNeeded() {
        Connection connection = null;
        try {
            connection = dataSource.getConnection();
            ServerVersionColumnUpgrader versionColumnUpgrader = new ServerVersionColumnUpgrader();
            versionColumnUpgrader.upgrade(connection, RHQ_VERSION);
            versionColumnUpgrader.setVersionForAllServers(connection, RHQ_VERSION);
        } catch (Exception e) {
            LOG.error("Could not check server version column", e);
        } finally {
            JDBCUtil.safeClose(connection);
        }
View Full Code Here


        throws Exception {

        Connection connection = null;
        try {
            connection = getDatabaseConnection(connectionUrl, username, password);
            ServerVersionColumnUpgrader versionColumnUpgrader = new ServerVersionColumnUpgrader();
            versionColumnUpgrader.upgrade(connection, version);
            int rowsUpdated = versionColumnUpgrader.setVersionForServerWithName(connection, version, serverName);
            if (1 != rowsUpdated) {
                throw new IllegalStateException("Expected [1] Server update but updated [" + rowsUpdated + "].");
            }
        } catch (Exception e) {
            throw new RuntimeException("Unable to update Server [" + serverName + "] to version [" + version + "]", e);
View Full Code Here

TOP

Related Classes of org.rhq.core.db.upgrade.ServerVersionColumnUpgrader

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.