[jboss-dev-forums] [JBoss AS7 Development] - Re: META-INF/services for module extensions - question/issue
Dan Sirbu
do-not-reply at jboss.com
Fri Sep 9 11:56:53 EDT 2011
Dan Sirbu [http://community.jboss.org/people/lmcdasi] created the discussion
"Re: META-INF/services for module extensions - question/issue"
To view the discussion, visit: http://community.jboss.org/message/625786#625786
--------------------------------------------------------------
Another test - and I do not want to change classloaders I just want to use the module.xml setup
Now - with the debugger one can see the classes BUT the META-INF/services are no part of the classpath. So the ServiceLoader does not work ! Sorry I may not have worded correctly but that is what I get.
ME module.xml has only one dependecy : <module name="com.module.first"/> ==> ME has visibility on M1
M1 only one dependency : <module name="com.module.second" export="true"/> ==> M1 has visibility on M2
M2 only one dependency : <module name="com.module.third" export="true"/> ==> M1 has visibility on M3
M1: ServiceLoader<com.module.second.services.TestServicesIfc> myTt = ServiceLoader.load(com.module.second.services.TestServicesIfc.class);
11:51:28,185 INFO [com.modext.dans.services.TCCLSingletonService] (MSC service thread 1-3) TCCLSingletonService - start
ed
11:51:28,188 INFO [com.modext.dans.services.TCCLSingletonService] (MSC service thread 1-3) TestServicesIfc -------> Fou
nd services class <<-- that is due to jboss-module api
11:51:28,192 INFO [com.module.first.services.TestServicesImpl] (MSC service thread 1-3) HELLO
11:51:28,238 INFO [com.module.first.TestPackage] (MSC service thread 1-3) I am in TestPackage - Module#1
11:51:28,240 INFO [com.module.first.TestPackage] (MSC service thread 1-3) I am in loadLib
11:51:28,243 INFO [com.module.first.TestPackage] (MSC service thread 1-3) contextInitialized -------> NOT Found service
s class from Module#2 <-- ServiceLoader.load(com.module.second.services.TestServicesIfc.class) FAILS <----
11:51:28,245 INFO [com.modext.dans.services.TCCLSingletonService] (MSC service thread 1-3) TestServicesIfc -------> NOT
Second Found services class <-- that is the ServiceLoader.load from the TCCL but that can be viewed as ok since it is jboss-module specific.
BR,
Dan S.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/625786#625786]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20110909/bbdb6811/attachment.html
More information about the jboss-dev-forums
mailing list