This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transaction Timed Out

 
Jeff Storey
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a long running method that runs from within a stateful bean (JBoss 4 is my app server). I have not configured any specific transaction setup, but for some reason, when this long method runs, a transaction timed out message is printed during the middle of it (and it does not run to completion). This method does not update a DB, so I'm not sure what makes it a transaction. Is there something specific I need to do to tell this method NOT to run as a transaction? Or is there some other reason this might be happening? Thank you.

Jeff
 
Purushoth Thambu
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you don't want a method of the bean to be part-of/start transaction you need to specify "trans-attribute" as NotSupported in the ejb-jar.xml. In JBOSS and with most App server if you don't specify this attribute the default will be Required. Are your getting time out exception after 5 mins? Just to know the default setup.
 
Jeff Storey
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, unfortunately thought I do not have an ejb-jar.xml (I don't think) since I am using EJB 3 annotations rather than this config file. Is there an annotation to do this? Also, as for timing out after 5 minutes, that seems like about right, I haven't timed it exactly.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic