I'm using a read only database to get some data in to my project. We use Spring v3 with jpa and hibernate
Will the following annotation have the effect of making all calls to my repository a read only transaction? Or do I need the annotation on the service layer calling the repository
package com.blah.jpa;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.transaction.annotation.Transactional;
@Transactional(readOnly = true)
public interface ServiceToServerRepository extends JpaRepository<ServiceToServerJPA, String> {
}
So we get all the findOne, findAll for free. But any updates should fail as it is a read only transaction