Take a look at http://download.oracle.com/javaee/6/api/javax/enterprise/inject/spi/InjectionPoint.html I think that should allow you to produce arbitrary instances
Hi Team,To provide simple to powerfull ways to use Seam Social, I have 2 solutions to inject the same Bean@InjectTwitter twitter;and@Inject@RelatedTo(Service.Twitter)OAuthService twitter;
At the end "twitter" contains an instance of TwitterScribe bean in the 2 cases.To achieve that I have to create a producer like this :@Produces@RelatedTo(Service.Twitter)protected OAuthService qualifiedTwitterProducer(@New TwitterScribe service) {return service;}in addition of TwitterScribe bean which has the @Default qualifier.As I'll have to do that for each service and people extending the API will also have to provide this straightforward producer for their own service bean, I was wondering if there wasn't a more elegant (generic ?) way to create a bean responding to @default and another qualifier the same way.thanks for your feedback on that.
Antoine
_______________________________________________
seam-dev mailing list
seam-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/seam-dev