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.
Joined: May 24, 2003
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.
Joined: Oct 09, 2006
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.