| Thrown when
FactoryRegistry is invoked recursively for the same category. This exception
is often the result of a programming error. It happen typically when an implementation of some
FooFactory interface queries in their constructor, directly or indirectly,
FactoryRegistry.getServiceProvider getServiceProvider for the same category (namely
FooFactory.class ). Factories implemented as wrappers around other factories of the same
kind are the most likely to fall in this canvas. If this
RecursiveSearchException was not throw, the application would typically dies with a
StackOverflowError .
A workaround for this exception is to invoke
getServiceProvider outside the constuctor,
when a method first need it.
since: 2.3 version: $Id: RecursiveSearchException.java 22443 2006-10-27 20:47:22Z desruisseaux $ author: Martin Desruisseaux |