Detailed problem description: --- We need to understand some TomcatDeployment deployer implementation details. The problem description we have is described in JBWS-2384 bug.
Short problem description: --- We do generate JBossWebMetaData and we're passing virtualHosts to it. Later this dynamically generated JBossWebMetaData is picked up by TomcatDeployment deployer. However we're getting NameAlreadyBoundException because the envCtx returned by JNDI lookup in EncListener is the same for each performDeployInternal() method call (performDeployInternal() method is called for each virtual host).
Any help is highly appreciated. We'd like to know what affects the JNDI lookup in ENCListener and why it returns the same instance?