when terracotta instrumenting "con" bean then it gives error.
Attempt to share an instance of a non-portable class referenced by a portable class. This
unshareable class has not been included for sharing in the configuration. Please add this
class to the <includes> section of the configuration file.
But when I make "AbstractClass" as non abstract class and create its bean in applicationContext.xml and passes it to tc-config.xml file in <application-context><bean> tag and make c1 and c2 as non distributive field then it works.
Any idea where I am wrong.
-I posted this in terracotta session also by mistake.
There is a discovery mechanism in Terracotta for Spring that should automatically add classes for all clustered beans into the instrumentation. However it skips classes that explicitly declared in <instrumented-classes> section of tc-config.xml (that is done to allow manual tweaking of the instrumentation and locking parameters). Can you please verify that you don't have ConcreteClass listed there.
If it is not listed, it is possible that this scenario somehow trigger a bug in this discovery mechanism. So, please open a JIRA issue and attach sources of those classes, spring's xml file and tc-config.xml
Also, as a workaround you can try to add both AbstractClass and ConcreteClass into the <instrumented-classes> section.
Joined: 03/12/2007 21:17:02
Messages: 13
Location: Delhi, India
Offline
Thanks for reply.
I have not added either Concrete class nor Abstract class to the instrumented-classes tag.
I only add Concrete class to the
<spring>
<jee-application name="spring">
<application-contexts>
<application-context>
<bean name="con">
<non-distributed-field>c1</non-distributed-field>
<non-distributed-field>c2</non-distributed-field>
</bean>
........
I will try the workaround you have suggested and will post to the forum.
I will also add the code to that.