Due to a patch introduced for fixing
GLASSFISH-15809 we currently now face the issue that almost everything that calls something like 'FactoryFinder.getFactory(...)' results in the following warning in the logs:
Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use. Defaulting to first match.
This warning, however, is not correct as the warning also appears if only one instance has been found and the code does not consider the first as the warning says, but the very last it has found inside the factoryMap. This can be easily reproduced by creating a web application with the prettyfaces library, as they introduce a ServletRequestListener that always asks for the current JSF application, which triggers this warning at almost every request and therefore flooding the logs heavily.
Therefore I've made a simple patch (multiple-factory-manager.patch - against trunk) to fix this issue and to bring the code in sync with the message.