[ 
https://issues.apache.org/jira/browse/SLING-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13675747#comment-13675747
 ] 

Chetan Mehrotra commented on SLING-2905:
----------------------------------------

Not sure if fragment bundles can be used to add bootdelegation entries. I can 
go that route if required. However for doing some POC and investigation I need 
to modify the bootdelegation list temporarily and also need to restart Sling 
from scratch to see the result. Hence was looking for a way to use the sling 
include feature. For now the system property approach works fine for me.

However this feature would be useful for me in some other scenarios also when I 
need to provide some extra system properties which are to be used in first 
startup itself.


                
> Providing extra properties via sling_install.properties does not work
> ---------------------------------------------------------------------
>
>                 Key: SLING-2905
>                 URL: https://issues.apache.org/jira/browse/SLING-2905
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad
>    Affects Versions:  Launchpad Base 2.2.0
>            Reporter: Chetan Mehrotra
>            Priority: Minor
>
> For my case I need to add extra packages to Sling Bootdelegation package list 
> without modifying the Sling based application. Sling enables providing extra 
> properties during startup by adding sling_install.properties under Sling Home 
> directory. This logic however does not work currently as expected.
> As per Sling#loadIncludes [1] the inclusion logic would remove the keys 
> referring to includes irrespective of the fact that include has been resolved 
> or not. Currently following sequence happens at startup
> 1. Sling.loadConfigProperties invokes  this.loadIncludes(staticProps, null 
> /*Sling Home*/); passing null for Sling Home as it has not been resolved by 
> now
> 2. The Sling.loadIncludes would try to resolve the include. However as the 
> Sling Home is not set the inclusion would not work and key itself would also 
> be removed from the config
> 3. Sling.loadConfigProperties again invokes this.loadIncludes(runtimeProps, 
> slingHome); this time passing the Sling Home. However by now the include 
> properties have already been removed and this inclusion would not work again.
> One possible fix is to remove the inclusion key only if the file is included.
> As a workaround I had to specify the extra packages via system property 
> -Dorg.apache.sling.launcher.bootdelegation=,sun.misc
> [1] 
> https://github.com/apache/sling/blob/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/Sling.java#L761

--
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

Reply via email to