<div dir="ltr"><div class="gmail_extra">Hi Struberg,</div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks for your help, I really appreciate it and it is very helpful for me.</div><div class="gmail_extra">

<br></div><div class="gmail_extra">Regards,<br></div><div class="gmail_extra">Muhammad Bhutto</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 20, 2013 at 1:45 PM, Mark Struberg <span dir="ltr">&lt;<a href="mailto:struberg@yahoo.de" target="_blank">struberg@yahoo.de</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="font-size:8pt;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif">

.) BeanManager#getReference will return you a &#39;Contextual Reference&#39;, means a normalscoping proxy for the bean. If you have a @SessionScoped User usr; then the Contextual Reference usr  will &#39;point&#39; to the respective User instance (the &#39;Contextual Instance&#39;) of the _current_ session for each invocation. Two different invocations to usr.getName() from 2 different web browsers will give you different answers.<br>

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