hotreload on command for openliberty dev mode

69 Views Asked by At

We run openliberty in dev mode for integration testing. Its a great feature however the problem is that while the developer is still making code changes, openliberty eagerly tries to hotreload every change(I guess its polling for changes every x sec).

This breaks the developer's flow.

Is there a way to tell openliberty to only do hotreload after the developer is finished with their code changes?

Note: slow disk access might be contributing to the long openliberty hotreload cycles for us. Unfortunately that is out of our hands so we wanted to know if there is a way to control the hotreload please.

1

There are 1 best solutions below

5
On

Interesting question. The short answer is "no".

Some options:

1. Poll less frequently

The default is every 500ms. You can use server.xml configuration to increase the polling interval, e.g. <applicationMonitor pollingRate="3m">

2. Use debugger Hot Code Replace

Explained in another answer. As noted, however, there are certain changes, like modifying method signatures, that you can't make via debugger HCR.

Other thoughts

If you still have thoughts or concerns, let me invite you to reach out to the development team on our Gitter chat channel at: https://gitter.im/OpenLiberty/developer-experience. Perhaps we could consider a feature enhancement, but it'd be interesting to hear more about your workflow first.

For example, I'm wondering what's so disruptive to your workflow with the current behavior? If you ultimately have to wait for the last change to take effect in order to exercise the latest behavior, what's the problem if the app is restarting along the way in the meantime? But that might be better to address in a chat discussion than in this particular question.