@Override boolean insertRecord( OMElement record ) throws Exception { MetadataStoreTransaction trans = metadataStore.acquireTransaction(); try { List<String> performInsert = trans.performInsert( new InsertOperation( Collections.singletonList( MetadataRecordFactory.create( record ) ), null, null ) ); trans.commit(); if ( performInsert.isEmpty() ) return false; return true; } catch ( Exception e ) { trans.rollback(); throw e; } }
MetadataStoreTransaction ta = store.acquireTransaction();