• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Is it possible to set the transaction timeout at the application level

 
Ranch Hand
Posts: 436
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm using JBoss 7.1.1. on Mac 10.7.5. While I was able to find how to set the transaction timeout on a global basis, is it possible to put some kind of configuration into my WAR file to tell JBoss I want a specific transaction timeout for my application? I'm using Spring 3.1.1.RELEASE and Hibernate 4.1.0.Final.

Thanks, - Dave
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Transaction timeout for EJBs? If so, you can do that using @org.jboss.ejb3.annotation.TransactionTimeout on the individual beans.
 
Dave Alvarado
Ranch Hand
Posts: 436
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh, no, I'm creating a web application (WAR) and am currently using Spring "@Transactional" annotation to declare which of my service methods (service class is declared with Spring's @Service annotation) I want treated as transactions. Here's how i declare my transaction manager in my spring application context ...



and here's my persistence.xml file ...

 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So it looks like you want to set the transaciton timeout controlled by the Spring transaction manager?
 
Dave Alvarado
Ranch Hand
Posts: 436
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah, I think so. I tried setting the timeout attribute on the "@Transactional" method of my service class ...



but this doesn't work (I set it to a low value to test it stuff would actually time out, but it didn't).
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So for 20 seconds. And you say a call to that method did not timeout and rollback?

You can also put @Transactional on top of the class and all the public interface methods then all get those settings and is transactional.

Did you also use

<tx:annotation-driven/> in your xml config file?

Mark
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic