On Mon, 25 Sep 2006 09:57:20 +0200, Julien Vermillard wrote: > Le lundi 25 septembre 2006 à 09:32 +0200, Niklas Therning a écrit : >> Does anyone now if there is something out there which acts like a thin >> layer on top of java.util.concurrent and can use either Java5's classes >> or backport-util-concurrent? I'm thinking of something similar to SLF4J. >> >> /Niklas > > Never heard of something like that but it's sounding pretty usefull for > us.
It sounds useful not only for MINA but unfortunatley it's next to impossible to do. I know that both Dawid and I looked into a thin shim layer that would use either backport or native util.concurrent but unfortunately it seems impossible to do since many classes in the JDK expose direct class names and inner interfaces that would lead to compilation and/or runtime cast errors in client code. The other issue is that some native classes simply cannot be emulated properly on JDK 1.4, e.g. the lack of System.nanoTime with proper resolution or some of the atomic references that have to be simulated via traditional volatile & synchronized. Don't you think someone would have done it by now if it were even remotely possible? Do you also realize that JDK 1.4 until recently had very bad synchronization bugs itself? -h
