Hi Struberg,

Thanks for your help, I really appreciate it and it is very helpful for me.

Muhammad Bhutto

On Wed, Nov 20, 2013 at 1:45 PM, Mark Struberg <struberg@yahoo.de> wrote:
.) BeanManager#getReference will return you a 'Contextual Reference', means a normalscoping proxy for the bean. If you have a @SessionScoped User usr; then the Contextual Reference usr  will 'point' to the respective User instance (the 'Contextual Instance') of the _current_ session for each invocation. Two different invocations to usr.getName() from 2 different web browsers will give you different answers.

.) Contest#get() will return you the internal 'Contextual Instance' without the normalscoping proxy. This is usually nothing a user should call himself. If you get  the User usr for "Karl" that way and store it in an @ApplicationScoped bean or in a static variable, then it will _always_ remain to be the user "Karl" - even for web requests from other browsers! You will get a direct, non-proxied instance.