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! 




‍

Reply via email to