Skip to content

MJAUU - My JAU Updater (Update the Java-Auto-Update itself )

My JAU Updater

UseCase

Business Value

Allow for automatic update of Java-auto-updater on remote locations.

MJAUU State and Events

State Event Notification Comment
UpgradeRequired New Config is made available in CS
Started MjauuStarted
UnzipOk/UnzipFailed Ok = continue. Failed = pause process
BackupJauOk/Failed
UninstallOk/Failed Failed due to missing access
UpdatedConfig Update JAU´s local configuration.
JauInstalledOk/JauInstallFailed
JauStartedOk/JauStartFailed
Sucess UpgradeSuccess Verify JAU started with new and correct configuration. CS must provide JAU with new agent config on next sync.
MjaauuFinished MJAUU will terminate, and exit.

Alternative ending

State Event Notification Comment
Failure UpgradeFailed
MjauuFinished Manual interception will be required

Main functionallity:

  1. Download required artifacts.
  2. Start mjauu
  3. Check if another instance of MJAUU has started?
  4. Unpack new version of JAU to tmp area
  5. Verify unpacking?
  6. Stop JAU service
  7. Verify MJAUU has write access to JAU files.
  8. Remove JAU service from Windows Services
  9. Move JAU files in place
  10. Update configuration files.
  11. Install JAU service
  12. Report status to CS
  13. Start JAU service
  14. Report status to CS
  15. Stop MJAUU

CS = Config Service
JAU = Java Auto Update
MJAUU = My JAU Updater

Logs from MJAUU should be forwarded to CS.

Download artifacts:
  • start-majuu.bat
  • mjauu-.jar
  • jau-.zip
start-mjauu

This .sh/.bat file will have a single responsibillity:

  • Start mjauu in separate process.
    It is essential that the mjauu process runs, when JAU process is killed. This is due to beeing able to safely overwrite existing files.
mjauu

mjauu must be easy to start, and possibly without command line arguments. is started with "java ~~jar mjauu~~.jar"
TODO: figure out how to forward client spesific content to mjauu, if needed.

jau-.zip

This is the new package of all contents needed for JAU.

Code

References

Design notes