OSGi DevCon London Call for Papers
OSGi Alliance is have a DevCon at the JAX conference in London. The Call for Papers is out now; deadline is Nov 27.
https://www.osgi.org/DevConLondon2010/HomePage
Ian
Ian Skerrett
Director of Marketing
Eclipse Foundation
613-224-9461 ext. 227
blog: ianskerrett.wordpress.com
twitter: https://twitter.com/ianskerrett
Re: OSGi DevCon London Call for Papers
http://www.osgi.org/DevConLondon2010/HomePage
--
| BJ Hargrave Senior Technical Staff Member, IBM OSGi Fellow and CTO of the OSGi Alliance hargrave-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org |
office: +1 386 848 1781 mobile: +1 386 848 3788 |
| From: | "Ian Skerrett" <ian.skerrett-j9T/66MeVpFAfugRpC6u6w@public.gmane.org> |
| To: | <equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org>, "'Runtime Project PMC mailing list'" <rt-pmc-j9T/66MeVpFAfugRpC6u6w@public.gmane.org> |
| Date: | 2009/11/03 09:22 |
| Subject: | [equinox-dev] OSGi DevCon London Call for Papers |
| Sent by: | equinox-dev-bounces-j9T/66MeVpFAfugRpC6u6w@public.gmane.org |
OSGi Alliance is have a DevCon at the JAX conference in London. The Call for Papers is out now; deadline is Nov 27.
https://www.osgi.org/DevConLondon2010/HomePage
Ian
Ian Skerrett
Director of Marketing
Eclipse Foundation
613-224-9461 ext. 227
blog: ianskerrett.wordpress.com
twitter: https://twitter.com/ianskerrett
_______________________________________________
equinox-dev mailing list
equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev
Configuration Admin Question
Hi,
I am thinking about using Configuration Admin Service for my scenario where I have to install different bundles which provide services to use different devices. The problem is the next one, if I have many equal devices (just with different configuration) I would have to use the same bundle which I would get an DuplicateBundle_Error because I can not install again this bundle, what It is normal because it would be a waste of resources. For this reason I though to use Configuration Admin Service with ManageServiceFactory, which lets me to use different instances of a same service. I have been reading about Configuration Admin Examples and Configuration Admin Service documentation in OSGI compendium but I do not understand very well how exactly this service works, because I do not see the relation between Factory_PID and Service PID. If I want to create new instances of my services, when I create a new Configuration for example, I would like to create create a new PID for my new Configuration and not to call the PID_Factory, how can I create a new configuration for a new instance with a new PID?
There are another way to manage bundles for devices different of Config Admin Service?
Thank you in advance
Re: Configuration Admin Question
David, Yes it sounds like Config Admin with a ManagedServiceFactory (MSF) may fit your requirements. I agree that Config Admin is difficult to understand -- I struggled with it initially as well. I think that the key to understanding MSFs is that you do not control the PID. You call createFactoryConfiguration() with the FactoryPID, and a PID is generated for you by the Config Admin implementation bundle. If you later need the PID then you have to get it from the Configuration object returned to you from createFactoryConfiguration(). Hope that helps, Neil On Wed, Nov 4, 2009 at 12:00 PM, David Conde <dconde@...> wrote: > Hi, > > > > I am thinking about using Configuration Admin Service for my scenario where > I have to install different bundles which provide services to use different > devices. The problem is the next one, if I have many equal devices (just > with different configuration) I would have to use the same bundle which I > would get an DuplicateBundle_Error because I can not install again this > bundle, what It is normal because it would be a waste of resources. For this > reason I though to use Configuration Admin Service with > ManageServiceFactory, which lets me to use different instances of a same > service. I have been reading about Configuration Admin Examples and > Configuration Admin Service documentation in OSGI compendium but I do not > understand very well how exactly this service works, because I do not see > the relation between Factory_PID and Service PID. If I want to create new > instances of my services, when I create a new Configuration for example, I > would like to create create a new PID for my new Configuration and not to > call the PID_Factory, how can I create a new configuration for a new > instance with a new PID? > > > > There are another way to manage bundles for devices different of Config > Admin Service? > > > > Thank you in advance > > _______________________________________________ > equinox-dev mailing list > equinox-dev@... > https://dev.eclipse.org/mailman/listinfo/equinox-dev > >
RE: Configuration Admin Question
Hi Neil, Thank for your answer, it was very helpful for me. Just this was what I did not understand, thanks very much. I have another question, when is the method updated(String, Dictionary) of MSF called, is it called by event, or do I have to do it when I wish to get another instance for my second device? Thanks in advance Regards David -----Mensaje original----- De: equinox-dev-bounces@... [mailto:equinox-dev-bounces@...] En nombre de Neil Bartlett Enviado el: miƩrcoles, 04 de noviembre de 2009 13:23 Para: Equinox development mailing list Asunto: Re: [equinox-dev] Configuration Admin Question David, Yes it sounds like Config Admin with a ManagedServiceFactory (MSF) may fit your requirements. I agree that Config Admin is difficult to understand -- I struggled with it initially as well. I think that the key to understanding MSFs is that you do not control the PID. You call createFactoryConfiguration() with the FactoryPID, and a PID is generated for you by the Config Admin implementation bundle. If you later need the PID then you have to get it from the Configuration object returned to you from createFactoryConfiguration(). Hope that helps, Neil On Wed, Nov 4, 2009 at 12:00 PM, David Conde <dconde@...> wrote: > Hi, > > > > I am thinking about using Configuration Admin Service for my scenario where > I have to install different bundles which provide services to use different > devices. The problem is the next one, if I have many equal devices (just > with different configuration) I would have to use the same bundle which I > would get an DuplicateBundle_Error because I can not install again this > bundle, what It is normal because it would be a waste of resources. For this > reason I though to use Configuration Admin Service with > ManageServiceFactory, which lets me to use different instances of a same > service. I have been reading about Configuration Admin Examples and > Configuration Admin Service documentation in OSGI compendium but I do not > understand very well how exactly this service works, because I do not see > the relation between Factory_PID and Service PID. If I want to create new > instances of my services, when I create a new Configuration for example, I > would like to create create a new PID for my new Configuration and not to > call the PID_Factory, how can I create a new configuration for a new > instance with a new PID? > > > > There are another way to manage bundles for devices different of Config > Admin Service? > > > > Thank you in advance > > _______________________________________________ > equinox-dev mailing list > equinox-dev@... > https://dev.eclipse.org/mailman/listinfo/equinox-dev > > _______________________________________________ equinox-dev mailing list equinox-dev@... https://dev.eclipse.org/mailman/listinfo/equinox-dev
Re: Configuration Admin Question
David, MSF.updated() is called when the client of Config Admin calls update() on the Configuration object returned by createFactoryConfiguration(). Another point about the PID, from the MSF implementer's point of view: you will be passed the generated PID into your updated() method, but generally you treat it as opaque. I think that 99% of the time I simply use it as a key into a Map. Bear in mind that updated() can be called concurrently so you need to implement "create-or-update" semantics atomically. By the way, these questions are about generic OSGi usage, not about Equinox development. If you have further questions in this vein it would be better to ask them elsewhere, e.g. newsgroups or the #osgi channel on IRC. Regards, Neil On Wed, Nov 4, 2009 at 1:09 PM, David Conde <dconde@...> wrote: > Hi Neil, > > Thank for your answer, it was very helpful for me. Just this was what I did not understand, thanks very much. > > I have another question, when is the method updated(String, Dictionary) of MSF called, is it called by event, or do I have to do it when I wish to get another instance for my second device? > > Thanks in advance > > Regards > > David > > -----Mensaje original----- > De: equinox-dev-bounces@... [mailto:equinox-dev-bounces <at> eclipse.org] En nombre de Neil Bartlett > Enviado el: miƩrcoles, 04 de noviembre de 2009 13:23 > Para: Equinox development mailing list > Asunto: Re: [equinox-dev] Configuration Admin Question > > David, > > Yes it sounds like Config Admin with a ManagedServiceFactory (MSF) may > fit your requirements. > > I agree that Config Admin is difficult to understand -- I struggled > with it initially as well. I think that the key to understanding MSFs > is that you do not control the PID. You call > createFactoryConfiguration() with the FactoryPID, and a PID is > generated for you by the Config Admin implementation bundle. If you > later need the PID then you have to get it from the Configuration > object returned to you from createFactoryConfiguration(). > > Hope that helps, > Neil > > > > On Wed, Nov 4, 2009 at 12:00 PM, David Conde <dconde@...> wrote: >> Hi, >> >> >> >> I am thinking about using Configuration Admin Service for my scenario where >> I have to install different bundles which provide services to use different >> devices. The problem is the next one, if I have many equal devices (just >> with different configuration) I would have to use the same bundle which I >> would get an DuplicateBundle_Error because I can not install again this >> bundle, what It is normal because it would be a waste of resources. For this >> reason I though to use Configuration Admin Service with >> ManageServiceFactory, which lets me to use different instances of a same >> service. I have been reading about Configuration Admin Examples and >> Configuration Admin Service documentation in OSGI compendium but I do not >> understand very well how exactly this service works, because I do not see >> the relation between Factory_PID and Service PID. If I want to create new >> instances of my services, when I create a new Configuration for example, I >> would like to create create a new PID for my new Configuration and not to >> call the PID_Factory, how can I create a new configuration for a new >> instance with a new PID? >> >> >> >> There are another way to manage bundles for devices different of Config >> Admin Service? >> >> >> >> Thank you in advance >> >> _______________________________________________ >> equinox-dev mailing list >> equinox-dev@... >> https://dev.eclipse.org/mailman/listinfo/equinox-dev >> >> > _______________________________________________ > equinox-dev mailing list > equinox-dev@... > https://dev.eclipse.org/mailman/listinfo/equinox-dev > > _______________________________________________ > equinox-dev mailing list > equinox-dev@... > https://dev.eclipse.org/mailman/listinfo/equinox-dev >
Enclosing configuration file in a bundle
Hi,
Is there any way to enclosed a configuration file to a bundle in OSGI?
I mean, I have a lot of devices which use the same bundle, but different configuration parameters which I thought about to include them in a configuration file enclosed to the bundle. Is there any service or any special mechanism to do this?
My aim is to install directly a file for each device where my device manager is able to check if a same bundle was installed before so that use it but the new configuration will be different for each device so it has to include in some way in the installation file.
Any hint?
Thank you in advance
Welcome Scott Lewis as a new rt.equinox.incubator Committer
rt.equinox.incubator Committers, This automatically generated message marks the completion of all the legal paperwork and webmaster provisioning for Scott Lewis. Scott Lewis is a new full Committer on the rt.equinox.incubator project. Welcome!
ds and ClassCircularityError
I've been wildly refactoring some p2 code in my workspace to play around with some alternate API.
In doing so, I've broken the SDK's service registration for the UI Policy.
It seems I've got some kind of class circularity going on, but it's not clear to me what the problem is.
The stack trace below appears as soon as the p2 UI bundle is started and tries to obtain the registered Policy object.
The service registration is trying to instantiate the class SDKPolicy.
That constructor is trying to instantiate another class, SDKRepositoryManipulator. The two are unrelated apart from one instantiating the other.
The stack trace indicates the problem is in the constructor of a superclass, RepositoryManipulator. The superclass lives in a different bundle, as does its superclass.
What kinds of things should I be looking for in the involved classes to figure this one out?
thanks for any pointers,
Susan
ENTRY org.eclipse.equinox.p2.ui.sdk 4 0 2009-11-05 16:03:21.062
!MESSAGE
!STACK 0
org.osgi.framework.ServiceException: Exception in org.eclipse.equinox.internal.ds.ServiceReg.getService()
at org.eclipse.osgi.internal.serviceregistry.ServiceUse.getService(ServiceUse.java:130)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:449)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:430)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:667)
at org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper.getService(ServiceHelper.java:29)
at org.eclipse.equinox.internal.p2.ui.ProvUIActivator.initializeProvisioningUI(ProvUIActivator.java:115)
at org.eclipse.equinox.internal.p2.ui.ProvUIActivator.start(ProvUIActivator.java:93)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:353)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:408)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:265)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:106)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:211)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:33)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:466)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:170)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:874)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
at org.eclipse.ui.internal.handlers.HandlerProxy.loadHandler(HandlerProxy.java:351)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:287)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:790)
at org.eclipse.ui.menus.CommandContributionItem.access$18(CommandContributionItem.java:776)
at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:766)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3917)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3510)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2404)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2368)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2220)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:367)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:611)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:566)
at org.eclipse.equinox.launcher.Main.run(Main.java:1363)
at org.eclipse.equinox.launcher.Main.main(Main.java:1339)
Caused by: org.osgi.service.component.ComponentException: Exception occurred while creating new instance of component Component[
name = org.eclipse.equinox.p2.ui.sdk
activate = activate
deactivate = deactivate
modified =
configuration-policy = optional
factory = null
autoenable = true
immediate = false
implementation = org.eclipse.equinox.internal.p2.ui.sdk.SDKPolicy
properties =
serviceFactory = false
serviceInterface = [org.eclipse.equinox.p2.ui.Policy]
references = null
located in bundle = org.eclipse.equinox.p2.ui.sdk_1.0.100.qualifier [96]
]
at org.eclipse.equinox.internal.ds.model.ServiceComponent.createInstance(ServiceComponent.java:456)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.createInstance(ServiceComponentProp.java:255)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:316)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:560)
at org.eclipse.equinox.internal.ds.ServiceReg.getService(ServiceReg.java:52)
at org.eclipse.osgi.internal.serviceregistry.ServiceUse$1.run(ServiceUse.java:120)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.serviceregistry.ServiceUse.getService(ServiceUse.java:118)
... 68 more
Caused by: java.lang.ClassCircularityError: org/eclipse/equinox/p2/ui/RepositoryManipulator
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.createInstance(ServiceComponent.java:454)
... 75 more
RSS Feed