@ Override public void updateMembers ( IEntityGroup eg ) throws GroupsException { Connection conn = null ; EntityGroupImpl egi = ( EntityGroupImpl ) eg ; if ( egi . isDirty ( ) ) try { conn = RDBMServices . getConnection ( ) ; setAutoCommit ( conn , false ) ; try { primUpdateMembers ( egi , conn ) ; commit ( conn ) ; } catch ( SQLException sqle ) { rollback ( conn ) ; throw new GroupsException ( "Problem updating memberships for " + egi , sqle ) ; } } catch ( SQLException sqlex ) { throw new GroupsException ( sqlex ) ; } finally { if ( conn != null ) { try { setAutoCommit ( conn , true ) ; } catch ( SQLException sqle ) { throw new GroupsException ( sqle ) ; } finally { RDBMServices . releaseConnection ( conn ) ; } } } }
Insert and delete group membership rows inside a transaction .