I have config file named mbi_deploy.xml in root dir of my ear and war files.
Reading it this way
InputStream is = this.getClass().getClassLoader().getResourceAsStream( "mbi_deploy.xml" );
The location of the xml file was not my original point. But I tried it out now.
Also with current WildFly it seems only be possible to read file from root dir, not from others. As said I can access mbi_deploy.xml but found out now, that I cannot access META-INF/application.xml.
See also Reading EAR/META-INF/application.xml from EJB or WAR module? and others.
I do not have such file.
As said, root dir access works, anything else seems not to work.
Don't know why.