JBoss Community

Re: META-INF/services for module extensions - question/issue

created by Brian Stansberry in JBoss AS7 Development - View the full discussion

Yes, the singleton will be respected.

 

Say you have com.foo.Singleton.class and it only exists in jar singleton.jar. So long as there is only one module Mx that includes singleton.jar in its <resources> element, there will only be one classloader that defines a class named com.foo.Singleton.

 

Other modules that add a dependency on Mx only declare that they want to have access to whatever classes Mx exposes; they aren't declaring that they can be a defining classloader for the bits described in Mx's <resources> element.

Reply to this message by going to Community

Start a new discussion in JBoss AS7 Development at Community