Description
JBoss jsf deployer needs a custom class that extends StartupServletContextListener to add additional processing before initialize.
The problem we have is the original StartupServletContextListener is registered on myfaces-core.tld, so it ends being called "twice".
The solution is do a simple reorganization of the code, so _facesInitializer is only set on the first one, then we use FACES_INIT_DONE param to comunicate to the other listener that has been already initialized. Then, only process contextDestroyed if _faceslnitializer was set.