EMF Resources transactional safe? [message #901484] |
Mon, 13 August 2012 01:08  |
Eclipse User |
|
|
|
Hi there,
is saving EMF Models in Resources safe from an transactional viewpoint,
e.g. in high-availability environments?
I.e. will a file (either XML or binary) get corrupted and not readable
anymore if saving a model is interrupted right in between the save process?
Cheers,
Hauke
|
|
|
Re: EMF Resources transactional safe? [message #901488 is a reply to message #901484] |
Mon, 13 August 2012 02:06  |
Eclipse User |
|
|
|
Hauke,
Comments below.
On 13/08/2012 7:08 AM, Hauke Fuhrmann wrote:
> Hi there,
>
> is saving EMF Models in Resources safe from an transactional
> viewpoint, e.g. in high-availability environments?
A resource is saved by opening a stream for the URI, writing the
contents, and then closing the stream. I expect that while a stream is
open, nothing else can open a stream for that same URI and do an update.
>
> I.e. will a file (either XML or binary) get corrupted and not readable
> anymore if saving a model is interrupted right in between the save
> process?
It's possible for a VM to crash, so imagine it's always possible for a
stream to be incomplete at that point.
>
> Cheers,
> Hauke
|
|
|
Powered by
FUDForum. Page generated in 0.05977 seconds