Project

General

Profile

« Previous | Next » 

Revision 7188

share the same dbConnection when inserting and then updating SystemMetadata objects in the backing store.
any errors encountered during the update will rollback the entire transaction and the SM record will not exist, even in part.

View differences:

HazelcastService.java
442 442
	private void saveLocally(SystemMetadata sm) {
443 443
		logMetacat.debug("Saving entry locally: " + sm.getIdentifier().getValue());
444 444
		try {
445
			if (!IdentifierManager.getInstance().systemMetadataExists(sm.getIdentifier().getValue())) {
446
				IdentifierManager.getInstance().insertSystemMetadata(sm);
447
				
448
			} else {
449
				IdentifierManager.getInstance().updateSystemMetadata(sm);
450
				
451
			}
445

  
446
			IdentifierManager.getInstance().insertOrUpdateSystemMetadata(sm);
447

  
452 448
		} catch (McdbDocNotFoundException e) {
453 449
			logMetacat.error("Could not save System Metadata to local store.", e);
454 450
			

Also available in: Unified diff