Hello, Prototypes statically creates beans, i.e. creates one bean per XML reference to it. Not related to execution calls.
What are you trying to do? JP [@@ OPEN @@] De : qiujiahaook [mailto:[email protected]] Envoyé : mercredi 1 avril 2015 03:41 À : user Objet : blueprint scope I hava a implement bundle HelloServiceImp: public class HelloServiceImp implements HelloService { private int num=0; public void add() { num++; System.out.println("HelloServiceImp:add:num="+num); } } the blueprint config : <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"> <bean id="helloserviceimp" class="com.cn.qjh.HelloServiceImp.HelloServiceImp" scope="prototype" ></bean> <service ref="helloserviceimp" interface="com.cn.qjh.HelloService.HelloService" /> </blueprint> I write two client bundle to call service(add),then print num value and inject object hashcode. I found the inject object hashcode in two client bundle is same, and the num value is associated. I config the scope="prototype" , I think the two inject object is not same,but not. thanks!
