|springDM container-managed updates [message #809967]
||Wed, 29 February 2012 14:07
| eugene rabii
Registered: February 2012
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>
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.
Powered by FUDForum
. Page generated in 0.03576 seconds