@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; } }
ta.commit(); } catch ( Throwable e ) { ta.rollback();
Collections.singletonList( profile ), null, null ) ); trans.commit(); if ( !performInsert.isEmpty() ) { LOG.info( "Inserted profile with id " + performInsert.get( 0 ) );