[ 
https://issues.apache.org/jira/browse/SLING-1273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bertrand Delacretaz resolved SLING-1273.
----------------------------------------

       Resolution: Fixed
    Fix Version/s:  Launchpad Base 2.2.0

Implemented in revision 897151, using BundleVersionInfo from SLING-1278 to 
compare launcher jar versions and select the most recent one.

Also added logging about launcher jar version, installation and replacement, to 
make troubleshooting easier.

Tested as follows, using launchpad/app, webapp and testing projects:
1. Delete sling home folder and start -> ok, launcher jar J1 extracted to sling 
home from sling jar or war file, named with a timestamp at the end.
2. Stop and restart, launcher jar kept as is but renamed without timestamp
3. Copy an old launcher jar to sling home, restart, it is correctly deleted and 
not used
4. Same but set timestamp in the future on old jar, also correctly deleted and 
not used (that's what failed before)
5. Copy more recent launcher jar J2 to sling home, restart -> ok, new jar is 
used, old one deleted
6. Restart once again, J2 still used, ok
7. Stop, delete J2, restart -> J1 used again, ok

"More recent" is defined by BundleVersionInfo.compareTo().


> Launchpad Loader uses fragile file timestamp comparison to update launcher jar
> ------------------------------------------------------------------------------
>
>                 Key: SLING-1273
>                 URL: https://issues.apache.org/jira/browse/SLING-1273
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad
>    Affects Versions: Launchpad Base 2.1.0
>            Reporter: Bertrand Delacretaz
>             Fix For:  Launchpad Base 2.2.0
>
>
> If the timestamp of the org.apache.sling.launchpad.base.jar file in the sling 
> home folder is set in the future by mistake (like happens sometimes when 
> copying/restoring the file), the Sling Loader will not upgrade it anymore, 
> even if it has a more recent version.
> As that launcher jar is built as a bundle, we should use the bundle's 
> Bnd-LastModified header (or even the full version number) to decide whether 
> to update the launcher jar.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to