You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Mahammad Nasir <ma...@huawei.com> on 2010/03/13 09:37:21 UTC

Is this safe?

 
Hi,
 
I am registering factory class (Which is outside osgi framewor)  through the
system bundle. This casls will instantiates the objects which is out side
the framework.
 
Now i have some thing like this.
 
Registerservice(Factory.Icreateinterface,factoryobject,null) //This is done
via system bundle.
 
Now some other bundle uses this service.
 
getService(Factory.createinterface);
 
now i have a factory class which is creating a objects (these classes are
exposed via, systempackages.extra)
 
CFacotry implements Icreateinterface
{
   object createinstance();
}
 
All these i am doing because i dont want to register every object which is
otsuide the framework.
 
Is this safe?? Can i do this??
 
 
Regards
Nasir

Re: Is this safe?

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 3/13/10 3:37, Mahammad Nasir wrote:
>
> Hi,
>
> I am registering factory class (Which is outside osgi framewor)  through the
> system bundle. This casls will instantiates the objects which is out side
> the framework.
>
> Now i have some thing like this.
>
> Registerservice(Factory.Icreateinterface,factoryobject,null) //This is done
> via system bundle.
>
> Now some other bundle uses this service.
>
> getService(Factory.createinterface);
>
> now i have a factory class which is creating a objects (these classes are
> exposed via, systempackages.extra)
>
> CFacotry implements Icreateinterface
> {
>     object createinstance();
> }
>
> All these i am doing because i dont want to register every object which is
> otsuide the framework.
>
> Is this safe?? Can i do this??
>    

That should be fine, assuming that the associated packages of all 
objects are exported by the system bundle and if this service is 
dynamic, that bundles stop using the objects if it goes away.

-> richard

>
>
> Regards
> Nasir
>
>    

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org