Imagine I have the following setup:
- A Spring Boot application.
- Inside it is a Camunda workflow engine.
- There are multiple components (
@org.springframework.stereotype.Component) inside that application that are written in Clojure and are used by the Camunda workflow engine.
I heard that allegedly it is possible to modify the code of a Clojure application without restarting it.
So, I want to
- modify the code of those components (without restarting the application),
- add new components to the application (without restarting the application), and
- after I'm done prototyping, download the current version of all components there.
The idea is that I prototype the components from the REPL until they work as designed. This means that the Camunda workflow engine will use the components modified by my actions on the REPL.
Then, I download the current version of the components in the application (so that they are not lost when the application is shut down). This code is then cleaned up, refactored, covered by unit tests and put under version control.
Question:
- Is it theoretically possible to implement such workflow with Clojure (not necessarily out of the box)?
- Are there any known limitations which would make such workflow absolutely impossible?
Update 1
Found following projects which prima facie allow you to interact with Java code using a REPL:
However, I don't know whether you can use them to change the code.
