private void loadProperties() {
        if (disableDatabasePersistence) {
            return;
        }
        Encryptor encryptor = getEncryptor();
        Connection con = null;
        PreparedStatement pstmt = null;
        ResultSet rs = null;
        try {
            con = DbConnectionManager.getConnection();
            pstmt = con.prepareStatement(LOAD_PROPERTIES);
            rs = pstmt.executeQuery();
            while (rs.next()) {
                String name = rs.getString(1);
                String value = rs.getString(2);
                String ivString = rs.getString(4);
                byte[] iv = null;
                if (ivString != null) {
                    try {
                        iv = java.util.Base64.getDecoder().decode(ivString);
                        if (iv.length != 16) {
                            Log.error("Unable to correctly decode iv from string " + ivString);
                            iv = null;
                        }
                    } catch (final IllegalArgumentException e) {
                        Log.error("Unable to decode iv from string " + ivString, e);
                    }
                }

                boolean isEncrypted = rs.getInt(3) == 1 || JiveGlobals.isXMLPropertyEncrypted(name);
                if (isEncrypted) {
                    try { 
                        value = encryptor.decrypt(value, iv);
                    } catch (Exception ex) {
                        Log.error("Failed to load encrypted property value for " + name, ex);
                        value = null;
                    }
                }
                if (value != null) { 
                    properties.put(name, value);
                    encrypted.put(name, isEncrypted);
                }
            }
        }
        catch (Exception e) {
            Log.error(e.getMessage(), e);
        }
        finally {
            DbConnectionManager.closeConnection(rs, pstmt, con);
        }
    }
Saves a property, optionally encrypting it

@param key
           The name of the property
@param value
           The value of the property
@param isEncrypted
           {@code true} to encrypt the property, {@code true} to leave in plain text
@return The previous value associated with {@code key}, or {@code null} if there was no mapping for
        {@code key}.
xmppserver/src/main/java/org/jivesoftware/util/JiveProperties.java