[
https://issues.jboss.org/browse/AS7-5365?page=com.atlassian.jira.plugin.s...
]
Thomas Diesler reassigned AS7-5365:
-----------------------------------
Assignee: Thomas Diesler (was: David Lloyd)
Intermittent failure due to missing OSGi service
------------------------------------------------
Key: AS7-5365
URL:
https://issues.jboss.org/browse/AS7-5365
Project: Application Server 7
Issue Type: Bug
Components: OSGi, Server
Reporter: Thomas Diesler
Assignee: Thomas Diesler
Priority: Critical
Fix For: 7.2.0.Alpha1
For the first OSGi related deployments we intermittently see
{code}
Services with missing/unavailable dependencies" =>
["jbosgi.integration.PersistentBundles.INSTALL
Missing[JBAS014861: <one or more transitive
dependencies>]","jboss.deployment.unit.\"webapp.war\".REGISTER
{code}
which is due to a race condition at subsystem startup.
h4. Background
At startup the framework goes through various phases
# Framework.CREATE
# Framework.INIT
# Framework.ACTIVE
During framework INIT persistent bundles (i.e. from a former run) are installed/started
according to their persistent settings.
In terms of services it means that the Framework.INIT service may depend on a number of
Bundle.INSTALLED or Bundle.ACTIVE services. This however cannot be modelled as service
dependencies because it must be possible to uninstall a persistent bundle (i.e. remove the
Bundle.INSTALL) service without taking the framework down.
Currently, we use a ServiceListener for the persistent Bundle services and install a
PersistentBundles.COMPLETE service that Framework.INIT can actually depend on.
There is currently no guarantee that the PersistentBundles.COMPLETE service gets
installed (and as a consequence that the Framework.INIT starts up) before the OSGi
deployment does its phase checking for missing services.
AFAICS, there is currently no way to model this type of dependency properly without
having this race condition.
A possible solution may be a notion of DependencyType.WEAK. The semantic would be a
required dependency that can go away once the target service has reached its target state
(or has failed)
h4. Example
* serviceA depends on serviceB with DependencyType.WEAK
* serviceA starts when serviceB has started
* serviceA stays UP when serviceB gets removed
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira