Could you do it utilizing Classloader or Class method:
Yes that does seem to work; thanks for the tip.
I'm suprised that this.getClass().getResource("/WEB-INF") actually returns the right path even though I'm calling it from an EJB. Hopefully this is not just an example of an undefined behavior that happens to be working in my particular case.
No, it's a normal behavior. Class or ClassLoader should work correctly.