I&#39;ve been running in to this issue for a few weeks now and the prior claim was that this was a class loading issue; but this describes what I&#39;m seeing better I think.  At least with what I&#39;m seeing, you cannot guarantee anything about the objects found in the bean manager or even the bean manager itself in this state.  <br>
<br>I know at least for our (JMS) use case, we have to do our work in ABD since we need to create new ObserverMethod&#39;s that can handle the event firing receipt.  So I guess the limitation is that it can&#39;t be a bean?  I&#39;m not sure how the computing hash map helps us in this case, or maybe its just a general idea?<br>
<br>John<br><br><div class="gmail_quote">On Mon, Feb 14, 2011 at 6:42 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="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Right, there are no events in which beans are guaranteed to be available for lookup or instantiation, so doing it lazily is best.<br>
<br>
On 13 Feb 2011, at 05:15, Stuart Douglas wrote:<br>
<br>
&gt;<br>
&gt; On 13/02/2011, at 2:57 PM, Jason Porter wrote:<br>
&gt;<br>
&gt;&gt; On Saturday, February 12, 2011, Stuart Douglas<br>
&gt;&gt; &lt;<a href="mailto:stuart.w.douglas@gmail.com">stuart.w.douglas@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt; The spec does not actually guarantee that the beans will be available in the AfterBeanDiscovery event.<br>
&gt;&gt;<br>
&gt;&gt; Wouldn&#39;t AfterValidation work?<br>
&gt;<br>
&gt; Possibly, however I don&#39;t think it is required to work by the spec, so it may not be portable.<br>
&gt;<br>
&gt; Stuart<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt; As it is possible to add beans/interceptors/decorators in this event CDI is not fully initialised yet, so even if this does sort of work some times it is certainly not portable. Have you considered using a ComputingHashMap to create the map in a lazy manner?<br>

&gt;&gt;&gt; Stuart<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On 13/02/2011, at 6:44 AM, Jordan Ganoff wrote:<br>
&gt;&gt;&gt; All,<br>
&gt;&gt;&gt; I&#39;ve run into an issue that I haven&#39;t been able to resolve. I am collecting producers during ProcessProducer and I&#39;d like to be able to invoke them during AfterBeanDiscovery to operate on the produces objects. When I run the application with Arquillian the beans can be looked up successfully. When the application runs as a web app they are not.<br>

&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; The sample app is producer-test on this branch of seam-jms: <a href="https://github.com/jganoff/jms/tree/producer-test/producer-test" target="_blank">https://github.com/jganoff/jms/tree/producer-test/producer-test</a><br>

&gt;&gt;&gt;<br>
&gt;&gt;&gt; The relevant code is here: <a href="https://github.com/jganoff/jms/blob/producer-test/producer-test/src/main/java/org/jboss/seam/jms/producertest/TestExtension.java" target="_blank">https://github.com/jganoff/jms/blob/producer-test/producer-test/src/main/java/org/jboss/seam/jms/producertest/TestExtension.java</a><br>

&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Anyone have any ideas?<br>
&gt;&gt;&gt; Follow up question: Is this a decent way for users to configure JMS routing information (send CDI event X to JMS destination Y, etc)? The original idea was to allow users to annotate methods with  @RoutingConfig and what they returned would be registered as a route. The producer idea seemed like a better fit though.<br>

&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; Jordan Ganoff<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; seam-dev mailing list<br>
&gt;&gt;&gt; <a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a><br>
&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Jason Porter<br>
&gt;&gt; <a href="http://lightguard-jp.blogspot.com" target="_blank">http://lightguard-jp.blogspot.com</a><br>
&gt;&gt; <a href="http://twitter.com/lightguardjp" target="_blank">http://twitter.com/lightguardjp</a><br>
&gt;&gt;<br>
&gt;&gt; Software Engineer<br>
&gt;&gt; Open Source Advocate<br>
&gt;&gt;<br>
&gt;&gt; PGP key id: 926CCFF5<br>
&gt;&gt; PGP key available at: <a href="http://keyserver.net" target="_blank">keyserver.net</a>, <a href="http://pgp.mit.edu" target="_blank">pgp.mit.edu</a><br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; seam-dev mailing list<br>
&gt; <a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a><br>
<br>
<br>
_______________________________________________<br>
seam-dev mailing list<br>
<a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a><br>
</blockquote></div><br>