I guess ignoring the exception is a bad thing, so your plan seems better.
rgds
CB
----- Original Message -----
From: "Dirk Verbeeck" <[EMAIL PROTECTED]>
To: "Slide Developers List" <[EMAIL PROTECTED]>
Sent: Thursday, January 03, 2002 9:17 PM
Subject: Re: [PATCH] J2EEContentStore
> I'll apply change 1.
>
> Not throwing an exception is not a good solution I think. I have found a
> RevisionNotFoundException in ContentImpl:554; the exception is probably
> needed.
> I think the problem is in AbstractStore it should not delist the
> contentStore with a failure. The exception is a logical error not a
> transactional one.
> A program can always catch this RevisionNotFoundException and do a
> rollback of the transaction if needed.
>
> My suggestion would be to change in AbstractStore
> } catch (RevisionAlreadyExistException e) {
> delist(contentStore, false);
> throw e;
> to
> } catch (RevisionAlreadyExistException e) {
> delist(contentStore);
> throw e;
>
> Remarks ?
>
>
> Dirk
>
>
> "Britton, Colin" wrote:
> >
> > Here is a patch for the J2EEContentStore (although also relates to
> > JDBC).
> >
> > Two changes:
> >
> > 1) The SQL used to check if an object is already stored in the slide
> > store currently returns the whole content of a row only to check if the
> > resultset is empty of not and immediately close it. This may result in
> > the return of the contents of a blob column for no real reason. The
> > patch replaces the SELECT * with a SELECT 1 which will have the same
> > effect (i.e. create a resultset row) but without the overhead.
> >
> > 2) The Contentstore looks for the the revision content via the
> > storeRevisionContent method and when nothing is found calls the
> > createRevisionContent method.
> > But what happens is the storeRevisionContent method on the absence of
> > revisioncontent throws a RevisionAlreadyExistException exception, the
> > exception is caught and thrown again. The impelementation in the
> > abstractStore catches the exception and delists the transaction.
> >
> > This lead to the HeuristicRollback further down the line in the
> > transaction commit in the Slidetransaction program
> >
> > The throw e is removed and replaced with a log entry to stop premature
> > termination of the transaction, as an attempt is later made to use it
> > again.
> >
> > rgds
> > CB
> >
>
------------------------------------------------------------------------
> > Name: j2ee_store_patch.txt
> > j2ee_store_patch.txt Type: Plain Text (text/plain)
> > Encoding: base64
> > Description: j2ee_store_patch.txt
> >
>
------------------------------------------------------------------------
> > --
> > 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]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>