Questions tagged [transactional]

A transaction is a collection of operations performed on a database that are supposed to execute in one unit.

A transaction is a collection of operations performed on a database that are supposed to execute in one unit. This means that in case any of the operations fails the entire transaction fails and the status of the database is rolled back to the status prior to the transaction.

Apparently this tag is only useful for databases that actually support transactions.

770 questions
0
votes
1 answer

How do I make a service method in liferay transactional without service builder

I have a utility service called NotificationService. It follows along the lines of MailService in that the service layer has the NotificationService interface (defining the service), and NotificationServiceUtil class (providing the service…
Lucas
  • 14,227
  • 9
  • 74
  • 124
0
votes
2 answers

OpentransactionPerView instead @Transactional

I have a Java EE Application with Spring 3.1.1 and Hibernate 4.1. Now I wanted to speed up things and saw that the bottleneck is the opening + closing of multiple transactions in one request. Now I removed all @Transactional annotations and created…
wutzebaer
  • 14,365
  • 19
  • 99
  • 170
0
votes
4 answers

Spring @Transactional usage on wrapper method

Do I need to add @Transactional annotation to second method? I think not, but really not sure. @Transactional public void addUser(User u) { u.setCreationDate(new Date()); userDAO.addUser(u); } // should I add @Transactional annotation…
yons88
  • 439
  • 2
  • 5
  • 20
0
votes
1 answer

Hibernate Many-to-Many mapping: Add entries doesn't work

Hallo I have a problem with a many-to-many mapping in Hibernate. The tables shown above, are connected with a many-to-many mapping. The table tbl_cp_group_relation is the table with the n:m connections. In my entities I solved this problem on…
EvilKarter
  • 267
  • 7
  • 22
0
votes
1 answer

How to use Spring Transaction when using GenericApplicationContext

When using Distributed Mysql Database, I've Created multiple dataSources, sessionFactory using BeanDefinitionBuilder But transactional annotation doesn't seem to work when I execute Insert SQL using getBean('bean name') method below (…
0
votes
1 answer

java - Insert fail when using Spring, hibernate and JPA with JBOSS 7.1 server

I'm trying to set up the hibernate + JPA on my project. but when I try to do an insert nothing happens, I go into the source code of hibernate jars and I see that hibernate it's recognizing my entity as TRANSIENT state and not as PERSISTENT. Some of…
0
votes
1 answer

Hibernate + Resteasy + Blobstream

i'm using resteasy and saving blobs with hibernate i've configured the open session in view my rest-handler is non-transactional, my service which retrieves the java.sql.blobs is transactional. The problem: after retrieving the blob in the service…
wutzebaer
  • 14,365
  • 19
  • 99
  • 170
0
votes
2 answers

Spring Transaction with AspectJ

I'm having a problem with @Transaction in Spring. Basically, no transaction is created with the following message: delaying identity-insert due to no transaction in progress I posetd a full description of the problen in the Spring AOP…
Stefano Cazzola
  • 1,597
  • 1
  • 20
  • 36
0
votes
2 answers

EntityManger refresh after JPQL bulk DELETE?

After executing the following operation in my Seam/Glassfish/JPA container: @ApplicationScoped public class JpaGlossaryDataAccessObject implements IGlossaryDataAccessObject { // ... @Transactional public void deleteColumn(String…
Pascal Kesseli
  • 1,620
  • 1
  • 21
  • 37
0
votes
1 answer

Writing a new dao. No Hibernate Session bound to thread

So I have such classes BaseDao public interface BaseDao { T save(T entity); } UserDao public interface UserDao extends BaseDao { User getUserByUserName(String name); } GenericDao public abstract class GenericDao implements…
Sergii
  • 101
  • 1
  • 10
0
votes
2 answers

Why is Entity Manager clear() required? - Spring3 @Transactional, JPA2/Hibernate3

I have a JSF2 application that is using JPA2/Hibernate with Spring @Transactional. There are no @Transactional statements in the UI (backing beans), only in the service layer. (I am using @Transactional(propagation=Propagation.MANDATORY) in the…
John
  • 101
  • 1
  • 7
0
votes
1 answer

Thoughts on high-concurrent entities and race conditions in JPA...Transactional?

I am working on a project, and have come to a sort of "design issue". I have an entity that represents a "Competition". Users are given votes, and they vote on the competition. Each competition has 10 items, and only 10 votes total can be cast on…
CodeChimp
  • 8,016
  • 5
  • 41
  • 79
0
votes
1 answer

Send email from magento

From our Magento 1.7.0 shop, we would like to send an email to a SMS gateway, when the shipping transactional email is sent. I really can't figure how to do this - any ideas? The email to the SMS gateway should have the following content: SMS…
0
votes
1 answer

Spring callback when Entity exits @Transactional context?

Does Spring have any hooks to call a method on an entity or an entity listener for each entity at the exit of a transactional context? We're using Spring and Hibernate to manage a bunch of entities that we also index for searching. We currently use…
0
votes
1 answer