Package org.rhq.core.db.upgrade

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


    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


        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) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.