The spec does not actually guarantee that the beans will be available in the
AfterBeanDiscovery event.
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?
Stuart
On 13/02/2011, at 6:44 AM, Jordan Ganoff wrote:
All,
I've run into an issue that I haven't been able to resolve. I am collecting
producers during ProcessProducer and I'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.
The sample app is producer-test on this branch of seam-jms:
https://github.com/jganoff/jms/tree/producer-test/producer-test
The relevant code is here:
https://github.com/jganoff/jms/blob/producer-test/producer-test/src/main/...
Anyone have any ideas?
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.
--
Jordan Ganoff
_______________________________________________
seam-dev mailing list
seam-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/seam-dev