Hello,
Currently WebdavMethod::methodNeedsTransactionSupport always returns true,
for all methods may modify data in the store and this method controls
whether a transaction is started/committed.
We used isForceStoreEnlistment (in our store implementation) to decide if a
resource (URI) was read-for-update and had to be locked.
/**
* Return true if the store should also be enlisted for a read
operation.
* @param uri uri
* @return true if the store should also be enlisted for a read
operation
*/
protected boolean isForceStoreEnlistment(Uri uri) {
SlideToken token = uri.getToken();
if (token == null)
return false;
return token.isForceStoreEnlistment();
}
Best regards
Juergen
-----Original Message-----
From: Dirk Verbeeck [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 13, 2002 15.32 PM
To: Slide Developers List
Subject: Re: Database connection lost
Just had a look at WebdavMethod::methodNeedsTransactionSupport and it
seems all webdav methods have transactionsupport turned on.
Do you know if a Connection object is thread-safe?
I thought it is not but I can't find any info on it.
Dirk
Jason Harrop wrote:
>
> Hello Dirk
>
> Thanks for looking at my patch and explaining its deficiencies.
>
> > There are other optimalizations (retry is possible on read-only methods
> > outside a transaction)
>
> Currently the read-only methods also occur inside a transaction, correct?
>
> I'm still finding it easy to crash slide using the JDBCDescriptorsStore,
> if one person is doing a write while another is trying to do a read or
> a write.
>
> At the beginning of November, in relation to bug 3935, Remy said:
>
> > Given the description, it really looks to me like a race condition.
> > At this point, I think we should try to sync everything transaction
> related
> > and see what happens.
> > Could you try and add a synchronized keyword to all the methods in
> > AbstractSimpleService and try again ?
> > It probably would be worth trying to sync the transaction manager
methods
> > too.
> >
> > The transaction itself doesn't need to be synced, since there's a 1-1
> > mapping between the transaction object and the thread.
> >
>
> I'm pretty sure our copy of AbstractSimpleService (but not
> SlideTransactionManager) has had the synchronized keyword in all the
> methods since then, but it still crashes.
>
> Which is why i'm keen to use the J2EEDescriptorsStore, if it can be made
> to work with SlideRealm. I guess i also need to see what happens with
> the J2EEDescriptorsStore if the connection is lost..;)
>
> > but these can wait until we know the results of this modification.
>
> i shall do some testing.
>
> thanks
>
> Jason
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>