The fact is that we have an extended persistente unit bound to the stateful ejb, so can&#39;t be injected or looked up.<div><br></div><div>I&#39;ve found a solution working on my three target App Server (TomEE, Weblogic, JBoss).</div>
<div><br></div><div>Inject a SessionContext and take the EJBObject using the getBusinessInterface method.</div><div><br></div><div>For some strange reason SessionContext and his Ejb have different lifecycle so we need to take it before it is returned to the jsf client.</div>
<div><br></div><div>This way it works.<span></span><br><br>Il giorno venerdì 3 agosto 2012, Richard Kennard  ha scritto:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Yes, you could try that. The history to this decision was:<br>
<br>
1. The Converter needs to use an EntityManager to load the entity<br>
2. For some reason you cannot (yet) inject EntityManagers into FacesConverters<br>
<br>
So I made the Converter an inner class of the xxxBean, so that it could access the bean&#39;s EntityManager. However there would be other approaches, such as<br>
looking up the EntityManager via JNDI or something.<br>
<br>
Regards,<br>
<br>
Richard.<br>
<br>
On 3/08/2012 8:15 PM, Thomas Frühbeck wrote:<br>
&gt; Did you think of separating Converter and backing bean implementation?<br>
&gt; AFAIK the backing bean _provides_ a converter e.g.: #{xxxxxBean.converter} but should not implement Converter itself?<br>
&gt;<br>
&gt; Thomas<br>
&gt;<br>
&gt; Am 03.08.2012 11:13, schrieb Luca Masini:<br>
&gt;&gt; I&#39;m going crazy to let the generated faces scaffolding run on both WLS and JBoss.<br>
&gt;&gt;<br>
&gt;&gt; Infact if I let the Bean implements the Converter interface then WLS works but JBoss complaints about missing method, it&#39;s like that the implemented<br>
&gt;&gt; interface is the Local interface for the bean and no other method is found but those in the Converter interface itself.<br>
&gt;&gt;<br>
&gt;&gt; So I remove the interface and everything work without the getConverter method, getAsObject and getAsString are method of the now interface bean.<br>
&gt;&gt;<br>
&gt;&gt; On the counter side WLS is unable to call methods from the EL into faces files that are not part of the Converter interface.<br>
&gt;&gt;<br>
&gt;&gt; So I&#39;m in a deadlock. I&#39;m unable to let it works on both the Java EE 6 server. I&#39;m sure that a solution exist, but whichi ?<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; ****************************************<br>
&gt;&gt; <a href="http://www.lucamasini.net" target="_blank">http://www.lucamasini.net</a><br>
&gt;&gt; <a href="http://twitter.com/lmasini" target="_blank">http://twitter.com/lmasini</a><br>
&gt;&gt; <a href="http://www.linkedin.com/pub/luca-masini/7/10/2b9" target="_blank">http://www.linkedin.com/pub/luca-masini/7/10/2b9</a><br>
&gt;&gt; ****************************************<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; forge-dev mailing list<br>
&gt;&gt; <a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;forge-dev@lists.jboss.org&#39;)">forge-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; forge-dev mailing list<br>
&gt; <a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;forge-dev@lists.jboss.org&#39;)">forge-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
<br>
_______________________________________________<br>
forge-dev mailing list<br>
<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;forge-dev@lists.jboss.org&#39;)">forge-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
</blockquote></div><br><br>-- <br>****************************************<br><a href="http://www.lucamasini.net">http://www.lucamasini.net</a><br><a href="http://twitter.com/lmasini">http://twitter.com/lmasini</a><br><a href="http://www.linkedin.com/pub/luca-masini/7/10/2b9">http://www.linkedin.com/pub/luca-masini/7/10/2b9</a><br>
****************************************<br>