Thanks Richard, No hurry, I have a temporary workaround for it but I probably need to look into this soon. I’ll keep you posted when I dig up some new findings.
Cheers Mario > On 24 Jun 2015, at 09:29 , Richard Eckart de Castilho <r...@apache.org> wrote: > > Hi Mario, > > I'm not sure if the resource injection has a proper two-phase initialization > (first instantiation, then injection) or if it behaves more like a constructor > injection (injection during instantiation). I think it is the latter which > requires that there is no circular injection - but that needs to be checked. > I may not be able to get my hands into this in the next few days, so if have > a need and want to dig into it more, feel free. > > Cheers, > > -- Richard > > On 19.06.2015, at 22:24, Mario Gazzo <mario.ga...@gmail.com> wrote: > >> Hi Richard, >> >> Seems something still spooky with my nested resources. This time I added an >> additional resource, which depends on the same shared resource as another. I >> now have two different resources dependent on the same external resource but >> during initialisation I get the error shown below. I can use both resources >> independently of each other but just not together. I have been able to >> replicate it by extending the earlier simple example (see further down). >> >> You will notice in the example that I bind every resource to every >> description specified even though there is no declared dependency. Reason is >> because our actual application has a small DSL that aggregates the >> descriptions and then tries to bind resources on all possible descriptions >> just before execution. However, I just did a naive approach where I bind >> every resource to every possible description that was added but I didn’t do >> code that first inspects whether a description has actually declared the >> dependency before attempting to bind. Yes, its inefficient for a very large >> amount of resources but we don’t have that. My naive assumption was that the >> UIMAfit binding process would figure this out way better than I could myself >> and I just sticked with this since it worked fine until now and it was >> simple to program. I don’t know whether this actually is the direct cause of >> the problem or whether my use just triggered a bug. It works if I don’t do >> these superfluous bindings. If this use case cannot be supported then I >> would like to know what would alternatively be the simplest way to make >> these inspections on the descriptors before making a binding attempt? >> >> Thanks a lot for your help. >> >> Cheers >> Mario >