-
1. Re: Statefull session bean
ochaloup May 11, 2012 4:24 AM (in response to rjanapala)Try to use stateful-timeout tagg in your ejb-jar.xml.
<stateful-timeout>
<timeout>#nuber</timeout>
<unit>#unitname</unit>
</stateful-timeout>
And define the timeout to -1 how it's described in spec http://docs.oracle.com/javaee/6/api/javax/ejb/StatefulTimeout.html.
-
2. Re: Statefull session bean
rjanapala May 11, 2012 6:30 AM (in response to ochaloup)Hi Chaloupka,
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
-
3. Re: Statefull session bean
ochaloup May 11, 2012 12:21 PM (in response to rjanapala)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.