[
https://issues.apache.org/jira/browse/SLING-2477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13615089#comment-13615089
]
Ian Boston edited comment on SLING-2477 at 3/27/13 9:42 PM:
------------------------------------------------------------
Where does it come from ?
The I".." format is the same format as used by the Felix Configuration Admin
that stores files under config/
see org.apache.sling.commons.log.file.number below.
I think that is why the first comment on this JIRA suggested using it. Using it
would create a single format for config files under config/ and in
sling:OsgiConfig. I have not been able to find definitive documentation from
Apache Felix for the format.
I am not certain where the org.apache.sling.commons.log.file.number{int} comes
from, but it might be based on the JCR DocView XML format that allows
properties to be named "{Integer}org.apache.sling.commons.log.file.number"=6.
Unfortunate I suspect putting
"{Integer}org.apache.sling.commons.log.file.number" into a Felix Config Admin
file might be illegal as I suspect things starting with { are not valid, hence
why org.apache.sling.commons.log.file.number{int} was suggested instead. I am
not certain if the value should be quoted or not at that point. If its an
existing format, perhaps someone can say where it comes from ?
Regardless of which is chosen it will need to be documented and published in a
location which can be found with ease.
One of my big concerns was compatibility with existing formats and backward
compatibility. There mist be literally 1000s of configuration files out there
on disk for various reasons.
To verify, configure something with an number in the Sling Console and look on
disk.
x43543-2:sling ieb$ more
config/org/apache/sling/commons/log/LogManager/factory/writer/f5692976-ddb0-4ce2-b3d3-a254216981f6.config
service.pid="org.apache.sling.commons.log.LogManager.factory.writer.f5692976-ddb0-4ce2-b3d3-a254216981f6"
org.apache.sling.commons.log.file="logs/error.log"
service.factoryPid="org.apache.sling.commons.log.LogManager.factory.writer"
org.apache.sling.commons.log.file.number=I"6"
org.apache.sling.commons.log.file.size="'.'yyyy-MM-dd"
x43543-2:sling ieb$
was (Author: ianeboston):
Where does it come from ?
The I".." format is the same format as used by the Felix Configuration Admin
that stores files under config/
see org.apache.sling.commons.log.file.number below.
I think that is why the first comment on this JIRA suggested using it. Using it
would create a single format for config files under config/ and in
sling:OsgiConfig. I have not been able to find definitive documentation from
Apache Felix for the format.
I am not certain where the org.apache.sling.commons.log.file.number{int} comes
from, but it might be based on the JSC DocView XML format that allows
properties to be named "{Integer}org.apache.sling.commons.log.file.number"=6.
Unfortunate I suspect putting
"{Integer}org.apache.sling.commons.log.file.number" into a Felix Config Admin
file might be illegal as I suspect things starting with { are not valid, hence
why org.apache.sling.commons.log.file.number{int} was suggested instead. I am
not certain if the value should be quoted or not at that point. If its an
existing format, perhaps someone can say where it comes from ?
Regardless of which is chosen it will need to be documented and published in a
location which can be found with ease.
One of my big concerns was compatibility with existing formats and backward
compatibility. There mist be literally 1000s of configuration files out there
on disk for various reasons.
To verify, configure something with an number in the Sling Console and look on
disk.
x43543-2:sling ieb$ more
config/org/apache/sling/commons/log/LogManager/factory/writer/f5692976-ddb0-4ce2-b3d3-a254216981f6.config
service.pid="org.apache.sling.commons.log.LogManager.factory.writer.f5692976-ddb0-4ce2-b3d3-a254216981f6"
org.apache.sling.commons.log.file="logs/error.log"
service.factoryPid="org.apache.sling.commons.log.LogManager.factory.writer"
org.apache.sling.commons.log.file.number=I"6"
org.apache.sling.commons.log.file.size="'.'yyyy-MM-dd"
x43543-2:sling ieb$
> Configuration via sling:OsgiConfig nodes does not support all types
> -------------------------------------------------------------------
>
> Key: SLING-2477
> URL: https://issues.apache.org/jira/browse/SLING-2477
> Project: Sling
> Issue Type: Bug
> Components: Installer
> Affects Versions: JCR Installer 3.1.2
> Reporter: Alexander Klimetschek
> Assignee: Ian Boston
> Attachments: SLING-2477.patch
>
>
> Most notably, the common "service.ranking" needs to be an Integer, while the
> jcr property mapping only allows for "Long" types at the moment. The problem
> is that JCR has a smaller set of property types than the OSGi config admin
> (JCR: String, Boolean, Long, Double, Decimal; OSGi: String, Boolean, Long,
> Integer, Float, Double, and probably more differences...).
> Similarly to properties files (which do it in the value like
> 'service.ranking=I"-10000"' with I=Integer), there must be a way to
> explicitly specify the type regardless of the JCR type. For example, encoding
> it in the property name like "service.ranking{int}".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira