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 Michael Smith <ms...@speedlegal.com> on 2001/10/17 04:01:28 UTC

transactions in getmethod

Hi all,

I was looking for some other problem today, and noticed something rather
strange - GetMethod.java doesn't override
methodNeedsTransactionSupport(), so the default of true is used. So all
those harmless GETs are using transactions. 

Is there any reason for this, or is it just an oversight?

Michael

Re: transactions in getmethod

Posted by Michael Smith <ms...@speedlegal.com>.
> Anyway, I'm running it locally with
> WebdavMethod.methodNeedsTransactionSupport() returning false, and all
> seems well so far. I'll commit it, and revert it if someone explains why
> it is like it is.

Or alternatively, I'll check my mail, write a response, check that it
still compiles, then do a cvs commit and find that you've fixed it in
the 2 or 3 minutes that took. Thanks, Remy :-)

Michael

Re: transactions in getmethod

Posted by Michael Smith <ms...@speedlegal.com>.
Remy Maucherat wrote:
> 
> > Hi all,
> >
> > I was looking for some other problem today, and noticed something rather
> > strange - GetMethod.java doesn't override
> > methodNeedsTransactionSupport(), so the default of true is used. So all
> > those harmless GETs are using transactions.
> >
> > Is there any reason for this, or is it just an oversight?
> 
> It looks like an oversight.
> All the methods which need to return true explicitely do, but methods which
> would be ok with a false don't override methodNeedsTransactionSupport(). So
> I would say WebdavMethod.methodNeedsTransactionSupport() should return false
> (since it's the default).
> 

I agree. Comments in WebdavMethod disagree, though. In turn, I disagree
with the comment. It claims that we need transactions in places where we
shouldn't, such as PropFindMethod, because they (or PropFindMethod, at
least) creates a RevisionDescriptors 'on the fly'. Firstly, it creates a
RevisionDescriptor, and secondly, it never stores that revision
descriptor anywhere, so it should just get appropriately garbage
collected, as far as I can tell, so I don't see why this is a problem.

Anyway, I'm running it locally with
WebdavMethod.methodNeedsTransactionSupport() returning false, and all
seems well so far. I'll commit it, and revert it if someone explains why
it is like it is.

Michael

Re: transactions in getmethod

Posted by Remy Maucherat <rm...@home.com>.
> Hi all,
>
> I was looking for some other problem today, and noticed something rather
> strange - GetMethod.java doesn't override
> methodNeedsTransactionSupport(), so the default of true is used. So all
> those harmless GETs are using transactions.
>
> Is there any reason for this, or is it just an oversight?

It looks like an oversight.
All the methods which need to return true explicitely do, but methods which
would be ok with a false don't override methodNeedsTransactionSupport(). So
I would say WebdavMethod.methodNeedsTransactionSupport() should return false
(since it's the default).

Remy