Package org.rhq.core.db.upgrade

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


        String storageNodeAddress, String version) throws Exception {
        Connection connection = null;
        try {
            connection = DbUtil.getConnection(connectionUrl, username, password);
            StorageNodeVersionColumnUpgrader versionColumnUpgrader = new StorageNodeVersionColumnUpgrader();
            versionColumnUpgrader.upgrade(connection, version);
            int rowsUpdated = versionColumnUpgrader.setVersionForNodeWithAddress(connection, version,
                storageNodeAddress);
            if (1 != rowsUpdated) {
                throw new IllegalStateException("Expected [1] StorageNode update but updated [" + rowsUpdated + "].");
            }
View Full Code Here


    public void createStorageNodeVersionColumnIfNeeded() {
        Connection connection = null;
        try {
            connection = dataSource.getConnection();
            StorageNodeVersionColumnUpgrader versionColumnUpgrader = new StorageNodeVersionColumnUpgrader();
            versionColumnUpgrader.upgrade(connection, RHQ_VERSION);
            versionColumnUpgrader.setVersionForAllNodes(connection, RHQ_VERSION);
        } catch (Exception e) {
            LOG.error("Could not check storage node version column", e);
        } finally {
            JDBCUtil.safeClose(connection);
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.