3 Replies Latest reply: May 17, 2013 11:18 AM by santo RSS

    AS 7.1.0.Final: MBean and Class Loading

    santo Newbie

      Hi,

      I'm trying to migrate an application from JBoss AS5 to JBoss AS7.1 but I found a problem and I'd like to ask you if it's normal and if there's another way to achieve what I need. I have several MBeans whose code are contained in module X that are declared in a jboss-service.xml file in the SAR module Y, and these MBeans need some resource files packed in module Y (I usually use Thread.currentThread().getContextClassLoader().getResource() to access them). Now here's my problem: in JBoss 5, the context class loader of the thread executing start() was the class loader associated with module Y, while now in JBoss7 the class loader is instead associated with module X, so I can't locate the resources I need (module X doesn't depend from module Y). Is this the right behavoiur? Is there any way for me to access the resources in module Y?

      Thanks.