List of usage examples for org.springframework.transaction.annotation Isolation READ_COMMITTED
Isolation READ_COMMITTED
To view the source code for org.springframework.transaction.annotation Isolation READ_COMMITTED.
Click Source Link
From source file:com.inkubator.hrm.service.impl.LoginHistoryServiceImpl.java
@Override @Transactional(readOnly = true, propagation = Propagation.SUPPORTS, isolation = Isolation.READ_COMMITTED, timeout = 30) public Long getTotalLoginHistoryByParam(LoginHistorySearchParameter searchParameter) throws Exception { return this.loginHistoryDao.getTotalLoginHistoryByParam(searchParameter); }
From source file:com.inkubator.hrm.service.impl.BioDataServiceImpl.java
@Override @Transactional(readOnly = false, isolation = Isolation.READ_COMMITTED, propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public void update(BioData entity) throws Exception { Long totalDuplicateNpwp = bioDataDao.getTotalByNpwpAndNotId(entity.getNpwp(), entity.getId()); if (totalDuplicateNpwp > 0) { throw new BussinessException("biodata.error_duplicate_npwp"); }/*w w w . ja va 2s . c o m*/ BioData bioData = this.bioDataDao.getEntiyByPK(entity.getId()); bioData.setBloodType(entity.getBloodType()); bioData.setCity(this.cityDao.getEntiyByPK(entity.getCity().getId())); bioData.setDateOfBirth(entity.getDateOfBirth()); bioData.setDialect(this.dialectDao.getEntiyByPK(entity.getDialect().getId())); bioData.setFirstName(entity.getFirstName()); bioData.setMiddleName(entity.getMiddleName()); bioData.setGender(entity.getGender()); bioData.setJamsostek(entity.getJamsostek()); bioData.setLastName(entity.getLastName()); bioData.setMaritalStatus(this.maritalStatusDao.getEntiyByPK(entity.getMaritalStatus().getId())); bioData.setMobilePhone(entity.getMobilePhone()); bioData.setNationality(nationalityDao.getEntiyByPK(entity.getNationality().getId())); bioData.setNickname(entity.getNickname()); bioData.setNoKK(entity.getNoKK()); bioData.setNpwp(entity.getNpwp()); if (entity.getPathFinger() != null) { bioData.setPathFinger(entity.getPathFinger()); } if (entity.getPathFoto() != null) { bioData.setPathFoto(entity.getPathFoto()); } if (entity.getPathSignature() != null) { bioData.setPathSignature(entity.getPathSignature()); } bioData.setPersonalEmail(entity.getPersonalEmail()); bioData.setRace(this.raceDao.getEntiyByPK(entity.getRace().getId())); bioData.setReligion(this.religionDao.getEntiyByPK(entity.getReligion().getId())); bioData.setTitle(entity.getTitle()); bioData.setUpdatedBy(UserInfoUtil.getUserName()); bioData.setUpdatedOn(new Date()); this.bioDataDao.update(bioData); }
From source file:com.inkubator.hrm.service.impl.MecineFingerServiceImpl.java
@Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED, propagation = Propagation.SUPPORTS, timeout = 50) public List<MecineFinger> getAllData() throws Exception { return mecineFingerDao.getAllData(); }
From source file:org.jasig.schedassist.impl.relationship.advising.AdvisorListRelationshipDataSourceImpl.java
/** * This method deletes all existing rows from the isis_records table, then invokes * {@link #batchLoadData(Resource)} to refresh it. * //from w w w . j a v a 2 s .co m * This method is marked with Spring's {@link Transactional} annotation, and if * the available application is running should only be executed when transactional * support is available. * * @see Transactional * @param resource * @throws IOException */ @Transactional(isolation = Isolation.READ_COMMITTED, propagation = Propagation.REQUIRES_NEW) public synchronized void reloadData() { final String propertyValue = System.getProperty("org.jasig.schedassist.runScheduledTasks", "true"); if (Boolean.parseBoolean(propertyValue)) { String currentTerm = TermCalculator.getCurrentTerm(); if (isResourceUpdated(advisorListResource)) { LOG.info("resource updated, reloading advisorList data"); List<StudentAdvisorAssignment> records = readResource(advisorListResource, currentTerm); LOG.info("deleting all existing records from advisorlist table"); StopWatch stopWatch = new StopWatch(); stopWatch.start(); this.getJdbcTemplate().execute("delete from advisorlist"); long deleteTime = stopWatch.getTime(); LOG.info("finished deleting existing (" + deleteTime + " msec), starting batch insert"); stopWatch.reset(); stopWatch.start(); SqlParameterSource[] batch = SqlParameterSourceUtils.createBatch(records.toArray()); this.getSimpleJdbcTemplate().batchUpdate( "insert into advisorlist (advisor_emplid, advisor_relationship, student_emplid, term_description, term_number, advisor_type, committee_role) values (:advisorEmplid, :advisorRelationshipDescription, :studentEmplid, :termDescription, :termNumber, :advisorType, :committeeRole)", batch); long insertTime = stopWatch.getTime(); stopWatch.stop(); LOG.info("batch insert complete (" + insertTime + " msec)"); LOG.info("reloadData complete (total time: " + (insertTime + deleteTime) + " msec)"); this.lastReloadTimestamp = new Date(); try { this.resourceLastModified = advisorListResource.lastModified(); } catch (IOException e) { LOG.debug("ignoring IOException from accessing Resource.lastModified()"); } } else { LOG.info("resource not modified since last reload, skipping"); } } else { LOG.debug("ignoring reloadData as 'org.jasig.schedassist.runScheduledTasks' set to false"); } }
From source file:com.inkubator.hrm.service.impl.TempAttendanceRealizationServiceImpl.java
@Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED, propagation = Propagation.SUPPORTS, timeout = 30) public Long getTotalTempAttendanceRealizationByParam(TempAttendanceRealizationSearchParameter searchParameter) throws Exception { return this.tempAttendanceRealizationDao.getTotalTempAttendanceRealizationByParam(searchParameter); }
From source file:com.inkubator.hrm.service.impl.LoginHistoryServiceImpl.java
@Override @Transactional(readOnly = true, propagation = Propagation.SUPPORTS, isolation = Isolation.READ_COMMITTED, timeout = 30) public Long getTotalLogin() throws Exception { return this.loginHistoryDao.getTotalLogin(); }
From source file:com.inkubator.hrm.service.impl.ProscessToApproveServiceImpl.java
@Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED, propagation = Propagation.SUPPORTS, timeout = 30) public Long getTotalLoginHistoryByParam(ProscessToApproveSearchParameter searchParameter) throws Exception { return this.proscessToApproveDao.getTotalLoginHistoryByParam(searchParameter); }
From source file:com.inkubator.hrm.service.impl.SystemLetterReferenceServiceImpl.java
@Override @Transactional(readOnly = false, isolation = Isolation.READ_COMMITTED, propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public void update(SystemLetterReference systemLetterReference) throws Exception { //Uncomment below if u have unik code //long totalDuplicates = systemLetterReferenceDao.getTotalByCodeAndNotId(systemLetterReference.getCode(),systemLetterReference.getId()) //if (totalDuplicates > 0) { //throw new BussinessException("systemLetterReference.error_duplicate_code") //}//www .j av a 2 s . c o m SystemLetterReference systemLetterReference1 = systemLetterReferenceDao .getEntiyByPK(systemLetterReference.getId()); systemLetterReference1.setUpdatedBy(UserInfoUtil.getUserName()); systemLetterReference1.setUpdatedOn(new Date()); systemLetterReference1.setLetterSumary(systemLetterReference.getLetterSumary()); systemLetterReference1.setDescription(systemLetterReference.getDescription()); systemLetterReference1.setName(systemLetterReference.getName()); systemLetterReference1.setUploadData(systemLetterReference.getUploadData()); systemLetterReference1.setCode(systemLetterReference.getCode()); systemLetterReferenceDao.update(systemLetterReference1); }
From source file:com.inkubator.hrm.service.impl.PayTempKalkulasiServiceImpl.java
@Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED, propagation = Propagation.SUPPORTS, timeout = 30) public Long getTotalData() throws Exception { return payTempKalkulasiDao.getTotalData(); }
From source file:de.thm.arsnova.services.UserService.java
@Override @Transactional(isolation = Isolation.READ_COMMITTED) public void addUserToSessionBySocketId(final UUID socketId, final String keyword) { final User user = socketid2user.get(socketId); user2session.put(user, keyword);/*from ww w .j a v a 2s .c om*/ }