JBoss Community

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

created by Dan Sirbu in JBoss AS7 Development - View the full discussion

Hi,

 

   I have create a module testmod that is stored into /home/jboss7/modules/com/mycomp/testmod/main with the appropriate jar file. The META-INF/services contains the necessary defition for a java service to be loaded.

 

   I also create a testextension module that is stored into /home/jboss7/modules/com/mycomp/testextension/main. In testextenstion module.xml I add the dependency towards the testmod in order to have the classpath set properly.

 

   I have 2 situations:

 

(a) If I set the testmod as a global module in the standalone.xml, the the META-INF/services class defined there is loaded and available to a war file since when I deploy the WAR file via the ServletContextListner I can bootstrap the spi.

 

(b) If I define the textextension in standalone.xml (and remove the global definition), then try to bootstrap the testmod from the testextension, then the META-INF/services is no longer loaded and the SPI is not working anylonger.

 

   I am wondering if my test is valid. And if yes, what would be the reason that the testmod META-INF/services is not available to the textextension module. In the dependency definiton I tried : services="export" export="true" for example ( I try "import" too) but no luck.

 

   Looking more carefully at the META-INF/services of the testextension module, there is one needed by jboss in order to kickstart the extension. And that get's called. So what I did, is to add the services from the testmod within the testextension -> still not luck.

   And that sounds similar with : "https://issues.jboss.org/browse/AS7-4" - which tough looks to be old and addressed. I am using the GA version.

 

  Any tips ?

 

BR,

Dan S.

Reply to this message by going to Community

Start a new discussion in JBoss AS7 Development at Community