• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ejb transaction times out

 
Ranch Hand
Posts: 354
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have two Remote Methods in an EJB (which is also a service endpoint). The first method (m1) is given the transaction attribute of Supports and the other (m2) RequiresNew.
m1() get a list of Items and for each calls using sessionContext.getEJBObject().m2(). [m1 is called using the web-service.]

The total timeout value is 180 sec and the max transaction timeout value is 240 sec.
What I find is that after overall 180 sec all calls to m2() start to time-out. Before the 180 sec mark, all m2() transactions are successfully committed.

Shouldn't every new transaction (m2) get full 180 sec to run? Or something else could be wrong here?

This is on WAS 6.1.

 
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should turn on the diagnostic trace option to check if your transaction attributes & timeouts are being picked up correctly.

If the call sequence is "WebService => ejb.M1() => (one or more times) => ejb.M2()" then I think 180 sec timeout is working correctly.
 
Abhinav Srivastava
Ranch Hand
Posts: 354
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The way it's behaving it seems more like a call time-out rather than a transaction timeout, a "Requires New" initiates a new transaction every time... doesn't it.
If I set the total time-out value to 0, m2() calls would run successfully up to the max time-out value and then start failing.
 
reply
    Bookmark Topic Watch Topic
  • New Topic