Hello!
We are using Spring + Terracotta(3.0.1). There are 2 beans with scope - session:
Code:
...
<bean id="mode" class="app.mobi.web.RenderMode" scope="session" init-method="init" lazy-init="false">
</bean>
...
<bean id="sessionParameters" class="app.mobi.web.SessionParametersHolder" scope="session" />
tc-config.xml
<application>
<spring>
<jee-application name="mobi">
<session-support>true</session-support>
<application-contexts>
<application-context>
<paths>
<path>*/applicationContext.xml</path>
</paths>
<beans>
<bean name="sessionParameters"/>
</beans>
</application-context>
</application-contexts>
</jee-application>
</spring>
After running I'm getting:
Attempt to share an instance of a non-portable class by passing it as an argument to a method of a
logically-managed class. This unshareable class has not been included for sharing in the
configuration.
...
* add this snippet inside the <dso> element
<instrumented-classes>
<include>
<class-expression>org.springframework.web.context.request.ServletRequestAttributes$DestructionCallbackBindingListener</class-expression>
</include>
</instrumented-classes>
...
Debugging, I've find out that session contains 2 beans and DestructionCollback's for every bean. Is there workaround not to add DestructionCollbacks to session, because if I include it to instrumented classes it takes a lot of other spring stuff with it.
Dmitrij
PS It's impossible migrate to last TC version.