Aha! After some thinking, I realized that using a factory in Jetty is just a matter of some extra object construction. Instead of passing the ManagerObjectFactory directly, you simply pass a naming Reference that refers to the factory.<br>
<br>   &lt;New id=&quot;jdciManager&quot; class=&quot;org.mortbay.jetty.plus.naming.Resource&quot;&gt;<br>      &lt;Arg&gt;&lt;Ref id=&quot;webAppCtx&quot;/&gt;&lt;/Arg&gt;<br>      &lt;Arg&gt;jcdi/Manager&lt;/Arg&gt;<br>
      &lt;Arg&gt;<br>         &lt;New class=&quot;javax.naming.Reference&quot;&gt;<br>            &lt;Arg&gt;javax.inject.manager.Manager&lt;/Arg&gt;<br>            &lt;Arg&gt;org.jboss.webbeans.resources.ManagerObjectFactory&lt;/Arg&gt;<br>
            &lt;Arg/&gt;<br>         &lt;/New&gt;<br>      &lt;/Arg&gt;<br>   &lt;/New&gt;<br><br>That works out of the box now. So the question becomes, should we add the class to simplify it to:<br><br>   &lt;New id=&quot;jdci&quot; class=&quot;org.mortbay.jetty.plus.naming.Resource&quot;&gt;<br>
      &lt;Arg&gt;&lt;Ref id=&quot;webAppCtx&quot;/&gt;&lt;/Arg&gt; <br>      &lt;Arg&gt;jcdi/Manager&lt;/Arg&gt;<br>      &lt;Arg&gt;<br>         &lt;New class=&quot;org.jboss.webbeans.resources.ManagerObjectFactoryReference&quot;/&gt;<br>
      &lt;/Arg&gt;<br>   &lt;/New&gt;<br><br>?<br><br>I guess it can&#39;t hurt to add the class, but with proper documentation we can live without it. Pete, once you make the decision, I&#39;ll add it to the docs (and commit if you decide to have the extra class).<br>
<br>Notice I went with the name ManagerObjectFactoryReference, which reads the best to me.<br><br>-Dan<br><br><div class="gmail_quote">On Thu, Apr 23, 2009 at 3:37 AM, Pete Muir <span dir="ltr">&lt;<a href="mailto:pmuir@redhat.com">pmuir@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Yeah, looks like Jetty doesn&#39;t support ObjectFactory natively. Probably it is actually neater to keep these two concepts separate, and just add an ManagerObjectFactoryReference class.<div>
<div></div><div class="h5"><br>
<br>
On 23 Apr 2009, at 00:53, Dan Allen wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
In the process of setting up the servlet-booking example for Seam, I tackled the problem of binding the JCDI Manager to JNDI on Jetty. It&#39;s just a matter of extending the javax.naming.Reference class. I attached the implementation to <a href="https://jira.jboss.org/jira/browse/WBX-31" target="_blank">https://jira.jboss.org/jira/browse/WBX-31</a>.<br>

<br>
Should I commit this Pete? I need a decison on whether we should change the name of the class to reflect that it is an ObjectFactory and a Reference. I think internally Tomcat must create the reference automatically from the resource definition, which is why Jetty doesn&#39;t know what to do with a plain ObjectFactory.<br>

<br>
...I also noticed that injection is not supported in Jetty. I&#39;m not sure how to handle that problem, but it means no booking yet on Jetty.<br>
<br>
-Dan<br>
<br>
-- <br>
Dan Allen<br>
Senior Software Engineer, Red Hat | Author of Seam in Action<br>
<br>
<a href="http://mojavelinux.com" target="_blank">http://mojavelinux.com</a><br>
<a href="http://mojavelinux.com/seaminaction" target="_blank">http://mojavelinux.com/seaminaction</a><br>
<a href="http://in.relation.to/Bloggers/Dan" target="_blank">http://in.relation.to/Bloggers/Dan</a><br>
<br>
NOTE: While I make a strong effort to keep up with my email on a daily<br>
basis, personal or other work matters can sometimes keep me away<br>
from my email. If you contact me, but don&#39;t hear back for more than a week,<br>
it is very likely that I am excessively backlogged or the message was<br>
caught in the spam filters.  Please don&#39;t hesitate to resend a message if<br>
you feel that it did not reach my attention.<br></div></div>
_______________________________________________<br>
webbeans-dev mailing list<br>
<a href="mailto:webbeans-dev@lists.jboss.org" target="_blank">webbeans-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/webbeans-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/webbeans-dev</a><br>
</blockquote>
<br>
--<br>
Pete Muir<br>
<a href="http://www.seamframework.org" target="_blank">http://www.seamframework.org</a><br>
<a href="http://in.relation.to/Bloggers/Pete" target="_blank">http://in.relation.to/Bloggers/Pete</a><br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Dan Allen<br>Senior Software Engineer, Red Hat | Author of Seam in Action<br><br><a href="http://mojavelinux.com">http://mojavelinux.com</a><br><a href="http://mojavelinux.com/seaminaction">http://mojavelinux.com/seaminaction</a><br>
<a href="http://in.relation.to/Bloggers/Dan">http://in.relation.to/Bloggers/Dan</a><br><br>NOTE: While I make a strong effort to keep up with my email on a daily<br>basis, personal or other work matters can sometimes keep me away<br>
from my email. If you contact me, but don&#39;t hear back for more than a week,<br>it is very likely that I am excessively backlogged or the message was<br>caught in the spam filters.  Please don&#39;t hesitate to resend a message if<br>
you feel that it did not reach my attention.<br>