[jboss-as7-dev] subsytem interdependency

Thomas Diesler thomas.diesler at jboss.com
Fri Jul 13 03:16:08 EDT 2012


Currently the OSGi subsystem provides OSGiSubsystemExtension 
<https://github.com/tdiesler/jboss-as/commit/746a95780c916d39ca2fd6be253fa97941b0a299#diff-14> 
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 org.jboss.as.osgi and org.jboss.as.osgi.web

       <module name="org.jboss.as.osgi.web" optional="true" services="import"/>

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

cheers
-thomas


On 07/12/2012 07:16 PM, Jason T. Greene wrote:
> 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:
>> 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:
>>> 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:
>>>> 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
>>>>
>

-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
JBoss OSGi Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-as7-dev/attachments/20120713/20f5d766/attachment.html 


More information about the jboss-as7-dev mailing list