You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Thomas Draier <th...@codeva.net> on 2004/09/01 12:42:44 UTC
slide integration
hi guys,
i've been integrating slide in an application for quite a long time -
the integration was successful and we now use slide 1.0.16 in our
portal (that you can download at www.jahia.org) - thanks for providing
such a nice webdav framework ! - but i had to make some changes to make
it work in our context. now i'd like to use the latest version of
slide, and share the fixes i've made, since now i've got something
which is pretty stable. most of the fixes i've made before on 1.0.16
were also done by your team, but some points are still opens - here's a
short resume of the changes i've done so far, that i still need in
order to make it play :
1/ i've got an issue with the namespace initialization in the Namespace
class, loadBaseData method - there are many transactional stuff that i
do not completely understand, and this doesn't work with a non
transactional database, since some transactions need to be rollbacked
when the root object is already created. i just kept the first begin
and last commit, and removed the try catch around the root creation -
that works fine, data are well loaded the first time you start your
app.
2/ in AbstractSimpleService, there's a direct reference to the current
Xid. that looks very strange to me, as i assume that different
transactions can happens at the same time. in fact i had a very strange
behaviour with multiple clients, or with complex clients that have
multiple threads, that disappeared when i replaced the reference to the
Xid with a ThreadLocal object. i'm not using a transactional database
so i'm not completely sure this works in that case, but i do not see
any reason why that could be a problem.
3/ in ContentImpl, retrieve() method, a revision is created if no
revision was there before. a comment says that it should'nt be done
here, and the point is that if you have read access but not write
access you cannot retrieve the object .. everything is working fine
when you just remove the creation. any idea why this was done here ?
4/ i've got an issue with some navigators, when using non-ascii
characters in filenames. the standards does not define if an
url-encoded filename should be encoded using utf-8 or another encoding.
i've written an alternative method of URLUtil.URLDecode() that first
tries to determine if the string can be an utf-8 string, and then use
this encoding instead of the default encoding . that does not work for
100% of all strings, since sometimes a string can look like an utf-8,
but this is occurs extremely rarely, as you need to have a very
specific sequence of special characters.
5/ i've seen that you added some listeners in the MacroImpl class, but
the one i need is a MoveListener, that is called after the copy and
before the move, in order to update the references to the file. i'm not
usign bindings yet.
i'm working on the slide 2 release branch, if you are interested i can
either send you the updated code or merge before with the head.
thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org
Re: slide integration
Posted by Oliver Zeigermann <ol...@zeigermann.de>.
Hi Thomas!
Thomas Draier wrote:
> hi oliver,
>
> Le 6 sept. 04, à 17:08, Oliver Zeigermann a écrit :
>
>> Hi Thomas!
>>
>> It would be great if you contributed your changes! It would be best to
>> create a bugzilla entry and add patches done to the current Slide CVS
>> HEAD to it. I will take care of the patches then...
>>
>> More comment follow inline...
>>
>> Thomas Draier wrote:
>>
>>> hi guys,
>>> i've been integrating slide in an application for quite a long time -
>>> the integration was successful and we now use slide 1.0.16 in our
>>> portal (that you can download at www.jahia.org) - thanks for
>>> providing such a nice webdav framework ! - but i had to make some
>>> changes to make it work in our context. now i'd like to use the
>>> latest version of slide, and share the fixes i've made, since now
>>> i've got something which is pretty stable. most of the fixes i've
>>> made before on 1.0.16 were also done by your team, but some points
>>> are still opens - here's a short resume of the changes i've done so
>>> far, that i still need in order to make it play :
>>> 1/ i've got an issue with the namespace initialization in the
>>> Namespace class, loadBaseData method - there are many transactional
>>> stuff that i do not completely understand, and this doesn't work with
>>> a non transactional database, since some transactions need to be
>>> rollbacked when the root object is already created. i just kept the
>>> first begin and last commit, and removed the try catch around the
>>> root creation - that works fine, data are well loaded the first time
>>> you start your app.
>>
>>
>> Is this still valid in the current Slide version?
>
>
> yes, i didn't see any change in the latest cvs version, still the same
> procedure as in 1.0.16
Let's see if the patch works with the other store implementations...
>>
>>> 2/ in AbstractSimpleService, there's a direct reference to the
>>> current Xid. that looks very strange to me, as i assume that
>>> different transactions can happens at the same time. in fact i had a
>>> very strange behaviour with multiple clients, or with complex clients
>>> that have multiple threads, that disappeared when i replaced the
>>> reference to the Xid with a ThreadLocal object. i'm not using a
>>> transactional database so i'm not completely sure this works in that
>>> case, but i do not see any reason why that could be a problem.
>>
>>
>> It has been deprecated as it allows for a single context only. That
>> has been indicated by the Javadocs...
>>
>
> correct, i was looking at an older version (2.0-release). i probably
> need to rewrite my store based on JDBCStore.
>
>>> 3/ in ContentImpl, retrieve() method, a revision is created if no
>>> revision was there before. a comment says that it should'nt be done
>>> here, and the point is that if you have read access but not write
>>> access you cannot retrieve the object .. everything is working fine
>>> when you just remove the creation. any idea why this was done here ?
>>
>>
>> I have no idea either. Shouldn't an ObjectNotFoundException be thrown
>> instead?
>>
>
> i do not remember when it is possible to have an object with no
> revisions, i think that can happens on directories - in fact that was
> happening in 1.0.16, revision descriptors were not always present in the
> store, but i'm not sure that still happen - i'll check if it is still
> the case.
OK
>>> 4/ i've got an issue with some navigators, when using non-ascii
>>> characters in filenames. the standards does not define if an
>>> url-encoded filename should be encoded using utf-8 or another
>>> encoding. i've written an alternative method of URLUtil.URLDecode()
>>> that first tries to determine if the string can be an utf-8 string,
>>> and then use this encoding instead of the default encoding . that
>>> does not work for 100% of all strings, since sometimes a string can
>>> look like an utf-8, but this is occurs extremely rarely, as you need
>>> to have a very specific sequence of special characters.
>>
>>
>> Isn't there something similar in Tomcat already? Are you using another
>> web container? You are talking about the HTTP request header, right?
>>
>
> no, not exactly the http request header, but directly the first line of
> the request, that is the request itself : the GET /url ... line . i'm
> using tomcat, but this is not linked to the webserver, but directly the
> browser. the problem occurs especially with characters in unicode range
> 00A0 - 00FF, which are alternatively encoded in utf-8 or iso-8859-15.
> you can easily check this by comparing the behaviour of mozilla-firefox
> and ie on windows for example - just make a request on www.google.com/€
> (euro sign), you'll see it is sometimes transformed in %80 (iso) and
> sometime %E2%82%AC (utf-8). note that no response header can force the
> encoding used by the browser in the url, as opposed to the encoding of
> form data. also no standard clearly defines what the browser should
> send, but in general utf-8 is mainly used.
I still thought there is something like this in Tomcat to guess the
encoding, I might be wrong though...
>>> 5/ i've seen that you added some listeners in the MacroImpl class,
>>> but the one i need is a MoveListener, that is called after the copy
>>> and before the move, in order to update the references to the file.
>>> i'm not usign bindings yet.
>>
>>
>> Daniel has done most of the work on it, but I suppose it would be no
>> problem to add a new insertion point.
>
>
> in fact i realised that the listeners that are implemented in 2.0 cannot
> fulfill my needs, as they have to be passed to the method call. the kind
> of listeners i need should be registered and then used each time a move
> is done - i've seen that 2.1 introduced an EventDispatcher class that
> should more match my needs - and there is a move event - so i should be
> fine with that.
Cool.
>>
>>> i'm working on the slide 2 release branch, if you are interested i
>>> can either send you the updated code or merge before with the head.
>>
>>
>> As already said, the HEAD would be best.
>
>
> ok, i'm doing the merge now, and i'll put a bugzilla entry for 1/ and 4/
> as soon as the merge is ok.
Looking forward to the patches :) I presently have little to for Slide,
but will take care of them ASAP once they are in the bugzilla.
Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org
Re: slide integration
Posted by Thomas Draier <th...@codeva.net>.
hi oliver,
Le 6 sept. 04, à 17:08, Oliver Zeigermann a écrit :
> Hi Thomas!
>
> It would be great if you contributed your changes! It would be best to
> create a bugzilla entry and add patches done to the current Slide CVS
> HEAD to it. I will take care of the patches then...
>
> More comment follow inline...
>
> Thomas Draier wrote:
>
>> hi guys,
>> i've been integrating slide in an application for quite a long time -
>> the integration was successful and we now use slide 1.0.16 in our
>> portal (that you can download at www.jahia.org) - thanks for
>> providing such a nice webdav framework ! - but i had to make some
>> changes to make it work in our context. now i'd like to use the
>> latest version of slide, and share the fixes i've made, since now
>> i've got something which is pretty stable. most of the fixes i've
>> made before on 1.0.16 were also done by your team, but some points
>> are still opens - here's a short resume of the changes i've done so
>> far, that i still need in order to make it play :
>> 1/ i've got an issue with the namespace initialization in the
>> Namespace class, loadBaseData method - there are many transactional
>> stuff that i do not completely understand, and this doesn't work with
>> a non transactional database, since some transactions need to be
>> rollbacked when the root object is already created. i just kept the
>> first begin and last commit, and removed the try catch around the
>> root creation - that works fine, data are well loaded the first time
>> you start your app.
>
> Is this still valid in the current Slide version?
yes, i didn't see any change in the latest cvs version, still the same
procedure as in 1.0.16
>
>> 2/ in AbstractSimpleService, there's a direct reference to the
>> current Xid. that looks very strange to me, as i assume that
>> different transactions can happens at the same time. in fact i had a
>> very strange behaviour with multiple clients, or with complex clients
>> that have multiple threads, that disappeared when i replaced the
>> reference to the Xid with a ThreadLocal object. i'm not using a
>> transactional database so i'm not completely sure this works in that
>> case, but i do not see any reason why that could be a problem.
>
> It has been deprecated as it allows for a single context only. That
> has been indicated by the Javadocs...
>
correct, i was looking at an older version (2.0-release). i probably
need to rewrite my store based on JDBCStore.
>> 3/ in ContentImpl, retrieve() method, a revision is created if no
>> revision was there before. a comment says that it should'nt be done
>> here, and the point is that if you have read access but not write
>> access you cannot retrieve the object .. everything is working fine
>> when you just remove the creation. any idea why this was done here ?
>
> I have no idea either. Shouldn't an ObjectNotFoundException be thrown
> instead?
>
i do not remember when it is possible to have an object with no
revisions, i think that can happens on directories - in fact that was
happening in 1.0.16, revision descriptors were not always present in
the store, but i'm not sure that still happen - i'll check if it is
still the case.
>> 4/ i've got an issue with some navigators, when using non-ascii
>> characters in filenames. the standards does not define if an
>> url-encoded filename should be encoded using utf-8 or another
>> encoding. i've written an alternative method of URLUtil.URLDecode()
>> that first tries to determine if the string can be an utf-8 string,
>> and then use this encoding instead of the default encoding . that
>> does not work for 100% of all strings, since sometimes a string can
>> look like an utf-8, but this is occurs extremely rarely, as you need
>> to have a very specific sequence of special characters.
>
> Isn't there something similar in Tomcat already? Are you using another
> web container? You are talking about the HTTP request header, right?
>
no, not exactly the http request header, but directly the first line of
the request, that is the request itself : the GET /url ... line . i'm
using tomcat, but this is not linked to the webserver, but directly the
browser. the problem occurs especially with characters in unicode range
00A0 - 00FF, which are alternatively encoded in utf-8 or iso-8859-15.
you can easily check this by comparing the behaviour of mozilla-firefox
and ie on windows for example - just make a request on www.google.com/€
(euro sign), you'll see it is sometimes transformed in %80 (iso) and
sometime %E2%82%AC (utf-8). note that no response header can force the
encoding used by the browser in the url, as opposed to the encoding of
form data. also no standard clearly defines what the browser should
send, but in general utf-8 is mainly used.
>> 5/ i've seen that you added some listeners in the MacroImpl class,
>> but the one i need is a MoveListener, that is called after the copy
>> and before the move, in order to update the references to the file.
>> i'm not usign bindings yet.
>
> Daniel has done most of the work on it, but I suppose it would be no
> problem to add a new insertion point.
in fact i realised that the listeners that are implemented in 2.0
cannot fulfill my needs, as they have to be passed to the method call.
the kind of listeners i need should be registered and then used each
time a move is done - i've seen that 2.1 introduced an EventDispatcher
class that should more match my needs - and there is a move event - so
i should be fine with that.
>
>> i'm working on the slide 2 release branch, if you are interested i
>> can either send you the updated code or merge before with the head.
>
> As already said, the HEAD would be best.
ok, i'm doing the merge now, and i'll put a bugzilla entry for 1/ and
4/ as soon as the merge is ok.
thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org
Re: slide integration
Posted by Oliver Zeigermann <ol...@zeigermann.de>.
Hi Thomas!
It would be great if you contributed your changes! It would be best to
create a bugzilla entry and add patches done to the current Slide CVS
HEAD to it. I will take care of the patches then...
More comment follow inline...
Thomas Draier wrote:
> hi guys,
>
> i've been integrating slide in an application for quite a long time -
> the integration was successful and we now use slide 1.0.16 in our portal
> (that you can download at www.jahia.org) - thanks for providing such a
> nice webdav framework ! - but i had to make some changes to make it work
> in our context. now i'd like to use the latest version of slide, and
> share the fixes i've made, since now i've got something which is pretty
> stable. most of the fixes i've made before on 1.0.16 were also done by
> your team, but some points are still opens - here's a short resume of
> the changes i've done so far, that i still need in order to make it play :
>
> 1/ i've got an issue with the namespace initialization in the Namespace
> class, loadBaseData method - there are many transactional stuff that i
> do not completely understand, and this doesn't work with a non
> transactional database, since some transactions need to be rollbacked
> when the root object is already created. i just kept the first begin and
> last commit, and removed the try catch around the root creation - that
> works fine, data are well loaded the first time you start your app.
Is this still valid in the current Slide version?
> 2/ in AbstractSimpleService, there's a direct reference to the current
> Xid. that looks very strange to me, as i assume that different
> transactions can happens at the same time. in fact i had a very strange
> behaviour with multiple clients, or with complex clients that have
> multiple threads, that disappeared when i replaced the reference to the
> Xid with a ThreadLocal object. i'm not using a transactional database so
> i'm not completely sure this works in that case, but i do not see any
> reason why that could be a problem.
It has been deprecated as it allows for a single context only. That has
been indicated by the Javadocs...
> 3/ in ContentImpl, retrieve() method, a revision is created if no
> revision was there before. a comment says that it should'nt be done
> here, and the point is that if you have read access but not write access
> you cannot retrieve the object .. everything is working fine when you
> just remove the creation. any idea why this was done here ?
I have no idea either. Shouldn't an ObjectNotFoundException be thrown
instead?
> 4/ i've got an issue with some navigators, when using non-ascii
> characters in filenames. the standards does not define if an url-encoded
> filename should be encoded using utf-8 or another encoding. i've written
> an alternative method of URLUtil.URLDecode() that first tries to
> determine if the string can be an utf-8 string, and then use this
> encoding instead of the default encoding . that does not work for 100%
> of all strings, since sometimes a string can look like an utf-8, but
> this is occurs extremely rarely, as you need to have a very specific
> sequence of special characters.
Isn't there something similar in Tomcat already? Are you using another
web container? You are talking about the HTTP request header, right?
> 5/ i've seen that you added some listeners in the MacroImpl class, but
> the one i need is a MoveListener, that is called after the copy and
> before the move, in order to update the references to the file. i'm not
> usign bindings yet.
Daniel has done most of the work on it, but I suppose it would be no
problem to add a new insertion point.
> i'm working on the slide 2 release branch, if you are interested i can
> either send you the updated code or merge before with the head.
As already said, the HEAD would be best.
Cheers,
Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org