camunda-bpm-platform
camunda-bpm-platform copied to clipboard
Refactor Camunda subsystem to use WildFly `subsystem` and `service` libraries
Acceptance Criteria (Required on creation)
- Prerequisite: we know how to refactor the source code that uses
org.jboss.msc.service.ServiceController.getService()/getValue()
. - Camunda subsystem use WildFly
subsystem
andservice
instead of JBoss MSC API
Hints
- Created on behalf of https://github.com/camunda/camunda-bpm-platform/issues/3780#issuecomment-1940789819
- Libraries are introduced in WildFly 31: https://www.wildfly.org/news/2024/01/25/WildFly31-Released/
- https://github.com/camunda/camunda-bpm-platform/issues/4103
Links
Breakdown
### Pull Requests
Notes from innovation week:
- I didn't find any docs beside javadocs in the classes
- Overall the issue with usage of non-encapsulated service is still problematic. We will need to re-write no matter of which new API we decide to use (org.jboss.msc.Service or the wildfly libraries)
-
subsystem
- the library is used here: https://github.com/wildfly/wildfly-core/blob/23.0.3.Final/discovery and gives insights how to use the API
- Attempt to use the library in our subsystem: https://github.com/camunda/camunda-bpm-platform/compare/master...4104-innovation-week
- If we re-write the subsystem and draw the line, there might be more code that we have today.
- But some of the code might be easier to read and understand if we adopt the library
-
service
- There's a lot of code duplication from the
subsystem
module, that gives me a bit of uncertainty in the two libraries. But the author as far as I saw in the most classes is the same. Maybe they can improve that in the future. - Attempt to use the library in our subsystem: https://github.com/camunda/camunda-bpm-platform/compare/master...4104-innovation-week-services
- adjusted only
MscRuntimeContainerDelegate
andMscBpmPlatformPlugins
data don't have a lot of code => local run of engine IT was green with the changes - code can be reduce and readability improved if we adopt the library API
- start and stop service methods must be re-written with tasks (
org.wildfly.service.Installer.UnaryBuilder.onStart(Consumer<T>)
)
- adjusted only
- There's a lot of code duplication from the
- I raised https://github.com/jboss-msc/jboss-msc/pull/136 as I still think, there's an issue in JBoss MSC when the
serviceId=null
- Reported https://issues.redhat.com/browse/MSC-345