[jboss-as7-dev] [AS7-5477] Allow processing of the module phase to be deferred
Thomas Diesler
thomas.diesler at jboss.com
Thu Sep 27 18:31:31 EDT 2012
Folks,
the patch set is ready for review: #3117
<https://github.com/jbossas/jboss-as/pull/3117>
This functionality is constraint to osgi only. If there is a bundle
deployment that cannot resolve (possibly the user said so) I'll set the
FIRST_MODULE_USE phase to initial NEVER. The deployment hangs in the
configure module phase and awaits an external trigger. The bundle is
metadata valid and in state Bundle.INSTALLED.
A Bundle.start() operation sets up a service tracker and activates the
deferred phase. this only succeeds if the bundle can get resolved and
has a Module attached. The bundle deployment proceeds through the phases
and activates. If there is failure in any of the tracked services
Bundle.start() will fail with the root cause and the FIRST_MODULE_USE
phase is set back to NEVER - this is a partial undeploy. After
correcting the problem the user can re-attempt a Bundle.start().
In case of bundles contained in an EAR, I set the FIRST_MODULE_USE phase
of the EAR to PASSIVE.
It is possible that some DUPs dont support repeated deploy calls (yet).
In which case they use
DeploymentUtils.skipRepeatedActivation(deploymentUnit, 0)
with the number of attempts they do support (see
ModuleJndiBindingProcessor
<https://github.com/tdiesler/jboss-as/commit/0f7fd068206f2a49c006f3c633057a2f3fcbdad6#diff-0>).
Some techs that support bundle deployments (i.e.
web,jaxrs,jaxws,jpa,cdi,ejb3) may still need more work to support
restart after failure. This can be done on a case by case basis.
Generally DUPs can now assume that a module is attached for a host
bundle deployment. In case of an unresolved bundle deployment we don't
miss the work they do any more. However, we still need the module not
null checks because bundle fragment deployments never have a module.
They attach to a host and use that class loader.
Thoughts?
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/20120928/dec0b4a1/attachment-0001.html
More information about the jboss-as7-dev
mailing list