|
From: Dave B. <dba...@on...> - 2005-11-12 15:47:24
|
Hi Juergen, I'm using Spring 1.2.3. I have a service object defined with tx propagation PROPAGATION_SUPPORTS, -Exception. When it is called from outside a transaction, no tx is created as expected. However, if my method throws an exception, AbstractPlatformTransactionManager logs a warning: WARN (AbstractPlatformTransactionManager.java:473) - Should roll back transaction but cannot - no transaction available Is this expected? If I change to PROPAGATION_NEVER, the same warning is logged. If I change to PROPAGATION_REQUIRED, no warning is logged. Doesn't appear to be causing any problems, but is annoying to see in the log. Is this expected behavior? Looks like the logger.info() was changed to logger.warn() in 1.1-rc1. Thanks, Dave |
|
From: Dmitriy K. <dko...@ru...> - 2005-11-12 16:33:57
|
I would assume it is the expected behaviour. Spring code base is heavily instrumented with various levels of log requests to give users a pretty clear picture on what is going on inside the framework. In this particular case it just "warns" (no exceptional condition has been raised) that even though you configured Spring CMT engine to rollback the TX on the particular Exception, no TX is available (due too the propagation level configured) to be rolled back. IMO, such warnings are very useful and informative, but again, that's my own opinion ;-) Regards, Dmitriy. On Nov 12, 2005, at 10:51 AM, Dave Ballard wrote: > Hi Juergen, > > I'm using Spring 1.2.3. > > I have a service object defined with tx propagation > PROPAGATION_SUPPORTS, -Exception. When it is called from outside a > transaction, no tx is created as expected. However, if my method > throws an exception, AbstractPlatformTransactionManager logs a > warning: > > WARN (AbstractPlatformTransactionManager.java:473) - Should roll > back transaction but cannot - no transaction available > > Is this expected? If I change to PROPAGATION_NEVER, the same > warning is logged. If I change to PROPAGATION_REQUIRED, no warning > is logged. > > Doesn't appear to be causing any problems, but is annoying to see > in the log. Is this expected behavior? Looks like the logger.info() > was changed to logger.warn() in 1.1-rc1. > > Thanks, > Dave > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. > Download > it for free - -and be entered to win a 42" plasma tv or your very own > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |
|
From: Dave B. <dba...@on...> - 2005-11-13 17:18:13
|
Hi Dmitriy, Ah, that makes perfect sense. I will remove -Exception and see if that eliminates the warning. Thanks, Dave Dmitriy Kopylenko wrote: > I would assume it is the expected behaviour. Spring code base is > heavily instrumented with various levels of log requests to give > users a pretty clear picture on what is going on inside the > framework. In this particular case it just "warns" (no exceptional > condition has been raised) that even though you configured Spring CMT > engine to rollback the TX on the particular Exception, no TX is > available (due too the propagation level configured) to be rolled > back. IMO, such warnings are very useful and informative, but again, > that's my own opinion ;-) > > Regards, > Dmitriy. > > > On Nov 12, 2005, at 10:51 AM, Dave Ballard wrote: > >> Hi Juergen, >> >> I'm using Spring 1.2.3. >> >> I have a service object defined with tx propagation >> PROPAGATION_SUPPORTS, -Exception. When it is called from outside a >> transaction, no tx is created as expected. However, if my method >> throws an exception, AbstractPlatformTransactionManager logs a warning: >> >> WARN (AbstractPlatformTransactionManager.java:473) - Should roll >> back transaction but cannot - no transaction available >> >> Is this expected? If I change to PROPAGATION_NEVER, the same warning >> is logged. If I change to PROPAGATION_REQUIRED, no warning is logged. >> >> Doesn't appear to be causing any problems, but is annoying to see in >> the log. Is this expected behavior? Looks like the logger.info() was >> changed to logger.warn() in 1.1-rc1. >> >> Thanks, >> Dave >> >> >> ------------------------------------------------------- >> SF.Net email is sponsored by: >> Tame your development challenges with Apache's Geronimo App Server. >> Download >> it for free - -and be entered to win a 42" plasma tv or your very own >> Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php >> _______________________________________________ >> Springframework-developer mailing list >> Spr...@li... >> https://lists.sourceforge.net/lists/listinfo/springframework-developer >> > > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. > Download > it for free - -and be entered to win a 42" plasma tv or your very own > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > |