Menu

#3 How to get a domain service use DS

open
nobody
None
5
2012-11-28
2006-04-03
Anonymous
No

I registe two service in one bundle like
String str = "Why ds can't use?";
context.registerService(str.getClass().getName
(),str,null);
//ManageObj.class only exsit in this bundle
ManageObj obj = new ManageObj();
context.registerService(obj.getClass().getName
(),obj,null);

when i use it in other bundle
<component name="listen">
<implementation class="com.dsuse2.UseService"/>
<reference name="MYSTRING"
interface="java.lang.String"
bind="setString"
unbind="unsetString"/>
</component>
work

but
<component name="testds" >
<implementation class="com.dsuse.UseService"/>
<reference name="MYSERVICE"
interface="com.manage.ManageObj"
bind="setService"
unbind="unsetService" />
</component>
cannot work ?
why and how can use the ManageObj?

Discussion