<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi David, I added a check that a module alias cannot shadow an already existing system module. Duplicate deployment aliases were prevented already by virtue of duplicate service names. Do you still think there is an issue with dropping the 'deployment.' prefix constraint on module aliases?<div><br></div><div>cheers</div><div>--thomas<br><div><br><div><div>On May 28, 2013, at 11:54 AM, Thomas Diesler <<a href="mailto:thomas.diesler@jboss.com">thomas.diesler@jboss.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Generally, a deployment that can provide classes/resources ends up as a module identified by its module identity. What I'm trying to address is a use case whereby<div><br></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">org.acme.bar depends on org.acme.foo</blockquote><div><br></div>This is not to be confused with <div><br></div><div><blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px; ">org.acme.bar depends on org.acme.foo only when the foo was installed as a deployment</blockquote><blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px; "><br></blockquote>Modularity in WildFly works with direct named dependencies. The current implementation however adds another dimension to the named dependency. Namely, some sort of extension to the module identity that is associated with how the module got into the system.</div><div><br></div><div>In the Fuse use case the dependency above is defined as content of some repository (i.e. we only know that bar depends on foo). For obvious reasons we cannot have two dimensional dependency definitions in the repository.</div><div><br></div><div>It is fine that multiple module loaders are at play at runtime. It is very likely also true that these module loaders are organised is some hirarchy or order. (i.e. they will not compete to load a given module identifier). This effectively makes a flat namespace for module identities, which leads to a reasonable constraint that there are no duplicates in that namespace. (i.e. a module identity cannot shadow another module identity coming later in the order of module loaders)</div><div><br></div><div>If the use of unique module aliases is no good, there is perhaps another way to express the above dependency in a one dimensional way. </div><div>Would you have an idea what this could be? </div><div><br></div><div>cheers</div><div>--thomas</div><div><br><div><div>On May 24, 2013, at 4:30 PM, David M. Lloyd <<a href="mailto:david.lloyd@redhat.com">david.lloyd@redhat.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On Fri, 24 May 2013, Thomas Diesler wrote:<br><br><blockquote type="cite">Folks, currently we allow an arbitrary module alias to be defined with a deployment/subdeployment in jboss-deployment-structure.xml. The ServiceModuleLoader will however only accept module identifiers that have the 'deployment.' prefix. <br></blockquote><br>This was done by mistake - specifying arbitrary module aliases to deployments is not supported.<br><br><blockquote type="cite">I believe the 'deployment.' prefix is an unnecessary constraint for deployed module aliases. Deployments should be able to define any alias. This would allow for a deployment to get 'promoted' to a system module without breaking clients. A module alias should be unique, if a deployment defines an alias of an already existing module it should fail. System modules cannot have dependencies on deployment modules.<br>This change, provides a fallback in the ServiceModuleLoader that allows deployment modules to be loaded by their alias even if they don't have the 'deployment.' prefix. Unless I'm mistaken it only applies to inter deployment dependencies.<br>What do you think?<br></blockquote><br>Right now deployments are known (in a public API sense) only by their deployment name e.g. foo.jar/foo.war/foo.ear. The "deployment." stuff is an implementation detail only - one which may even change over time. What you're really proposing is that deployments have formal *module* names, which would compete for namespace with the statically installed modules or any other module loader with which deployments might interact now or in the future (including module loaders responsible for filesystem JAR loading and SE-style extension loading, in addition to (for example) a possible present or future OSGi module loader).<br><br>I do not agree with this change because I think this views the problem of deployment modules the wrong way around. Deployment module dependencies are resolved during deployment as services, whereas static module dependencies are fixed. Right now, the only supported way to establish deployment dependencies is by JAR name and relative path. Deployment order is guaranteed by way of deployment processors which set up services to resolve in the proper order.<br><br>We could, potentially, extend this with (for example) a simple requires/provides mechanism, but if so, this mechanism would definitely NOT operate by way of module identifiers. The module identifier namespace for deployments must remain strictly controlled by the deployment system or else we start creating ways to break deployment in weird ways. Any interdeployment wiring must be done via MSC dependencies, not by module aliases.<br><br>-- <br>- DML_______________________________________________<br>wildfly-dev mailing list<br><a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a><br></blockquote></div><br><div>
<div><pre class="moz-signature" cols="72">xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
JBoss OSGi Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx </pre><div><br></div></div><br class="Apple-interchange-newline">
</div>
<br></div></div>_______________________________________________<br>wildfly-dev mailing list<br><a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/wildfly-dev<br></blockquote></div><br><div>
<div><pre class="moz-signature" cols="72">xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
JBoss OSGi Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx </pre><div><br></div></div><br class="Apple-interchange-newline">
</div>
<br></div></div></body></html>