configuration.setContact(getFactory().createContact());
}
// retrieve existing global
GeoServerInfo currentGlobal = getGlobal();
GeoServerInfoImplHb merged = null;
if (currentGlobal == null) {
if (LOGGER.isLoggable(Level.INFO))
LOGGER.info("Storing first instance of GeoServerInfo");
GeoServerInfoImplHb inserted = (GeoServerInfoImplHb) this.serviceDAO
.save(configuration);
inserted.copyTo((GeoServerInfoImplHb) configuration);
((GeoServerInfoImplHb) configuration).setId(inserted.getId());
} else {
GeoServerInfoImplHb oldconf = (GeoServerInfoImplHb) currentGlobal;
GeoServerInfoImplHb newconf = (GeoServerInfoImplHb) configuration;
newconf.setId(oldconf.getId());
merged = (GeoServerInfoImplHb) this.serviceDAO.update(newconf);
merged.copyTo(newconf);
}
JAIInitializer initializer = new JAIInitializer();