// configure the GSS service
GeoServer gs = getGeoServer();
GSSInfo gssInfo = gs.getService(GSSInfo.class);
gssInfo.setMode(GSSMode.Central);
gssInfo.setVersioningDataStore(getCatalog().getDataStoreByName("synch"));
gs.save(gssInfo);
// initialize the GSS service
Map gssBeans = applicationContext
.getBeansOfType(DefaultGeoServerSynchronizationService.class);
gss = (DefaultGeoServerSynchronizationService) gssBeans.values().iterator().next();