[Mulgara-general] Exception on startup
Life is hard, and then you die
ronald at innovation.ch
Fri Apr 25 09:55:55 UTC 2008
On Thu, Apr 24, 2008 at 02:20:26PM -0500, Paul Gearon wrote:
>
> On Apr 24, 2008, at 11:34 AM, Alex Hall wrote:
>
> > Andrae Muys wrote:
> >>> What exactly do you mean by a clean shutdown? I thought that the
> >>> philosophy on shutdowns was that killing the Java process (i.e.
> >>> hitting
> >>> Ctrl-C) is considered a clean shutdown, as care is taken during
> >>> transactions to ensure that the system can always be restored to a
> >>> consistent state. Is this not the case?
> >>
> >> It is the case. However if mulgara is given the opportunity it will
> >> explicitly release any operating-system resources, including any
> >> locks or open files.
> >
> > How does this happen? Even if one invokes the shutdown hook on the
> > server (using the -x option to the Mulgara jar), all this does is call
> > System.exit(0). As far as I can tell, there are no shutdown hooks
> > registered with the Java runtime, so no cleanup will occur.
>
> Actually, it has to do with transactions that had 'commit' called on
> them, but the new roots to all the trees have not yet made it into the
> meta-files. In this case we have enough information to allow the
> commit to complete, so that's what we try to do. The exceptions listed
> earlier in this thread appear to be describing just this situation.
[snip]
I think the point Alex is trying to make is that mulgara never shuts
down cleanly, because A) there's no JVM shutdown hook registered
(Runtime.addShutdownHook()), and B) the EmbeddedMulgaraServer just
does a System.exit() without calling stop() on the server. I've
noticed this too: now that we've switched to RMI, none of our
resolvers ever get closed (before our servlet-wrapper called
SesionFactory.close() to clean up).
I.e. mulgara always "crashes".
Cheers,
Ronald
More information about the Mulgara-general
mailing list