« Return to Thread: DM Rule #3: Workspaces are for corresponding nodes.

Re: DM Rule #3: Workspaces are for corresponding nodes.

by HarveyWaters :: Rate this Message:

Reply to Author | View in Thread

I'm confused are you saying that I shouldn't use versioning at all as its
not guaranteed to work within a transaction ? I thought that the JSR170
states that versioning is included within a transaction ?

On 7/10/07, Miro Walker <miro.walker@...> wrote:

>
> > Is it possible to get a session to write to two workspaces within a
> > transaction, surely this must be possible as versioning occurs within a
> > transaction ?
> Well, in theory, but in practice, versioning does not occur within a
> single transaction. It's possible (and sometimes happens in practice)
> that the workspace is updated but not the version storage, something
> that's pretty awkward to clear up. The problem is that each workspace
> handles its own persistence, with its own database connection or
> whatever. There's no external transaction manager controlling it all,
> so it's possible for the second commit to fail and the first commit is
> not rolled back.
>
> My advice if transactional integrity is critical to your application
> is that you don't use multiple workspaces and you don't use
> versioning. Within a single workspace it should all be pretty safe.
>
> miro
>

 « Return to Thread: DM Rule #3: Workspaces are for corresponding nodes.