You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Ian Boston (JIRA)" <ji...@apache.org> on 2010/09/24 14:02:34 UTC

[jira] Commented: (SLING-1802) ContentLoader does not update the content from a bundle when the bundle is updated.

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

Ian Boston commented on SLING-1802:
-----------------------------------

Using last modified of the bundle and comparing it to the last modified of the resource in jcr appears to be a good way of determining if an update is required. Determining the last update of a bundle is less easy as bundle.getLastModified() gives the time when the bundle was ast modified in the OSGi container, not last built. The BND Tool adds a Manifest Bnd-LastModified header which is the build time of the bundle but this isnt present in absolutely every bundle.
So

Math.min(Math.min(Long.parseLong((String)bundle.getProperties().get("Bnd-LastModified")),bundle.getLastModified()),entryUrlConnection.getLastModified());

should give a reasonable approximation for each item and be good for future changes to Felix, should they happen.



> ContentLoader does not update the content from a bundle when the bundle is updated.
> -----------------------------------------------------------------------------------
>
>                 Key: SLING-1802
>                 URL: https://issues.apache.org/jira/browse/SLING-1802
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR
>    Affects Versions: JCR ContentLoader 2.1.0
>            Reporter: Ian Boston
>
> If you create an updated bundle containing content to be installed by the content loader, that updated content does not get installed.
> You can use overwrite:=true, however if you do that the entire tree is overwritten including any content from other bundles.
> A workarround is to only allow one bundle to update any one folder, although this may not be suitable for certain configurations.
> This was discussed at http://markmail.org/thread/t4efmodaxofofjwr
> One possible solution is to use the lastModified date of the bundle to determine if new content should be uploaded.

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