/**
* Gives the configuration URL according to the given {@link ClassLoader}
*/
private static URL getConfigurationURL(ClassLoader configClassLoader) throws MalformedURLException
{
final J2EEServerInfo env = new J2EEServerInfo();
// (2) exo-configuration.xml in AS (standalone) home directory
URL configurationURL =
SecurityHelper.doPrivilegedMalformedURLExceptionAction(new PrivilegedExceptionAction<URL>()
{
public URL run() throws Exception
{
return (new File(env.getServerHome() + "/exo-configuration.xml")).toURI().toURL();
}
});
// (3) AS_HOME/conf/exo-conf (JBossAS usecase)
if (!fileExists(configurationURL))
{
configurationURL =
SecurityHelper.doPrivilegedMalformedURLExceptionAction(new PrivilegedExceptionAction<URL>()
{
public URL run() throws Exception
{
return (new File(env.getExoConfigurationDirectory() + "/exo-configuration.xml")).toURI().toURL();
}
});
}
// (4) conf/exo-configuration.xml in war/ear(?)