[
https://issues.jboss.org/browse/WFLY-10784?page=com.atlassian.jira.plugin...
]
Matej Novotny edited comment on WFLY-10784 at 8/27/18 8:44 AM:
---------------------------------------------------------------
Thanks [~brian.stansberry]
I can see where are you headed, but there is one problem.
I am probably missing how {{Service}} and {{DeploymentUnit}} with their {{Phase}} play
together - inside this new deployment processor, I will need to get hold of
[{{WeldBootstrap}}|https://github.com/weld/core/blob/master/impl/src/main/java/org/jboss/weld/bootstrap/WeldBootstrap.java]
which is stored in
[{{WeldBootstrapService}}|https://github.com/wildfly/wildfly/blob/master/weld/subsystem/src/main/java/org/jboss/as/weld/WeldBootstrapService.java#L64].
Now, with services, you could [inject other services
easily|https://github.com/wildfly/wildfly/blob/master/weld/subsystem/src/...],
but I am not sure how to get hold of it with deployment processors in a non-deprecated
way?
I was trying
{{DeploymentPhaseContext.getServiceRegistry().getService(WeldBootstrapService.SERVICE_NAME)}}
but that gives me {{ServiceController}} and all the means to get hold of actual service
instance seem to be deprecated (e.g. {{getValue()}} and {{getService()}} are deprecated).
As a matter of fact,
{{DeploymentPhaseContext.getServiceRegistry().getService(WeldBootstrapService.SERVICE_NAME)}}
returns {{null}} so it seems that you do not even have access to the service during
cleanup?
was (Author: manovotn):
Thanks [~brian.stansberry]
I can see where are you headed, but there is one problem.
I am probably missing how {{Service}} and {{DeploymentUnit}} with their {{Phase}} play
together - inside this new deployment processor, I will need to get hold of
[{{WeldBootstrap}}|https://github.com/weld/core/blob/master/impl/src/main/java/org/jboss/weld/bootstrap/WeldBootstrap.java]
which is stored in
[{{WeldBootstrapService}}|https://github.com/wildfly/wildfly/blob/master/weld/subsystem/src/main/java/org/jboss/as/weld/WeldBootstrapService.java#L64].
Now, with services, you could [inject other services
easily|https://github.com/wildfly/wildfly/blob/master/weld/subsystem/src/...],
but I am not sure how to get hold of it with deployment processors in a non-deprecated
way?
I was trying
{{DeploymentPhaseContext.getServiceRegistry().getService(WeldBootstrapService.SERVICE_NAME)}}
but that gives me {{ServiceController}} and all the means to get hold of actual service
instance seem to be deprecated (e.g. {{getValue()}} and {{getService()}} are deprecated).
WeldStartCompletionService failed when optional components not
installed
------------------------------------------------------------------------
Key: WFLY-10784
URL:
https://issues.jboss.org/browse/WFLY-10784
Project: WildFly
Issue Type: Bug
Components: CDI / Weld
Affects Versions: 12.0.0.Final, 13.0.0.Final
Reporter: Alexander Kudrevatykh
Assignee: Matej Novotny
Attachments: arq-test.tar.xz
WebComponents are optional and fail in initialising it not causes fail of deployment, but
when starting EAR application with included WAR fail in deployment since Wildfly 12
because WeldStartCompletionService depends on all components regardless of their type
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)