<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=codevally" rel="nofollow">Roshan</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9095?redirect=false" rel="nofollow">SPR-9095</a></strong> and commented</p>
<p dir="auto">We are using the above spring version in our web application and it is runs on 3 node jboss 5.1.1 cluster with enabling session replication. But when accessing our functionality, we are getting java.io.NotSerializableException: javax.annotation.PostConstruct exception at the time of replicating session over jboss nodes.</p>
<p dir="auto">Found the <a href="https://jira.springsource.org/browse/SPR-5331" rel="nofollow">https://jira.springsource.org/browse/SPR-5331</a> issue and it address the same issue but we cannot see any solution given.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0.5</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398092176" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10004" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10004/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10004">#10004</a> DestructionCallbackBindingListener is Serializable but contains potential non-serializable state</li>
</ul>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=olaf" rel="nofollow">Olaf Otto</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-5331?redirect=false" rel="nofollow">SPR-5331</a></strong> and commented</p>
<p dir="auto">The static inner class DestructionCallbackBindingListener of ServletRequestAttributes implements Serializable but has a potential non-serializable state (a Runnable reference). This may lead to unwanted serialization attempts of the runnable objects.</p>
<p dir="auto">I believe this might actually not be a bug but a desired behaviour, since DestructionCallbackBindingListener is supposed to survive graceful web-app restarts. If so, this fact should probably be documented or serializability should be enforced by other means.</p>
<p dir="auto">org.springframework.web.context.request.ServletRequestAttributes#registerDestructionCallback(String name, Runnable callback, int scope) lacks API documentation so far.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.5, 2.5.6</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398117087" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13733" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13733/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13733">#13733</a> DestructionCallbackBindingListener is Serializable but contains non-serializable Runnable reference</li>
</ul>