The configuration file 'etc/org.apache.karaf.management.cfg' can be used to
change the RMI ports and addresses.
In this file and every other *.cfg file you can use placeholders, which may
be defined in the 'etc/custom.properties' file.

For example you can change the key rmiRegistryPort to:

  rmiRegistryPort = ${my.custom.rmi.port}

Then 'my.custom.rmi.port' has to be defined in 'etc/custom.properties' like:
  my.custom.rmi.port = 1100

This works perfectly. What does not work are karaf's shell command like
'instance:list'.
If you invoke this command with the placeholder customization you get the
error message:

karaf@root()> instance:list
Error executing command: For input string: ""

If I try to debug it, I end up in the class InstanceServiceImpl inside the
method getKarafPort().
The Properties object this method gets, has an empty value for
rmiRegistryPort. It seems as this placeholder is not ”interpolated”
correctly.

The karaf instance itself is correctly binded at port 1100 instead of 1099.


Is this a bug or did I misinterpret the possibilities of configuration in
this case?






--
View this message in context: 
http://karaf.922171.n3.nabble.com/org-apache-karaf-management-cfg-and-placeholder-tp4036227.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Reply via email to