[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Spring and terracotta Example.  XML
Forum Index -> Terracotta for Spring
Author Message
navneet

journeyman

Joined: 03/12/2007 21:17:02
Messages: 13
Location: Delhi, India
Offline

My Example is as follow (using spring + terracotta):

public class Class1{

}
public class Class2{

}

public abstract class AbstractClass{

public Class1 c1;
public Class2 c2;

// getter/setter
// other unimplemented methods.

}


public class ConcreteClass extends AbstractClass{

// method implemented here+ other methods.

}


applicationContext.xml
------------------------------

<bean id="c1" class="Class1"/>
<bean id="c2" class="Class2"/>

<bean id="con" class="ConcreteClass">
<property name="c1" ref="c1"/>
<property name="c2" ref="c2"/>
</bean>

---------------------------------------

tc-config.xml
(under <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>



--------------------------------

Problem:

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.




Regards,
Navneet Singhal
zeeiyer

consul

Joined: 05/24/2006 14:28:28
Messages: 493
Offline

Hello Navneet:

This relates to the Spring product - so see that you posted it on the Spring forum as well. We are in the process of responding ... please refer, in a bit, to http://forums.terracotta.org/forums/posts/list/172.page

Regards...

Sreeni Iyer, Terracotta.
Not a member yet - Click here to join the Terracotta Community
 
Forum Index -> Terracotta for Spring
Go to:   
Powered by JForum 2.1.7 © JForum Team