You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Carsten Ziegeler <cz...@apache.org> on 2010/01/25 09:02:35 UTC
Moving repository classloader code to Sling
Hi,
first, sorry for the crosspost :)
I think we briefly discussed this topic some time ago: the Jackrabbit
1.x versions provide a repository classloader which is not available
anymore in 2.0.
In Sling we provide a complete scripting framework based on top of the
repository and we're using the Jackrabbit classloader code and extended it.
As Jackrabbit is not using the code anymore, but Sling is, I think it
makes perfectly sense to move/copy the code to Sling.
So I would like to copy the classloader code into the Sling repo in the
next days and modifiy it to suit Sling's needs a little bit more. This
has no impact on Jackrabbit as 2.0 does not contain the code at all and
it still remains in the 1.x branch.
Basically this is more a FYI as no legal steps etc are involved :) But
before doing this I want to be sure that there are zero objections.
Regards
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
Re: Moving repository classloader code to Sling
Posted by Carsten Ziegeler <cz...@apache.org>.
Marcel Reutegger wrote:
> Hi,
>
> the classloader has been moved to the jackrabbit commons area. see
> http://markmail.org/message/qqlvlwpgi5oauak6
>
> I think we didn't release it as part of 2.0 because no changes were
> necessary and it should basically work with a JCR 1.0 or 2.0
> repository.
>
> what changes do you have in mind? would those changes add dependencies
> to sling modules?
>
> if there's more interest in the sling community to further develop the
> code then this is probably a good move. but then we shouldn't keep the
> code in jackrabbit commons. I'd rather have it in just one place.
>
Yes, me, too - I just committed a copy of the jackrabbit classloader to
sling and started with the changes.
Now, the original version contains a lot of unused stuff, like support
for patterns, for jar files in the repository etc. - this makes the code
much larger than we currently need. And this in turn makes fixing
potential problems hard.
I've removed all of this now in Sling - and I think we can further clean
up the code and make it more compact.
I'll leave it up to the Jackrabbit community to decide, but if this
piece of code is not used, I would suggest to remove it from jackrabbit
commons. If people really need this version they can use the 1.5 version
as it should work pretty well.
Regards
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
Re: Moving repository classloader code to Sling
Posted by Felix Meschberger <fm...@gmail.com>.
Hi,
On 25.01.2010 10:22, Marcel Reutegger wrote:
> Hi,
>
> the classloader has been moved to the jackrabbit commons area. see
> http://markmail.org/message/qqlvlwpgi5oauak6
>
> I think we didn't release it as part of 2.0 because no changes were
> necessary and it should basically work with a JCR 1.0 or 2.0
> repository.
>
> what changes do you have in mind? would those changes add dependencies
> to sling modules?
>
> if there's more interest in the sling community to further develop the
> code then this is probably a good move. but then we shouldn't keep the
> code in jackrabbit commons. I'd rather have it in just one place.
Yes, I would favor a move, too. In fact this has been proposed by Jukka
already in [1]. So lets go with this.
Regards
Felix
[1] http://markmail.org/message/et5dux6y4hufeij6
>
> regards
> marcel
>
>
>
> On Mon, Jan 25, 2010 at 09:02, Carsten Ziegeler <cz...@apache.org> wrote:
>> Hi,
>>
>> first, sorry for the crosspost :)
>>
>> I think we briefly discussed this topic some time ago: the Jackrabbit
>> 1.x versions provide a repository classloader which is not available
>> anymore in 2.0.
>> In Sling we provide a complete scripting framework based on top of the
>> repository and we're using the Jackrabbit classloader code and extended it.
>>
>> As Jackrabbit is not using the code anymore, but Sling is, I think it
>> makes perfectly sense to move/copy the code to Sling.
>>
>> So I would like to copy the classloader code into the Sling repo in the
>> next days and modifiy it to suit Sling's needs a little bit more. This
>> has no impact on Jackrabbit as 2.0 does not contain the code at all and
>> it still remains in the 1.x branch.
>>
>> Basically this is more a FYI as no legal steps etc are involved :) But
>> before doing this I want to be sure that there are zero objections.
>>
>> Regards
>> Carsten
>> --
>> Carsten Ziegeler
>> cziegeler@apache.org
>>
>
Re: Moving repository classloader code to Sling
Posted by Marcel Reutegger <ma...@gmx.net>.
Hi,
the classloader has been moved to the jackrabbit commons area. see
http://markmail.org/message/qqlvlwpgi5oauak6
I think we didn't release it as part of 2.0 because no changes were
necessary and it should basically work with a JCR 1.0 or 2.0
repository.
what changes do you have in mind? would those changes add dependencies
to sling modules?
if there's more interest in the sling community to further develop the
code then this is probably a good move. but then we shouldn't keep the
code in jackrabbit commons. I'd rather have it in just one place.
regards
marcel
On Mon, Jan 25, 2010 at 09:02, Carsten Ziegeler <cz...@apache.org> wrote:
> Hi,
>
> first, sorry for the crosspost :)
>
> I think we briefly discussed this topic some time ago: the Jackrabbit
> 1.x versions provide a repository classloader which is not available
> anymore in 2.0.
> In Sling we provide a complete scripting framework based on top of the
> repository and we're using the Jackrabbit classloader code and extended it.
>
> As Jackrabbit is not using the code anymore, but Sling is, I think it
> makes perfectly sense to move/copy the code to Sling.
>
> So I would like to copy the classloader code into the Sling repo in the
> next days and modifiy it to suit Sling's needs a little bit more. This
> has no impact on Jackrabbit as 2.0 does not contain the code at all and
> it still remains in the 1.x branch.
>
> Basically this is more a FYI as no legal steps etc are involved :) But
> before doing this I want to be sure that there are zero objections.
>
> Regards
> Carsten
> --
> Carsten Ziegeler
> cziegeler@apache.org
>
Re: Moving repository classloader code to Sling
Posted by Felix Meschberger <fm...@gmail.com>.
Hi,
On 27.01.2010 20:56, Grégory Joseph wrote:
>
> On Jan 27, 2010, at 8:50 PM, Grégory Joseph wrote:
>> I'd <assume> it is/could/should be independent of Jackrabbit, i.e rely on the JCR API alone.
>
> A quick grep -hr import *|sort|uniq in the source shows that indeed it does not rely on anything else than java. and javax. packages, with the exception of JackrabbitNodeTypeManager, which I'm assuming, again, should be fairly trivial to overcome by upgrading to the JCR 2.0 APIs.
That is correct and has always been the goal of the class loader. This
is what an API is for, right ? ;-)
Regards
Felix
Re: Moving repository classloader code to Sling
Posted by Grégory Joseph <gr...@magnolia-cms.com>.
On Jan 27, 2010, at 8:50 PM, Grégory Joseph wrote:
> I'd <assume> it is/could/should be independent of Jackrabbit, i.e rely on the JCR API alone.
A quick grep -hr import *|sort|uniq in the source shows that indeed it does not rely on anything else than java. and javax. packages, with the exception of JackrabbitNodeTypeManager, which I'm assuming, again, should be fairly trivial to overcome by upgrading to the JCR 2.0 APIs.
Cheers,
-g
Re: Moving repository classloader code to Sling
Posted by Carsten Ziegeler <cz...@apache.org>.
Just for completness - in the meantime we forked the code for Sling - it
seems that the classloader code in jackrabbit contains some stuff that
Sling either does not need (like jars in the repository) or is not finished.
For everyone building web applications with jackrabbit, Sling and its
classloaders can easily be used as OSGi bundles :)
Regards
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
Re: Moving repository classloader code to Sling
Posted by Jukka Zitting <ju...@gmail.com>.
Hi,
2010/1/28 Grégory Joseph <gr...@magnolia-cms.com>:
> ps: fwiw, I patched the classloader from https://svn.apache.org/repos/asf/jackrabbit/commons/classloader/trunk/
> to use JCR 2.0 and remove the Jackrabbit dependencies (except for testing, of course).
> Is there any interest in such a patch on the Jackrabbit side... now ?
The relevant issue tracker is in
https://issues.apache.org/jira/browse/JCRCL. If there's enough
activity there (bug reports, feature requests, patches, etc.) then
we'd certainly be happy to keep the codebase active. However, for
quite a while the only activity on the codebase has been with Sling,
so it seems like the best approach is for Sling to take whatever they
need and for us to deprecate the Jackrabbit codebase.
BR,
Jukka Zitting
Re: Moving repository classloader code to Sling
Posted by Grégory Joseph <gr...@magnolia-cms.com>.
Hi Felix,
Thanks for the links - I could have search for a long time in my jackrabbit-dev-list archive ;)
>>> before doing this I want to be sure that there are zero objections.
>>
>> I'm only answering because I'd like to have a close look at it one of these days, and hopefully use/improve it, too. If it stays repository- and application-neutral. If it becomes tied to Sling, not so much.
>
> Well, if Sling would take over maintenance of the classloader, the
> existing functionality would probably have to be preserved. Yet, of
> course, we would enhance it to support Sling's requirements.
>
> For now, Carsten has just been copying the class loader to Sling and
> stripped it down to remove stuff, which we deem useless for Sling (so he
> essentially forked it).
Right. Well, essentially, I don't care *where* it is, as long as I can, one way or another, use it and possibly contribute.
I'm not looking into using in the short-term, though, so I'm not even sure right now if it'd what I need or not at all, but it sure looks like it. Worse come to worse, I could also fork it ;)
>> What kind of changes/improvements are you looking into ?
>
> Mainly the requirements for Sling in terms of "dynamic class laoding
> infrastructure" to support Sling's support for dynamic code changes in
> the repository and in the OSGi framework.
Hmmm, obscure stuff to me. Any chance you'd have a pointer to a page, document, email, ... outlining what that's all about ? Just curious to see if that has anything to do with what I'm after. At the moment, I'm looking at a jcr-classloader as some sort of virtual filesystem where I could store/load jars/classes, and indeed possibly reloaded when updated. OSGi is still quite a big dark box to me.
Cheers,
-g
ps: fwiw, I patched the classloader from https://svn.apache.org/repos/asf/jackrabbit/commons/classloader/trunk/ to use JCR 2.0 and remove the Jackrabbit dependencies (except for testing, of course). Is there any interest in such a patch on the Jackrabbit side... now ?
Re: Moving repository classloader code to Sling
Posted by Felix Meschberger <fm...@gmail.com>.
Hi,
On 27.01.2010 20:50, Grégory Joseph wrote:
> Hi Carsten,
>
> On Jan 25, 2010, at 9:02 AM, Carsten Ziegeler wrote:
>> I think we briefly discussed this topic some time ago: the Jackrabbit
>> 1.x versions provide a repository classloader which is not available
>> anymore in 2.0.
>
> Can't find any related thread. Any pointer ?
http://markmail.org/message/et5dux6y4hufeij6 is the message from Jukka
regarding the option to move the classloader from Jackrabbit to Sling
and http://markmail.org/thread/vechl274bewkh4o6 is the thread.
>
>> In Sling we provide a complete scripting framework based on top of the
>> repository and we're using the Jackrabbit classloader code and extended it.
>>
>> As Jackrabbit is not using the code anymore, but Sling is, I think it
>> makes perfectly sense to move/copy the code to Sling.
>
> As far as I can tell, it's in the "commons" folder [1] - it's an optional component that's indeed not bundled with Jackrabbit. TBH, I haven't looked at it very closely, but I'd it is/could/should be independent of Jackrabbit, i.e rely on the JCR API alone.
>
>> So I would like to copy the classloader code into the Sling repo in the
>> next days and modifiy it to suit Sling's needs a little bit more. This
>> has no impact on Jackrabbit as 2.0 does not contain the code at all and
>> it still remains in the 1.x branch.
>
> Again - afaict, it's not in either branch, it's a separate component.
>
>> Basically this is more a FYI as no legal steps etc are involved :) But
>> before doing this I want to be sure that there are zero objections.
>
> I'm only answering because I'd like to have a close look at it one of these days, and hopefully use/improve it, too. If it stays repository- and application-neutral. If it becomes tied to Sling, not so much.
Well, if Sling would take over maintenance of the classloader, the
existing functionality would probably have to be preserved. Yet, of
course, we would enhance it to support Sling's requirements.
For now, Carsten has just been copying the class loader to Sling and
stripped it down to remove stuff, which we deem useless for Sling (so he
essentially forked it).
>
> What kind of changes/improvements are you looking into ?
Mainly the requirements for Sling in terms of "dynamic class laoding
infrastructure" to support Sling's support for dynamic code changes in
the repository and in the OSGi framework.
Regards
Felix
Re: Moving repository classloader code to Sling
Posted by Grégory Joseph <gr...@magnolia-cms.com>.
Hi Carsten,
On Jan 25, 2010, at 9:02 AM, Carsten Ziegeler wrote:
> I think we briefly discussed this topic some time ago: the Jackrabbit
> 1.x versions provide a repository classloader which is not available
> anymore in 2.0.
Can't find any related thread. Any pointer ?
> In Sling we provide a complete scripting framework based on top of the
> repository and we're using the Jackrabbit classloader code and extended it.
>
> As Jackrabbit is not using the code anymore, but Sling is, I think it
> makes perfectly sense to move/copy the code to Sling.
As far as I can tell, it's in the "commons" folder [1] - it's an optional component that's indeed not bundled with Jackrabbit. TBH, I haven't looked at it very closely, but I'd it is/could/should be independent of Jackrabbit, i.e rely on the JCR API alone.
> So I would like to copy the classloader code into the Sling repo in the
> next days and modifiy it to suit Sling's needs a little bit more. This
> has no impact on Jackrabbit as 2.0 does not contain the code at all and
> it still remains in the 1.x branch.
Again - afaict, it's not in either branch, it's a separate component.
> Basically this is more a FYI as no legal steps etc are involved :) But
> before doing this I want to be sure that there are zero objections.
I'm only answering because I'd like to have a close look at it one of these days, and hopefully use/improve it, too. If it stays repository- and application-neutral. If it becomes tied to Sling, not so much.
What kind of changes/improvements are you looking into ?
Cheers,
-g
[1] https://svn.apache.org/repos/asf/jackrabbit/commons/classloader/trunk/