instance = (MapServiceInstance) mapService.getMapServicePool()
.checkoutIdleInstance();
HashMap<FeatureId, Boolean> updates = null;
try {
Layer layer = instance.getMap().getLayer(nLayerId);
updates = layer.update(featureCollection);
} finally {
if (instance != null) {
mapService.getMapServicePool().checkinIdelInstance(
instance);
}