public void createReference(Reference reference) throws GreenPepperServerException {
        try {
            sessionService.startSession();
            sessionService.beginTransaction();

            Repository repository = loadRepository(reference.getSpecification().getRepository().getUid());


            documentDao.createReference(reference);

            sessionService.commitTransaction();
            log.debug("Created Reference: " + reference.getRequirement().getName() + "," + reference.getSpecification().getName());
        } catch (Exception ex) {
            sessionService.rollbackTransaction();
            throw handleException(REFERENCE_CREATE_FAILED, ex);
        } finally {
            sessionService.closeSession();
        }
    }
public void createReference ( Reference reference ) throws GreenPepperServerException { try { sessionService . startSession ( ) ; sessionService . beginTransaction ( ) ; Repository repository = loadRepository ( reference . getSpecification ( ) . getRepository ( ) . getUid ( ) ) ; documentDao . createReference ( reference ) ; sessionService . commitTransaction ( ) ; log . debug ( "Created Reference: " + reference . getRequirement ( ) . getName ( ) + "," + reference . getSpecification ( ) . getName ( ) ) ; } catch ( Exception ex ) { sessionService . rollbackTransaction ( ) ; throw handleException ( REFERENCE_CREATE_FAILED , ex ) ; } finally { sessionService . closeSession ( ) ; } }
{@inheritDoc}