Share/access resources between Java EE server and web application
<p>I'm searching the best way to communicate informations between my Java EE server (Glassfish V3) and my Java EE application (modules : web, jpa, ejb).</p>

<p>Why am I looking for that ?</p>

<p>I'm developing a Server Authentication Module (<code>SAM</code>) to plug in Glassfish and substitute the "classic" <code>realm</code>. My <code>SAM</code> can only access the <code>httpServletRequest</code> object so the basic way is to store data on <code>session</code>, access it under the <code>SAM</code> and autenthicate user via credentials stored into basic object. But this object have to be shared between <code>SAM</code> and application.</p>

<p>I'm just wondering if my <code>SAM</code> could access <code>singleton EJB</code> or <code>stateless EJB</code> belonging to my app ? My <code>SAM</code> is completely uncoupled of my app but is there a way to do this please ?</p>
