springDM container-managed updates [message #809967] |
Wed, 29 February 2012 09:07  |
Eclipse User |
|
|
|
So, I have springDM managed properties
<beans:bean id="configurationBean" class="com.eugene.PropertiesBean">
<osgix:managed-properties persistent-id="MyPid" update-strategy="container-managed"/>
<beans:property name="host" value="localhost"></beans:property>
<beans:property name="port" value="5698"></beans:property>
</beans:bean>
</beans:beans>
Now, here is what I do. Deploy the bundle to Virgo, everything works great, the default properties (because the MyPid.properties is not deployed) get injected into the bean.
Deploy MyPid.properties where BOTH host and port are changed, they are both re-injected also.
That's great. But here is the thing, can I have one single method that would tell me that the bean has changed? The properties have been re-injected? Something like : afterPropertiesSet or init in XML config? Because right now having an afterPropertiesSet or init works only the first time the properties get injected, not the second, third and so on... Which is somehow logic, being a singleton.
But I thought that people behind spring DM thought about this and I am just missing he obvious here, like implementing some sort on interface...
I do not know (googleed it) if spring DM offers such a thing.
Thx! Eugene.
|
|
|
|
Re: springDM container-managed updates [message #810039 is a reply to message #809982] |
Wed, 29 February 2012 10:57  |
Eclipse User |
|
|
|
Is there a reason (apart from simple 'just not implemented') that ManagedServiceBeanManager does not invoke e.g. Spring's InitializingBean::afterPropertiesSet method (if it's available) for container-managed config updates?
Thanks,
Valdas
|
|
|
Powered by
FUDForum. Page generated in 0.43929 seconds