Hi Ronny,
which version of Cellar do you use ?
Do you mind to make a quick test with a SNAPSHOT ?
Basically, the reason for filtering the factoryPid is that normally,
they are local to a node (they are created locally), so not sure if it
makes sense to sync it as it should be created by the bundle/factory.
Regards
JB
On 12/23/2014 07:04 AM, Ronny Bräunlich wrote:
Hi Achmin, hi Jean-Baptiste,
thank you for your quick responses.
Please, you could explain to me why the service.factoryPid was
excluded and why you think that I shouldn't use a config-factory?
What I try to achive is that on one Karaf instance the service gets
configured and the ManagedServiceFactory on every Karaf creates the
same service. That ways I hope to achieve better scaling (at least in
my mind ;) ) because the service exists several times.
Cheers,
Ronny
PS. Happy holidays guys!
2014-12-22 21:22 GMT+01:00, Jean-Baptiste Onofré <[email protected]>:
Hi Ronny,
as you can see in the Cellar ConfigurationSupport:
private static String[] EXCLUDED_PROPERTIES = {"service.factoryPid",
"felix.fileinstall.filename", "felix.fileinstall.dir",
"felix.fileinstall.tmpdir", "org.ops4j.pax.url.mvn.defaultRepositories"};
The service.factoryPid is not sync by Cellar: it's an expected behavior
as it doesn't make sense to sync it: the main configuration should
create the pid.
I created a Jira to let the user configure the excluded properties (as
his own risk).
If your configuration is a regular conf, it should be sync without
problem by Cellar. I don't think it's a good idea to sync config factory
(and use config factory generally speaking ;))
Let me implement the command to allow you to change the excluded
properties.
Regards
JB
On 12/22/2014 09:10 PM, Ronny Bräunlich wrote:
Hi all,
I know I already had some similar question but I think I am getting
closer to the real problem.
There is an example project, too, which you can find here:
https://github.com/rbraeunlich/karaf-managed-service-factory-example
Basically I have two Karaf instances synchronized with the help of
Cellar.
In the etc/ directory I placed a file
named de.blogspot.wrongtracks.simple.factory.Factory-1.cfg
The log of the first Karaf shows the expected log entries:
"Got pid:
de.blogspot.wrongtracks.simple.factory.Factory.6b9773c4-a828-4ddc-bbdc-ecbdd99535cb
with following dictionary.“
Unfortunately, the second Karaf doesn’t want to participate. The
configuration arrived (visible via config:list
"(service.pid=de.blogspot*)“ but no log entries are visible.
Shouldn’t the second factory write the log entries, too?
Cheers,
Ronny
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com