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/625510#625510
--------------------------------------------------------------
Hi Brian,
I have taken a break from the subject and after giving multiple taughts I still think
there is a "flaw". Here is my view based on my current understanding:
I can have, let's say, two kind of modules: one that implements the module ifc thus
an extension && one that does not. Let's name : ModuleExtension the one that
has defined an interface towards the : org.jboss.as.controller.Extension ifc; and
let's name Module the one that does not have such a definition.
What I understand is that the ModuleExtension by design should not have any other
service defined - which is OK. And if it does it is discarded - which again is OK.
What I also understand is that the Module by design can have a service defined. Now the
service defined into Module is available to any war, rar, etc... file that is deployed and
have somehow a dependecy defined towards that Module (see prev dicussions on how one can
achieve that). And the war file, for example, uses the 'regular' Service.load
instead of using the jboss-module one - which is what one would expect.
So far so good.
Now, let's say that ModuleExtension needs Module for whaterver reason. Then one
would go into "module.xml" of ModuleExtension and add a dependency towards that
Module. Then, what I would expect as behaviour is that the Module service should be
available to ModuleExtension via the 'regular' Service.load and not via the
jboss-module service loader ! Since Module is not defined as a jboss-module extension,
then the ModuleExtension should be able to have access to the Module service interface via
the 'regular' Service.load and that because, to me, the Module should be in the
classpath of the ModuleExtension one such a dependency has been created. There is no real
need to go towards jboss-module service loader - at least I do not see one.
If a war file, for example, would need access to ModuleExtension it would add a
dependecy towards it. The dependency should ensure that the objects defined with the
ModuleExtension become visible to the war file including the ones from the Module meaning
that the classpath of the ModuleExtension would be made available to the war. At least
that is I think a dependency should do.
If one would do that, then there will a lot more flexibility in the way that the
jboss-module would work - in my opinion.
BR,
Dan S.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/625510#625510]
Start a new discussion in JBoss AS7 Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]