This content has been marked as final.
Show 1 reply
-
1. Re: JBoss7 Remove Timeout for Stateful Session EJB2
olli24 Jul 3, 2012 6:35 AM (in response to olli24)Following changes in the ejb-jar.xml are needed to solve the problem.
1) Change schema to ejb-jar_3_1.xsd
2) Set element <stateful-timeout> for each SFSB
For example:
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns = "http://java.sun.com/xml/ns/javaee"
version = "3.1"
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd">
<enterprise-beans>
<session>
..
<stateful-timeout>
<timeout>1</timeout> <!--Default unit is minutes -->
</stateful-timeout>
…
</session>
Now after the stateful timeout has expired, ejbRemove() is called by the server.