Looks like the real issue you're asking is "How do I access the ClassLoader for a
given XML file?"
This would enable you to do cl.getResourceAsStream("whatever.xml");
However, the JEE spec leaves room for vendors to plug in their own custom classloading
strategies to enable features such as hot deployment. So you've got no hook to access
the CL you need.
Since classes are linked to the CL that defined them, you might try packaging your XML in
an EJB JAR, and then attempting to get to it by saying something like:
MyBeanRemote.class.getClassLoader().getResourceAsStream("whatever.xml")
...but this would assume that the same CL was used for all resources in your EJB JAR.
I think a better question to ask is: what are you doing that requires you to access
something packaged in your application's deployable units? Surely there's a more
elegant way for you to get at this configuration?
S,
ALR
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130607#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...