Closed danielkelemen closed 7 months ago
Removing potential label as the ticket will not be tackled in 7.20
When working on this please watch out for this issue: https://github.com/camunda/camunda-bpm-platform/issues/3584#issuecomment-1723338290 More input: https://github.com/camunda/camunda-bpm-platform/issues/3584#issuecomment-1727604281
Thoughts on this task: We might need to consider not only moving away from deprecated API. But first check how subsystems are written these days and learn from it.
when adjusting the code in ProcessApplicationStartService#start
to register the process application service:
MscManagedProcessApplication managedProcessApplication = new MscManagedProcessApplication(processApplicationInfo, processApplication.getReference());
ServiceBuilder<?> serviceBuilder = context.getChildTarget().addService();
serviceBuilder.provides(serviceName);
serviceBuilder.setInstance(managedProcessApplication);
serviceBuilder.install();
doesn't pass the name correctly and can't be use in the tracking service ServiceTracker#handleEvent
.
When ServiceTarget#addService()
API is used the service name (link) is not populated correctly so it ends up with a new value. That leads to the above error but also to failure when container.dumpServices();
(link) is used.
Therefore, that seems as a potential bug in JBoss MSC API.
Decision: Use ServiceTarget#addService(serviceName)
for the time being to ensure correct name resolving.
Acceptance Criteria (Required on creation)
Hints
org.jboss.msc.service.ServiceBuilder.addDependency(ServiceName, Class, Injector)
requires(ServiceName)
instead.org.jboss.msc.service.ServiceTarget.addService(ServiceName, Service)
addService()
instead.MscManagedProcessApplication
is registered as a child and ensure process applications service name is correctly resolved (test failure, code revert)org.jboss.msc.value.InjectedValue<T>
org.jboss.msc.service.ServiceBuilder.requires(org.jboss.msc.service.ServiceName)
method instead.org.jboss.msc.inject.Injector<T>
org.jboss.msc.service.ServiceBuilder.provides(org.jboss.msc.service.ServiceName)
method instead.org.jboss.msc.service.ServiceBuilder.addAliases(ServiceName...)
provides(ServiceName)
instead.org.jboss.threads.ExecutionTimedOutException
org.jboss.modules.ModuleIdentifier
org.jboss.modules.Module.getIdentifier()
getName()
instead.getServiceTarget()
inorg.jboss.as.server.deployment.DeploymentPhaseContext
has been deprecated and marked for removalgetRequirementServiceTarget()
instead.getServiceTarget()
inorg.jboss.as.controller.OperationContext
has been deprecated and marked for removalgetCapabilityServiceTarget()
instead.org.jboss.as.controller.AbstractAddStepHandler.AbstractAddStepHandler(AttributeDefinition...)
java.lang.Class.newInstance()
Constructor.newInstance
method instead.SecurityManager
&AccessController
inTccl.runUnderClassloader
Out of scope
org.jboss.msc.Service
Links
Breakdown