[seam-dev] Looking up beans for Producers in AfterBeanDiscovery

Jason Porter lightguard.jp at gmail.com
Sat Feb 12 17:17:29 EST 2011


On Saturday, February 12, 2011, Jordan Ganoff <jganoff at gmail.com> 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/java/org/jboss/seam/jms/producertest/TestExtension.java
>
>
>
> Anyone have any ideas?

I wonder if you're getting a different instance of the object in the
two event notifications. Can you verify they're the same instance in
each notification? You could also try making the bean
ApplicationScoped to see if it makes a difference.

> 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
>
>

-- 
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp

Software Engineer
Open Source Advocate

PGP key id: 926CCFF5
PGP key available at: keyserver.net, pgp.mit.edu



More information about the seam-dev mailing list