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:

SystemMetadataMap.java
41 41
	public void store(Identifier pid, SystemMetadata sm) {
42 42
		try {
43 43
			logMetacat.debug("Storing System Metadata to store: " + pid.getValue());
44
			if (!IdentifierManager.getInstance().systemMetadataExists(pid.getValue())) {
45
				IdentifierManager.getInstance().insertSystemMetadata(sm);
46
				
47
			} else {
48
				IdentifierManager.getInstance().updateSystemMetadata(sm);
49
				
50
			}
51
			
44
			IdentifierManager.getInstance().insertOrUpdateSystemMetadata(sm);
52 45
		} catch (McdbDocNotFoundException e) {
53 46
			throw new RuntimeException(e.getMessage(), e);
54 47
			

Also available in: Unified diff