Each "external" inclusion after the first one is waiting for synch on the addSource method call.
When working with sitemap inclusions (cocoon://), the source.getValidity() performed by the validity.addSource(...) method returns immediately without really generating the element. There is no synchronization issue here. The generation is done outside of this synchronized block.
When working with external URL inclusions (http://), the source.getValidity(...) effectively PERFORMS the remote call and waits for the element to be generated, thus creating synchronization issues preventing the use of parallel inclusion of external URL. Each inclusion will wait on the synchronize until the previous external call returns.
I am working on ways to overload the MutliSourceValidity class to avoid making the getValidity call under specific circumstances.
Some questions now :
- Is it a bug ?
- Is there any workaround for this ?
- Is it safe to extend the MutliSourceValidity class to avoid performing the remote call in the addSource method ?
Thank you very much for your time. I would be glad to give you some details, should you need to.