[AS7-5477] Allow processing of the module phase to be deferred
by Thomas Diesler
Stuart,
I implement the first cut of this as we talked about.
The DeferredModuleUseProcessor adds a the module service as a dependency
on the next phase, which is FISRT_MODULE_USE. This is actually something
I previously already did for resolved bundles - now I do it always in
this DUP.
The DeploymentUnitPhaseService makes Phase.FISRT_MODULE_USE passive if
it sees explicitly named services in
Attachments.DEFERRED_MODULE_DEPENDENCIES
The processing is currently limited to OSGi only and this patch should
not effect other deployment types. The OSGi testsuite passes completely
with a few deployments hanging in Phase.FISRT_MODULE_USE before they
triggered to proceed by an explicit API call which resolves the bundle
and hance makes the module service available.
TODO:
* Think about whether Phase.FISRT_MODULE_USE should always depend on the
Module service
* Remove all module == null checks in FISRT_MODULE_USE DUPs and after.
cheers
--thomas
--
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
JBoss OSGi Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
12 years, 3 months
PTO
by Kabir Khan
Hi,
I will be on PTO from this Thursday and get back on 15 October (although I will be at home from the 12th sometime). I won't have VPN access but if anything urgent comes up, get in touch on kabir_at_home(a)yahoo.co.uk.
Cheers,
Kabir
12 years, 3 months
Graceful Shutdown (Revision 2)
by Jason T. Greene
*EDITED*
We've worked out the rough outline of how graceful shutdown will work in
AS7.
The process of graceful shutdown actually is reflected by a number of
states:
1. Running - all services acting normally
2. Suspending - services refuse new "permits" (see below), existing
permits are allowed to be retained (and threads running under such a
permit may still acquire new permits)
3. Suspended - no permits are present and none may be issued
4. Shutting Down - our existing server stop process / reload admin mode
The following transitions are allowed:
1. Running → Suspending: Transition occurs at user request (to suspend
or gracefully shut down).
2. Suspending → Suspended: Transition occurs when all permits are cleared.
3. Suspending → Running: Transition occurs at user request (to exit
suspend mode or cancel graceful shutdown before it completes).
4. Suspended → Running: Transition occurs at user request (to exit
suspend mode).
5. Suspended → Shutting Down: Transition occurs automatically (if a
graceful shutdown was requested) or at user request (if a shut down
request of any kind is entered in the Suspended state).
6. Running → Shutting Down: Transition occurs at user request (to shut
down the server "un-gracefully").
7. Suspending → Shutting Down (User aborts a graceful shutdown)
These "permits" are issued by the "Shutdown Manager", whose job is to
manage these states. They are issued corresponding to the following events:
1. The invocation of an EJB method
2. The creation of a web session
3. A creation of a transaction
4. MessageEndpoint and WorkManager aquire permit allowing for release()
from a thirdparty to indicate connection close.
When a permit cannot be issued due to the server shutting down, a
standard exception message should be produced so that the user can see a
familiar error message regardless of what mechanism is used to access
the server.
--
- DML
_______________________________________________
jboss-as7-dev mailing list
jboss-as7-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
12 years, 3 months
JBoss Modules: can I dynamically add dependency?
by ssilvert@redhat.com
I have a module defined like this (currently in master with main and
slot="1.2):
<module xmlns="urn:jboss:module:1.1" name="org.jboss.as.jsf-injection">
<resources>
<resource-root
path="jboss-as-jsf-injection-7.2.0.Alpha1-SNAPSHOT.jar"/>
</resources>
<dependencies>
<module name="com.sun.jsf-impl"/> <----- this needs to be dynamic
<module name="javax.api"/>
<module name="org.jboss.as.web"/>
<module name="javax.servlet.api"/>
</dependencies>
</module>
Inside a DeploymentUnitProcessor, the module above is added to the
ModuleSpecification along with the module for the selected JSF
implementation. The problem I have is that the JSF Injection code is
the same for any Mojarra implementation. But to support multiple
implementations I need to declare a separate jsf-injection module with a
hard-coded dependency on each implementation installed.
If I could create a module dynamically and dynamically add its
dependencies then there would be no need to create more and more modules
containing the same jsf-injection jar.
I've been looking at the JBoss Modules API and I don't see how to do
this. Is it possible?
Stan
12 years, 3 months