When we use resource_db and/or config_db?

In reply to deep123:

What you see is correct the differenc comes from the get using ‘this’.This does not mean the global scope. If you are changing in the config_db get the context from ‘this’ to ‘null’. You see exactly the same result as using resource_db.