Updating Projects via Java

When we release a new version of our module we also release new versions of our projects bundled into the module. When the new version is launched then we use java to copy the project files from our modl package into the GW filesystem and then we call projectMgr.requestScan() to load in the updates.

This was all working fine [ we think ] until we realised that artifacts were being left behind if anything within the projects had changed name or something. So then we started to use projectMgr.deleteProject() to tidy up prior to installing the new version. However this now triggers the projectDeleted() callback which means our customers have to go around restarting all their projects which is a bit of a PITA.

Am I just doing this all wrong or am I missing something obvious?

About the best I've come up with so far is to maybe take a look through the GW filesystem and see if there are any files that have been removed from our updated project and just delete them from the GW.

Thanks

Reconsider delivering projects inside your java modules? Seems unwise to me. :zany_face:

2 Likes

Or stop worrying about project restarts during installation, because module hot loading is going away?

2 Likes