Try to use stateful-timeout tagg in your ejb-jar.xml.
And define the timeout to -1 how it's described in spec http://docs.oracle.com/javaee/6/api/javax/ejb/StatefulTimeout.html.
Thanks for the reply.
The @statefultimeout has implemented from EJB 3.1, but as i specified in my last post, i am using EJB2.1 version. So it would not work in my application and the tag .<stateful-timeout> is not supported by ejb-jar_2_1.dtd
In case that you run your app on AS7 then you should not have any problem to use ejb-jar_3_1.xsd. The specification of EJB 3.1 covers the specification of 2.1 beans as well.
I suppose that you'll be able to use stateful-timeout tag in your app and the 2.1 beans will be working fine.
You can try to check: https://github.com/jbossas/jboss-as/blob/4ccc9d2fb45ef9234e9ced600394f739fd4d8ba9/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/descriptor/ejb-jar.xml.
Or maybe you could try to put the timeout definition to jboss-ejb3.xml file whether you don't wan't to change your ejb-jar.xml file.