What's the best way to create and use Global variables/Application level va

I could not find a way to create and use application level variable.
Please help.

My favourite is to use CDI or Spring and use application scoped beans for this.