Just to understand the workings of Spring transactions I want to know what happens in the following case where one method marked as @Transactional calls another method marked as @Transactional.
Assume a ... |
In Spring, a method that is annotated with @Transactional will obtain a new transaction if there isn't one already, but I noticed that a transactional method does not obtain any ... |
I've seen a method in a Service class that was marked as @Transactional but it was also calling some other methods in that same class which were not marked as @Transactional.
Does ... |
I'm using Spring/JPA2/hibernate with this code:
class A {
@Autowired
B b;
@RequestMapping("/test")
public void test(final HttpServletRequest r1, HttpServletResponse r2) throws ... {
b.inner(); ...
|
We have a Spring based application with a service layer which is annotated with @Transactional. We need to have code run before and after some transactional methods for the following reasons:
- We ...
|
I have a problem with the transactional configuration subclassing.
I have a class A that has this method:
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public EventMessage<ModificaOperativitaRapporto> activate(EventMessage<ModificaOperativitaRapporto> eventMessage) {
// ...
|
I have a Spring MVC sample application it uses UserDaoImpl class to save a User type object to database. Following is the UserDaoImpl code.
public class UserDaoImpl implements UserDao<User> {
private EntityManagerFactory emf;
@PersistenceContext
private ...
|
|
I have a method annotated with @Transactional. I retrieve an object from my Oracle DB, change a field, and then return from the method. I forgot to save the object, but ... |
If a child class is annotated with @Transactional, should the methods in the parent class also run in a transaction when the parent class methods are called directly (on an instance ... |
init-method comes before @Transactional Hey there, I have a class with a public @Transactional method which loads some values from the DB. I'm declaring the bean in the xml with the ... |
@Transactional method : transaction not propagated : individual commits Using Spring 3 + hibernate3 + c3p0 and hibernate transaction manager. In the below I expect the data to be deleted and ... |
Hai all In my interfacedao call i am having two methods saveMaster()--Saves the masterpage saveDetail()---saves the detailpage I need to give the transaction to this methods,THe problem is both the methods ... |
Transactional init-method Hi, I have a transactional bean composed of a target (beanTarget) and a service (beanService) that adds the transactional aspect (using TransactionProxyFactoryBean). There's an init-method in the target bean ... |
[RESOLVED] Transaction always created, even when method marked with SUPPORTS Hi folks, In recent performance profiling I've found that one of the last remaining squeaky wheels is an ApplicationListener.onApplicationEvent() method in ... |
I Want Instance-level not Method-level Transactions I'm using Spring with Hibernate with an application-ctx of: Code: ... |
transaction, different methods - what happens? Hi there, I have a question about the aspect transaction mechanismen in spring: I'm using JdbcDaoSupport and the org.springframework.transaction.interceptor.Transa ctionProxyFactoryBean wrapper. I define the following ... |
method and its embed method transaction control methodA() contains methodE(). Both methods use Hibernate DAO to access/update database. void methodA(){ ... methodE(); .. } My goal is methodA() can commit whatever ... |
Cross-method transactions Hello! I have a unique problem and was wondering if Spring may be able to provide an elegant solution. Here is my problem: I have a complex domain model ... |
exclude method from being in a transaction Hi, In the spring config, i have configured a class with all methods as propogation required, however i need to exclude some methods from ... |
Weirds behavior of persist method with @Transactional Hello all! I've had this problem for a couple of days: When i save two objects in one transactional method and the second one ... |
The @Transactional annotation seems like such a great idea, but I'm curious to know why it's only allowed on public methods. Is this an artifical limitation? Are there any plans to ... |
Calling one transactional method from another Hello All! I have a probably dumb question about transactions: If I have something like this in my app context: Code: |
@Transactional on non-interface methods Hi, We are using Spring with iBATIS. Requirement: We have two entities with parent, child relationship. We have an interface and implementation to create these entities. Following ... |
@Transactional default on non transactional methods Hi, I'm moving from Spring 1.x declarative transaction style to @Transactional style. I have the feeling that this gives me a lesser fine grained control ... |
If I correctly understand what you are trying to do, I think you should be able to use Before advice, unless you need to perform some processing after the target method ... |
How to implement METHOD level transaction Hi All, I want to implement a method level transaction using @Transactional annotation. SCENARIO: ---------- I'm calling a transactional method in the same class and ... |
transaction declaration and "inner" methods Hi. Encountered the following problem. Example: public class fooImpl - public fooBar() - public foo() fooImpl and its interface is wired up through spring. foo() is ... |
|
Jan 4th, 2008, 02:20 PM #1 leozin View Profile View Forum Posts Private Message Junior Member Join Date Oct 2007 Posts 4 Why @Transaction doesn't work with a custom method on ... |
Issues with methods calling methods with @Transactional I am having issues when a method calls a method with the @Transactional. When I do, it appears to be ignored. The scenario I ... |
Transaction issue with methods overlap Hello everybody, We have a problem to define a transaction on a method of a specific object while preserving its dynamic operation. Basically, we have a ... |
Transaction and methods Hi, I was going through the tutorial at: http://static.springframework.org/sp...ansaction.html I would like to know if there's a way to use different set of transaction for different methods on ... |
Is @Transactional Annotation, inherited from Parent Class. I have something like Code: @Transactional public abstract class BaseDAO ... { @Transactional(readOnly=true) public BaseDTO findById(int id); } And a child class @Transactional public ... |
How to set transaction rollbackOnly with method attribute(sorry, wrong in the thread name)? Is there a way for doing this? My service has several methods, I need one of them to ... |
Transaction not working for non-action methods [JSF] Hi, I have a JSF application integrated with Spring, with the help of ContextLoaderListener and RequestContextListener (configured inside web.xml). I have configured transactions on ... |
Hi, I use the @Transactional annotation (on implementation methods) to mark the boundaries of my services transactions. This is enabled by adding the following to my Spring config file Code: |
Jul 31st, 2008, 11:35 AM #1 Sudheer View Profile View Forum Posts Private Message Junior Member Join Date Mar 2008 Posts 2 Is this transaction method okay? Hello Friends I am ... |
Spring 2.5 - Transaction not rolling back for two separate method calls Trying to rollback the previous write to database using Spring transaction for POC and learning purposes. There are two ... |
Worried that I am trashing all over somebody elses forum entry, so I have created as new. RE: http://forum.springframework.org/new...ote=1&p;=194893 If that is the case, what is the point of the REQUIRED ... |
Transactions only working for init() methods? I have what appears to be a fairly basic, by-the-book Spring setup for transactions. My problem is no transactions are being created where expected, EXCEPT ... |
WrappedException not thrown from Transactional method Hello, I've created a transactional service using the Transacational annotation. Within my service, I have a try/catch which catches any Exception and rewraps it within ... |
Query on transactions between method calls..? hi, a query -- My service class has a method M1 and a method M2 ( service class implements interface has only method M2). My ... |
Reflection on a Transactional method We have a situation where a method annotated Transactional is invoked reflectively using Method.invoke. The transaction is not created - it appears that the pointcut in ... |
@Transactional methods simulated with inner class I'm sure this is a newbie question, but I have a few methods in a web controller that I want to make transactional, but I ... |
Dec 16th, 2008, 12:28 PM #1 yaravind View Profile View Forum Posts Private Message Junior Member Join Date Sep 2007 Posts 13 Transaction being created twice for the same method Helo ... |
I added @Transaction to my service class.my service class has private methods , is transaction added to private methods too ? and suppose I have some methods which does not need ... |
I don't know if it's "right". I would assume a read-only transaction would be lighter-weight than a read-write transaction, but if you really want to avoid creating any transaction at all ... |
one and the same transaction for 2 methods Hello, how to have 2 methods be in the same transaction? And transaction should start before first method, and finish after second. And ... |
Nov 10th, 2009, 03:27 PM #1 pavla novakova View Profile View Forum Posts Private Message Junior Member Join Date Aug 2008 Posts 18 Calling @Transactional method from non-transactional one Hi, I've ... |
I have a service that I am proxying via TransactionProxyFactoryBean: Code: PROPAGATION_REQUIRES_NEW |
Hi, I have a few DAO's which I've defined to be @Transactional at the class level. Is there any way to say "this particular method of this class is NOT @Transactional"? ... |
Spring transaction management - Trying to execute method in one transaction Hi, everyone. I am new in Spring. I have some problem. I use SimpleJdbcTemplate, which is taken from connection pool. ... |
Hi I am using Spring AOP in my application .I have more than 20 methods in a class.I have to apply the following transaction advice for all the methods except for ... |
Legacy code calling transactional method Hi everyone, I'm facing an issue while moving my application to Spring. I have legacy code using JDBC connection to connect to the database. I cannot ... |
Help with Spring + Hibernate + Transactional Method I create that 2 methods: Code: @Transactional(propagation = Propagation.REQUIRED, rollbackFor = {Exception.class }) public boolean enviarMensagem(TbMensagem mensagem, List itemMensagemList, List caixaCartorioDestinatarioList, TbUsuario usuario) ... |
Transactional issue: XAException: The method 'xa_end' has failed with errorCode '100' Hey everyone, After endless hours of google'ing and debugging I just can't figure out the solution to a problem I'm ... |