List of usage examples for org.springframework.transaction.annotation Propagation REQUIRED
Propagation REQUIRED
To view the source code for org.springframework.transaction.annotation Propagation REQUIRED.
Click Source Link
From source file:io.strandberg.xadisk.XADiskFileServiceImpl.java
@Override @Transactional(propagation = Propagation.REQUIRED) public XAFileInputStream createXAFileInputStream(File f, boolean lockExclusively) throws XADiskException { try {/*from w w w. java2 s.c o m*/ return sessionFactory.getXASession().createXAFileInputStream(f, lockExclusively); } catch (Exception e) { throw new XADiskException(e); } }
From source file:com.mycompany.capstone.dao.RoleDaoDbImpl.java
@Override @Transactional(propagation = Propagation.REQUIRED) public Role getRoleByRoleName(String role) { return jdbcTemplate.queryForObject(SQL_GET_ROLE_BY_ROLE_NAME, new RoleMapper(), role); }
From source file:DataBaseAcessLayer.UserDAOImpl.java
@Override @Transactional(readOnly = false, propagation = Propagation.REQUIRED) public void removeUser(Utilisateur utilisateur) { org.hibernate.classic.Session session = hibernateTemplate.getSessionFactory().getCurrentSession(); session.delete(utilisateur);/*from w w w .j ava 2 s .c o m*/ System.out.println(utilisateur.toString()); }
From source file:net.awired.generic.jpa.dao.impl.NestedSetDaoImpl.java
@Override @Transactional(propagation = Propagation.REQUIRED) public void persist(ENTITY object) { if (object.getParentId() != null) { try {/*w w w . j ava 2 s.c o m*/ ENTITY parent = find(object.getParentId()); List<ENTITY> entities = findByThreadId(parent.getThreadId()); entities.add(object); rebuildLeftRightThreadBasedOnParent(entities); } catch (NotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } } else { super.persist(object); rebuildLeftRightThreadBasedOnParent(ImmutableList.of(object)); } super.persist(object); }
From source file:com.filesprocessing.service.FilesProcessingService.java
@Transactional(propagation = Propagation.REQUIRED, readOnly = false) public void delete(Filesprocessing fProc) { filesProcDAO.delete(fProc); }
From source file:com.lewischooman.services.IMovieShowSrv.java
@Transactional(value = "txManager", propagation = Propagation.REQUIRED)
List<MovieDB> getMoviesByDate(Date dateFrom, Date dateTo);
From source file:pe.egcc.eureka.app.layer.dao.impl.OrderDaoImpl.java
@Override @Transactional(propagation = Propagation.REQUIRED) public void procesarVenta(Orders order, Order_details order_detail) { String sql = "INSERT INTO shop.orders (delivery_name, delivery_address, cc_number) VALUES (?,?,?)"; Object[] parms = { order.getDelivery_name(), order.getDelivery_address(), order.getCc_number() }; jdbcTemplate.update(sql, parms);/*w w w.j a v a2 s .c o m*/ sql = "INSERT INTO shop.order_details (book_id, title, author, quantity, price, order_id) VALUES (?,?,?,?,?,?)"; Object[] parms2 = { order_detail.getBook_id(), order_detail.getTitle(), order_detail.getAuthor(), order_detail.getQuantity(), order_detail.getPrice(), order_detail.getOrder_id() }; jdbcTemplate.update(sql, parms2); }
From source file:com.mycompany.flooringmvc.dao.TaxesDaoDbImpl.java
@Override @Transactional(propagation = Propagation.REQUIRED) public Tax get(int id) { return jdbcTemplate.queryForObject(SQL_GET_TAX, new TaxMapper(), id); }
From source file:it.geosolutions.geobatch.ftpserver.dao.hibernate.HibFtpPropsDAO.java
@Transactional(propagation = Propagation.REQUIRED) public void delete(final Long id) throws DAOException { FtpProps props = super.findById(id, true); super.makeTransient(props); }
From source file:uk.ac.ebi.intact.editor.services.curate.publication.DatasetPopulator.java
@Transactional(value = "jamiTransactionManager", readOnly = true, propagation = Propagation.REQUIRED) public void loadData() { if (log.isInfoEnabled()) log.info("Loading datasets"); synchronized (this) { if (isInitialised) { this.allDatasets = null; this.allDatasetSelectItems = null; isInitialised = false;// w w w .jav a2 s . co m } final Query query = getIntactDao().getEntityManager().createQuery( "select distinct(a.value) from PublicationAnnotation a where a.topic.shortName = :datasetTopic order by a.value asc"); query.setParameter("datasetTopic", PublicationController.DATASET); allDatasets = query.getResultList(); allDatasetSelectItems = new ArrayList<SelectItem>(allDatasets.size() + 1); allDatasetSelectItems.add(new SelectItem(null, "-- Select Dataset --")); for (String dataset : allDatasets) { if (dataset != null) { final SelectItem selectItem = createSelectItem(dataset); allDatasetSelectItems.add(selectItem); } } isInitialised = true; } }