Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 336578

Summary: Managed service factory config callback not firing on Equinox startup
Product: [RT] Gemini.Blueprint Reporter: Greg <gdrapp>
Component: CoreAssignee: Project Inbox <gemini.blueprint-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: gdrapp, glyn.normington, olaf
Version: unspecifiedKeywords: helpwanted
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Blueprint XML
none
Managed service factory bean
none
Equinox/Blueprint/Managed service factory startup trace logs none

Description Greg CLA 2011-02-07 21:16:03 EST
Build Identifier: STS build 2.5.2 build 201101081000 / Gemini Blueprint 1.0.0/M1/Equinox 3.6.1

With a managed service factory defined with several configuration keys/values in Equinox, the only time I can get the update-method callback to fire on my bean is when I add or modify a configuration key/value pair after Equinox is started. I would expect the update-method callback to fire when Equinox starts, just like it does for managed-properties on a managed service.


Reproducible: Always

Steps to Reproduce:
1. Configure managed service factory instance in Blueprint xml
2. Create managed service factory config admin instance in Equinox
3. Add a key/value pair to config instance
4. Restart Equinox and observe that config dictionary will not be injected into the bean on startup
Comment 1 Greg CLA 2011-02-07 21:17:56 EST
Created attachment 188489 [details]
Blueprint XML

Blueprint XML with managed service factory
Comment 2 Greg CLA 2011-02-07 21:19:16 EST
Created attachment 188490 [details]
Managed service factory bean

Managed service factory bean with public "update" method to receive config admin injection
Comment 3 Greg CLA 2011-02-07 21:23:06 EST
osgi> cm getv testfactory-1297050867612-0

Configuration for service (pid) "testfactory-1297050867612-0"
(bundle location = reference:file:/Users/grapp/Documents/workspace-sts/TestPlugin/)

key                  value                             type
------               ------                            ------
key1                 value1                            java.lang.String
service.factoryPid   testfactory                       java.lang.String
service.pid          testfactory-1297050867612-0       java.lang.String
Comment 4 Greg CLA 2011-02-07 21:28:02 EST
Created attachment 188491 [details]
Equinox/Blueprint/Managed service factory startup trace logs
Comment 5 Glyn Normington CLA 2012-11-19 06:22:36 EST
(In reply to comment #0)
> Build Identifier: STS build 2.5.2 build 201101081000 / Gemini Blueprint
> 1.0.0/M1/Equinox 3.6.1
> 
> With a managed service factory defined with several configuration
> keys/values in Equinox, the only time I can get the update-method callback
> to fire on my bean is when I add or modify a configuration key/value pair
> after Equinox is started. I would expect the update-method callback to fire
> when Equinox starts, just like it does for managed-properties on a managed
> service.

I agree the function you describe would be desirable. Unfortunately, Gemini Blueprint does not currently implement that function, so I'm afraid I'll have to classify this as an enhancement rather than a bug.

I will add the 'helpwanted' keyword as it would be great if someone had the time to develop a patch for the new function.
Comment 6 Olaf Otto CLA 2016-04-28 07:50:22 EDT
There has not been any activity on this ticket for a long time. I'll close this as won't fix. To be re-opened if a requirement arises.