Are you packaging any jndi.properties file in the application or any jboss specific jar files? If yes, remove them.
Ok, I must have had a typo in my original grep because as I expected, there was a hard-coded URL in the jndi.properties file. Thank you jaikiran for encouraging me to revisit the jndi.properties file, where I should have found the problem in the first place.
I guess sleep deprevation doesn't mesh well with software engineering.