Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

EJB Transaction Timeout  RSS feed

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Our application accesses some common external EJBs implemented by third-party vendors. We have to implement timeout for every method call to an external EJB.
We did a small POC on this by writing a local EJB for every external EJB and specifying a transaction timeout value on the methods of the local EJB. We wrote a dummy external EJB and put an infinite loop in one of its method. The local EJB calls this method of the external EJB and the method of the local EJB has a transaction timeout value of 5 seconds. The method in the local EJB has the transaction attribute of REQUIRED and we have tried this by giving all possible transaction attributes for the method in the external EJB.
But the transaction is not timing out. What other settings we need to do ? Is there any other way of implementing timeout on EJB method calls. Also, how can we implement timeout for methods which are not in a transaction, which have a Transaction attribute of NEVER ?
 
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure if this is of help.. generally the application server would have the timeout settings for EJB methods. (Rather than the EJB itself.). On WebSPhere, this can be checked on the admin console.
 
Ranch Hand
Posts: 8934
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
usertransaction.setTransactionTimeout
public void setTransactionTimeout(int seconds)
throws SystemException
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!