Hi
I'm trying to use file install to configure my iPojo components which are
normally singletons but I'm stuck in that my objects get configured twice once
by iPojo and once by fileinstall.
My objects are annotated like this:
@Component(managedservice =
"edu.gemini.jms.activemq.broker.ActiveMQBrokerComponent")
@Instantiate
public class ActiveMQBrokerComponent {
@Property(name = "brokerUrl", value = "INVALID", mandatory = true)
private String url;
...
And I have a configuration file called
edu.gemini.jms.activemq.broker.ActiveMQBrokerComponent.cfg with the properties
like brokerUrl
It seems first ipojo creates the object and updates them with the default
config and then fileinstall does it again with the correct ones from the file.
What I'd like is that the object is created and updated only once when the
configuration is available via fileinstall.
It seems I can do that with FileInstall if I remove the @Instantiate and use a
configuration file like
edu.gemini.jms.activemq.broker.ActiveMQBrokerComponent-<PID>.cfg
Is that the way this should be done, or is there a better way to achieve
creating and configuring a single ipojo component
Regards
Carlos
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]