dev@glassfish.java.net

Re: params for getInhabitantByContract()? (issue 15195)

From: Bobby Bissett <bobby.bissett_at_oracle.com>
Date: Fri, 17 Dec 2010 12:44:10 -0500

Thanks Tim/Tom for the suggestions.

I think I'm going with just moving the GMSConfigUpgrade class -- it has no dependencies on GMS and only works on the config-api objects. Thus, it's now in the same package as similar classes (e.g. GrizzlyConfigSchemaMigrator). So the whole fix is 4 lines of code plus comments. I think Tim actually gave me this idea, courtesy of Jerome:

http://wikis.sun.com/display/GlassFish/V3.1UpgradeDashboard#V3.1UpgradeDashboard-Howtoimplementupgrade

So the only diffs, besides moving the one file, look like this:

Index: admin/config-api/src/main/java/org/glassfish/config/support/UpgradeService.java
===================================================================
--- admin/config-api/src/main/java/org/glassfish/config/support/UpgradeService.java (revision 43776)
+++ admin/config-api/src/main/java/org/glassfish/config/support/UpgradeService.java (working copy)
@@ -72,6 +72,14 @@
     @Inject
     Domain domain;
 
+ /*
+ * Required to make gms changes before any changes to a cluster
+ * or config can be saved. This is because GMS changed attribute
+ * names from v2 to 3.1. (Issue 15195.)
+ */
+ @Inject
+ GMSConfigUpgrade notUsed;
+
     private final static Logger logger = Logger.getAnonymousLogger();

Will check to see where else it's needed, but I know I need it in UpgradeService and SystemPropertyUpgrade.

Cheers,
Bobby