Can you post example java code? I don't exactly follow what you are
trying that is failing...
On 8/17/2013 8:01 PM, buko wrote:
> In my quest to deal with dynamic components I tried to create a
> component Y that was both a factory for X and was also bound to a
> contract as Y. This would allow some resources to look up Y and set X
> and other resources to simply inject X.
>
> Turns out this is not a good thing. Creating a descriptor that's a
> Factory will result with a DescriptorType=Provide. But when the
> factory goes to be injected as a regular component the entire system
> simply hangs. (Presumably some sort of uncaught class cast exception
> is happening.) Not exactly sure why the system hangs but perhaps some
> checking could be done to prevent this? If a factory provides a class
> that's not assignable to the required type that sort of error could
> perhaps be detected and flagged during resolution.