jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Speck" <marcsp...@gmail.com>
Subject Re: Extending SimpleWebDavServlet
Date Mon, 29 Sep 2008 07:50:21 GMT
Hi Felix

> I am neither an export on any Memory Model issue, but I always thought
> that the construct
>     fieldX = new SomeType(zzz);
> would be ok, because fieldX would only be set after the SomeType
> instance has properly been setup and ready for use.

I would have thought the same if I had not learned it differently... again,
there is some black magic in the Java air ;)
I do not understand this mechanism in the memory model but I would be
thankful if someone could provide an explanation. The only thing I did is a
pattern matching between the lazy initialization in SimpleWebDavServlet and
the two books mentioned above. Both state that this implementation is not
thread safe.

> Have you encountered a concrete problem with this or is a pure academic
> discussion ?

This is pure academic, but I crunch multi-threading bugs rather on this
level than tracking bugs that just happen "now and then".


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message