could you please help how can I resolve the following issue
one component in composite file then <implementation.spring
location="/someLocation"> is declared one time,like that
<composite>
<component name="component1">
<implementation.spring="/somLocation/spring-conentx.xml" />
<service name="component1Service">
<tuscany:binding.rest uri="http://localhost:8085/hell0"/> //here can
i give like this uri="/hello' (if it is tomcat server)
</service>
</component>
<component name="component2">
<implementation.spring="/somLocation/spring-conentx.xml" />
<service name="component2Service">
<tuscany:binding.rest uri="http://localhost:8085/hell01"/> //here can
i give like this uri="/hello1' (if it is tomcat server)
</service>
</component>
.................
.................
.................
<component name="componentN'>
<implementation.spring="/somLocation/spring-conentx.xml" />
<service name="componentNService">
<tuscany:binding.rest uri="http://localhost:8085/hell0N"/>
</service>
</component>
</composite>
Problem:From the above scenario spring-context.xml contains all services as
beans,sessionFactory obj bean also there in spring-context.xml.Now whenever
I start the server,every time all service beans instatntiation takesplace.
i.e
<beans>
<bean id="mySessionFactroy" class="LocalSessionFactoryBean"/>
<sca:service name="Component1Service" target="bean1"/>
<sca:service name="Component2Service" target="bean2"/>
..................................................
..................................................
<sca:service name="ComponentNService" target="beanN"/>
<bean id="bean1" class="class1"/>
<bean id="bean2" class="class2"/>
....................
................
<bean id="bean3" class="classN"/>
</beans>.
i.e
whenever loading composite file
for every implementaion.spring all beans instantiation is takesplace
component1---->implementation.spring------>bean id="bean1"
component2----->implementaion.spring------->bean id="bean1' bean id="bean2'
---------------------------------------
---------------------------------------
componentN------->implementaion.spring------>bean id="bean1" bean
id="bean2"...........bean id="beanN"
Thank you
T