[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] About CM

I'm so sorry for my poor knowledge about the CM implemention of Equinox.

In equinox,We can set service's "service.bundleLocation" value to
null,then we can use ConfigurationAdmin to manage other bundle's
service properties without service's bundleLocation.
Code like this:
<component name="PortComponent">
	<implementation class="com.terdon.spike.port.PortService"/>
	<property name="service.pid" value="com.terdon.port"/>
	<property name="service.bundleLocation" value="null"/>
	<service>
		<provide interface="org.osgi.service.cm.ManagedService"/>
	</service>
</component>
then ManageBundle can use this to manage the configuration:
Configuration configuration=admin.getConfiguration("com.terdon.port", null);

But about how to share properties in two & more bundles,I don't know.
can somebody tell me how to do?

2006/11/22, jerry lin <bluedavy@xxxxxxxxx>:
I want to know how do u can make two service share one configuration.

2006/11/22, Benjamin Schmaus <benjamin.schmaus@xxxxxxxxx>:
> >      The core key element of CM is formed by Service.PID &
> > BundleLocation,according to this,configuration only can be got with
> > this two element
>
> You can also access Configuration objects by using
> ConfigurationAdmin.listConfigurations or you can use a
> ConfigurationListener.  There is no reason that a given ManagedService
> can't provide configuration data to multiple client bundles.
>
> - Ben
>
> On 11/21/06, jerry lin <bluedavy@xxxxxxxxx> wrote:
> > hi,folks!
> >
> >      I used CM to realize system's configuration,I think the design
> > of CM is not very suitable for enterprise application.
> >      why?
> >      The core key element of CM is formed by Service.PID &
> > BundleLocation,according to this,configuration only can be got with
> > this two element,but in enterprise application,we often have common
> > configuration,just like one port configuration need to be used in two
> > bundles,with CM,we must managed this common configuration separate in
> > two bundles.From this point,I think CM not suitable for application
> > level.
> >       Because CM used Service.PID & Bundle Location as key,when I
> > moved my bundle to other path,its configuration lost,and cann't be set
> > again,is this the bug of equinox or the question of CM?
> >       I think CM need do something to make it more useful for
> > application level configuration.
> >
> > --
> > =============================
> > |     BlueDavy                                     |
> > |     MSN: BlueDavy@xxxxxxxxxxx       |
> > =============================
> > _______________________________________________
> > equinox-dev mailing list
> > equinox-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/equinox-dev
> >
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>


-- ============================= | www.blogjava.net/bluedavy | =============================



--
=============================
|     www.blogjava.net/bluedavy             |
=============================