You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2013/07/09 14:51:48 UTC

[jira] [Resolved] (SLING-2956) Store compiled classes in a cluster aware way

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

Carsten Ziegeler resolved SLING-2956.
-------------------------------------

    Resolution: Fixed

Implemented in revision 1501227 by adding the Sling Id to the path if a flag is set. I set the flag to default to true
                
> Store compiled classes in a cluster aware way
> ---------------------------------------------
>
>                 Key: SLING-2956
>                 URL: https://issues.apache.org/jira/browse/SLING-2956
>             Project: Sling
>          Issue Type: Improvement
>          Components: JCR
>    Affects Versions: JCR Classloader 3.1.12
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>             Fix For: JCR ClassLoader 3.1.14
>
>
> If e.g. jsp compilation is run in a clustered installation, there might be a race condition of two instances trying to compile the same jsp at the same time. This might result in compiled classes written by one instance, getting removed by another instance or errors due to concurrent modifications etc.

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

Re: [jira] [Resolved] (SLING-2956) Store compiled classes in a cluster aware way

Posted by Carsten Ziegeler <cz...@apache.org>.
Yes, good point - I haven't looked into the details, however I think we
patched Jasper over time at various places. Storing the generated files is
only one part, the dynamic OSGi aware classloading is another, some hacks
for jsp/taglib handling wrt shared webapps and there might be more.
I'm all for using an unpatched Jasper if possible.

Btw, we also have an implementation of the class writer which stores the
classes in the file system.

Carsten


2014/1/7 Felix Meschberger <fm...@adobe.com>

> Hi all
>
> Somehow I missed this when it was current … Yet, I want to quickly pick it
> up for discussion:
>
> Am 09.07.2013 um 05:51 schrieb Carsten Ziegeler (JIRA) <ji...@apache.org>:
>
> >
> >     [
> https://issues.apache.org/jira/browse/SLING-2956?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]
> >
> > Carsten Ziegeler resolved SLING-2956.
> > -------------------------------------
> >
> >    Resolution: Fixed
> >
> > Implemented in revision 1501227 by adding the Sling Id to the path if a
> flag is set. I set the flag to default to true
> >
> >> Store compiled classes in a cluster aware way
> >> ——————————————————————
>
> To me compilation to the repository has two advantages over compiling to
> the filesystem: We can share the compiled classes in the cluster and we can
> replicate the compiled classes. Neither are possible any longer adding this
> id to the path.
>
> Hence, I wonder, why we do not go the full route and compile to the
> filesystem. This would have the massive benefit of being able to use an
> unpatched (or just slightly extended) Jasper version instead of patching
> and having a hard time upgrading to a more recent Jasper version (ours is
> quite oooold now).
>
> WDYT ?
>
> Regards
> Felix




-- 
Carsten Ziegeler
cziegeler@apache.org

Re: [jira] [Resolved] (SLING-2956) Store compiled classes in a cluster aware way

Posted by Felix Meschberger <fm...@adobe.com>.
Hi all

Somehow I missed this when it was current … Yet, I want to quickly pick it up for discussion:

Am 09.07.2013 um 05:51 schrieb Carsten Ziegeler (JIRA) <ji...@apache.org>:

> 
>     [ https://issues.apache.org/jira/browse/SLING-2956?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
> 
> Carsten Ziegeler resolved SLING-2956.
> -------------------------------------
> 
>    Resolution: Fixed
> 
> Implemented in revision 1501227 by adding the Sling Id to the path if a flag is set. I set the flag to default to true
> 
>> Store compiled classes in a cluster aware way
>> ——————————————————————

To me compilation to the repository has two advantages over compiling to the filesystem: We can share the compiled classes in the cluster and we can replicate the compiled classes. Neither are possible any longer adding this id to the path.

Hence, I wonder, why we do not go the full route and compile to the filesystem. This would have the massive benefit of being able to use an unpatched (or just slightly extended) Jasper version instead of patching and having a hard time upgrading to a more recent Jasper version (ours is quite oooold now).

WDYT ?

Regards
Felix