Do I need transactional queues in Microservices?

I’m learning about microservices and I understand that in my scenario I want microservices to communicate with each other using message queues, with persistence. That means if the instance crashes and …

How to add transaction support to Java DSL integration flows

I have to add a transaction support to an integration flow. Let’s assume that there are 3 transformers. The first and third transformers should be done within the same transaction, but the second one …

Concurrent requests transaction to prevent unwanted persistence

I am trying to get my head around how to approach what initially seems a “simple” problem. I have UserAccounts that can have MANY Purcahses BUT business logic dictates can only have one …

Does TransactionAttributeType.NOT_SUPPORTED make sense for retrieving entities?

Does having TransactionAttributeType.NOT_SUPPORTED on every DB lookup method makes sense? I don’t see the point in having the entity attached if it’s not going to execute an update. @…

How to avoid two different threads read the same rows from DB (Hibernate and Oracle 10g)

Let’s suppose I got two different threads, T1 and T2, accessing concurrently the same database and fetching data from the same table. Now on thread startup I need to fetch data from the table and …

javax.transaction.Transactional vs org.springframework.transaction.annotation.Transactional

I don’t understand what is the actual difference between annotations javax.transaction.Transactional and org.springframework.transaction.annotation.Transactional? Is org.springframework.transaction….

Do you need a database transaction for reading data?

When I try to read data from the database, at least using ((Session)em.getDelegate()).createCriteria() an exception is throws saying that a transaction is not present. When I add the annotation: …

JPA PessimisticLockScope.NORMAL and locking “relationships”

I am studying JPA Documentation and encountered the following lines: Entity relationships for which the locked entity contains the foreign key will also be locked, but not the state of the …

JPA @Version field doesn’t get incremented

I’m new to JPA and Hibernate and I have a problem with optimistic locking. I have a class which has an @Version annotated field. When I update the Entity represented by this class, the version counter …