|Need help with program args during product update [message #778469]
||Thu, 12 January 2012 18:54
| Casey Marshall
Registered: July 2009
I have a product update situation which I'm trying to work through with p2 and need some advice.|
Our current deployed product is based on a 3.5.2 target and ships with a Java 1.5 JRE. Our latest upcoming release is based on 3.7.1 and ships with a Java 1.6 JRE.
Updating the JRE on Windows is complicated by the sticky situation whereby Windows exclusively locks the JRE files while the product is running. My solution to this limitation is to deploy the Java 1.6 JRE in a separate folder, jre6/ instead of jre/ in the product installation, and set the -vm program argument on install/update.
I'm at the point where I can get the JRE feature to provision and install during update alongside the old JRE on Windows. But I need to also update the application ini.
First I tried the new setJvm touchpoint in 3.7.1. But it fails during update, because the existing product is 3.5.2-based.
So I use addProgramArg to set the JVM, something like:
This touchpoint evaluates just fine when I create the product with the p2 director in my Buckminster-based build. It adds the program argument to the application.ini in the created product for a new distribution.
However, when I include the same JRE feature in a p2 update site, and try to update the 3.5.2-based product with the update site, the touchpoint does not execute; the -vm argument never gets added to the application.ini.
I have tried many permutations of adding the touchpoint to the product feature p2.inf, the product p2.inf, the update site, you name it.
- What am I doing wrong here?
- Is this a bug in the 3.5.2-target era p2 implementation which simply does not support the touchpoint properly?
- If addProgramArg touchpoint won't work for my product update scenario, is there a way to execute custom code (a custom touchpoint?!) during the update, something like the pre-p2 install handlers? It would have to be uploaded during the install process, as the functionality is not there in the old 3.5.2-based product... Are there any examples of this?
I realize what I'm doing here is not trivial. Self-updating the JRE with p2 is tricky!
Any help would be greatly appreciated (and rewarded with a frosty pint when you next find yourself in central Texas)!
Powered by FUDForum
. Page generated in 0.02169 seconds