I have a jboss web service that is getting the wrong initial context. I want it to use the java.naming.factory.initial from the jndi.properties in the services root directory and not the one in jboss jndi.properties which is the NamingContextFactory. In the ant build file I put the jndi.properties in the classpath and made sure it copies over to the archive, but the service still gets the NamingContextFactory instead. How can I tell which jndi.properties gets used so that the factory gets set correctly?
The unfortunate situation is that I have a third party jar I must use that expects its initial context factory to be the one specified in its packaged jndi.properties file, but when I run this in jboss it gets NamingContextFactory. I can't change the jboss jndi.properties file without everything breaking.