<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Currently the OSGi subsystem provides <a
href="https://github.com/tdiesler/jboss-as/commit/746a95780c916d39ca2fd6be253fa97941b0a299#diff-14">OSGiSubsystemExtension</a>
      interface, which is implemented and made available as
      META-INF/service by the org.jboss.as.osgi.web module. There is a
      circular dependency between </tt><tt>org.jboss.as.osgi and </tt><tt>org.jboss.as.osgi.web
      <br>
    </tt>
    <pre class="line">      &lt;module&nbsp;name="org.jboss.as.osgi.web"&nbsp;optional="true"&nbsp;services="import"/&gt;

At boot time I delegate to all available extensions, which can do their additional work (i.e. register integration DUPs)

cheers
-thomas
</pre>
    <br>
    <div class="moz-cite-prefix">On 07/12/2012 07:16 PM, Jason T. Greene
      wrote:<br>
    </div>
    <blockquote cite="mid:4FFF0679.7020609@redhat.com" type="cite">
      <pre wrap="">If we are talking optional module dependencies thats fine. Service 
dependencies usually can't be optional across subsystems though, as it 
will cause a race.

An example of the service problem is transactions and iiop. If JBoss 
Transactions is in JTS mode, it requires special interceptors to be 
enabled in the orb before it launches. From a service startup 
perspective both can't wait on the other. So right now we have an ugly 
solution where both subsystems have to be configured to match 
(transactions in jts mode, iiop with the transaction flag on).

Awhile back we talked about addressing optional subsystem interdeps by 
introducing a generic capabilities api before the runtime stage 
executes. I think Kabir had a prototype somewhere. The idea was that 
after the model is built, there is a hook where subsystems can add some 
kind of indicator for what features they have made available, and other 
subsystems would then be able to define their service deps accordingly.

On 7/11/12 11:16 AM, Thomas Diesler wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">If there is no recommended alternative I would add optional dependencies
to integration modules to the osgi subsystem.

On 07/11/2012 05:22 PM, Thomas Diesler wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">The poor man's approach could be to promote the org.osgi.core and and
some org.osgi.service APIs to core modules similar to javax.*


On 07/11/2012 05:14 PM, Thomas Diesler wrote:
</pre>
          <blockquote type="cite">
            <pre wrap="">Folks,

related to [web,ejb,cdi,etc]/osgi integration an issue came up whereby
those ee subsystems don't want to have a dependency on osgi because osgi
is not a core component of the server. Likewise, osgi should not have a
dependency on these ee subsystems because it may be configured to run
independently.

More general if foo and bar are both optional subsystems where do we put
the code that integrates foo and bar. foo-bar integration might require
to add a some DUPs. How are these registered?

cheers
-thomas

</pre>
          </blockquote>
        </blockquote>
        <pre wrap="">
</pre>
      </blockquote>
      <pre wrap="">

</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
JBoss OSGi Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx 
</pre>
    <br>
    <br>
  </body>
</html>