final Transaction t = new Transaction();
try {
for (Application app : domain.getApplications().getApplications()) {
System.out.println("Checking app " + app.getName());
Application app_w = null;
Property oldSetting = app.getProperty(V3_0_1_JAVA_WEB_START_ENABLED_PROPERTY_NAME);
if (oldSetting != null) {
logger.log(Level.INFO, "For application {0} converting property {1} to {2}",
new Object[] {
app.getName(),
V3_0_1_JAVA_WEB_START_ENABLED_PROPERTY_NAME,
GF3_1_JAVA_WEB_START_ENABLED_PROPERTY_NAME});
app_w = t.enroll(app);
addProperty(GF3_1_JAVA_WEB_START_ENABLED_PROPERTY_NAME,
oldSetting.getValue(), app_w);
app_w.getProperty().remove(oldSetting);
}
for (Module mod : app.getModule()) {
if (mod.getEngine(APPCLIENT_SNIFFER_NAME) != null) {
/*
* This is an app client. See if the client has
* a property setting using the old name.
*/
oldSetting = mod.getProperty(V3_0_1_JAVA_WEB_START_ENABLED_PROPERTY_NAME);
if (oldSetting != null) {
logger.log(Level.INFO, "For application {0}/module {1} converting property {2} to {3}",
new Object[] {
app.getName(),
mod.getName(),
V3_0_1_JAVA_WEB_START_ENABLED_PROPERTY_NAME,
GF3_1_JAVA_WEB_START_ENABLED_PROPERTY_NAME});
final Module mod_w = t.enroll(mod);
addProperty(GF3_1_JAVA_WEB_START_ENABLED_PROPERTY_NAME,
oldSetting.getValue(),
mod_w);
mod_w.getProperty().remove(oldSetting);
}
}
}