Hi I gonna review this this afternoon and get back to you.
Regards JB -- Jean-Baptiste Onofré [email protected] http://blog.nanthrax.net Talend - http://wwx.talend.com ----- Reply message ----- From: "Krzysztof Sobkowiak" <[email protected]> To: <[email protected]> Subject: Updating Managed Service Factory Config Via "config:" commands? Date: Thu, Dec 26, 2013 11:39 am Hi I have spent some time last night to test some features I used to use in Karaf 2.x. The option -f/--file has been removed in Karaf 3.x (but config:edit --help still describes this option). How can I update the managed service factory using the config: command with no usage of the generated pid. Can I edit the config using the file name like in Karaf 2.x? If no, how can I perform this config update? Could you please update the User Manual with information how to manage the managed service factories? Best regards Krzysztof On 26.03.2013 21:42, Achim Nierbeck wrote: Hi, you should add the '-f' to the config:edit command, this way a file with the same name is created. In your case it should look like the following: config:edit -f com.mycompany.myservice-healthcheck regards, Achim 2013/3/26 Gareth <[email protected]> Hi, I am trying to update factory config via config: commands (Karaf 2.3.1). This config was created by an entry in a feature file thus a backing config file does not exist. i.e.: Pid: com.mycompany.myservice.327d4cd4-4704-4190-9e51-26f5f0b91435 FactoryPid: com.mycompany.myservice BundleLocation: mvn:com.mycompany/mycompany/1.0.0-SNAPSHOT Properties: myservice.host = 0.0.0.0 myservice.port = 8080 org.apache.karaf.features.configKey = com.mycompany.myservice-healthcheck service.factoryPid = com.mycompany.myservice service.pid = com.mycompany.myservice.327d4cd4-4704-4190-9e51-26f5f0b91435 If I try and edit this config. e.g.: config:edit com.mycompany.myservice-healthcheck config:propset myservice.port = 8081 config:update I get a new config: Pid: com.mycompany.myservice.8cbfea87-f66e-44b4-b94a-11fdb14c235f FactoryPid: com.mycompany.myservice BundleLocation: mvn:com.antennasoftware/gravity.clientAP.blueprint/1.0.0-SNAPSHOT Properties: service.pid = com.mycompany.myservice.8cbfea87-f66e-44b4-b94a-11fdb14c235f myservice.port = 8081 service.factoryPid = com.mycompany.myservice felix.fileinstall.filename = file:/home/karaf/apache-karaf-2.3.1/etc/com.mycompany.myservice-healthcheck.cfg If I go and specify the pid exactly: > config:edit com.mycompany.myservice.327d4cd4-4704-4190-9e51-26f5f0b91435 > config:propset myservice.port 8081 > config:update Nothing happens. Am I missing something here? BTW, if the factory configuration is backed by a file everything works fine. And if I update a non-factory not backed by a file, a file gets created after the update. If someone could let me know what I am doing wrong, it would be much appreciated. thanks in advance, Gareth -- View this message in context: http://karaf.922171.n3.nabble.com/Updating-Managed-Service-Factory-Config-Via-config-commands-tp4028322.html Sent from the Karaf - User mailing list archive at Nabble.com. -- Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project Lead blog <http://notizblog.nierbeck.de/> -- Krzysztof Sobkowiak JEE & OSS Architect | Technical Architect @ Capgemini e-mail: [email protected] | Twitter: @KSobkowiak
