class PoolDescriptor {

    public PoolDescriptor(String server, String jdbcUrl, Properties connectionConfig, Properties poolConfig, String qualifier) {
        this.server = server;
        this.jdbcUrl = jdbcUrl;

        if (connectionConfig != null) {
            this.connectionConfig = (Properties) connectionConfig.clone();
            // extract credentials to treat them explicitly, remove from connection properties
            this.user = (String) this.connectionConfig.remove(USER_PROPERTY_NAME);
            this.password = (String) this.connectionConfig.remove(PASSWORD_PROPERTY_NAME);
        }

        this.poolConfig = (Properties) poolConfig.clone();
        this.qualifier = qualifier;

        // validate pool configuration
        PROHIBITED_PROPERTIES.forEach(p -> ensurePoolPropertyNotPresent(p));
    }

    public  PoolDescriptor(String server, String jdbcUrl, Properties connectionConfig, Properties poolConfig, String qualifier);

}