Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!weretis.net!feeder4.news.weretis.net!feeder1.news.weretis.net!news.szaf.org!news.gnuher.de!news.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.java.programmer Subject: Code swapping in a network server Date: Sun, 14 Aug 2011 10:03:44 +0200 Lines: 16 Message-ID: <87ty9ke7xb.fsf@mid.deneb.enyo.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ruchba.enyo.de 1313309026 20685 172.17.135.6 (14 Aug 2011 08:03:46 GMT) X-Complaints-To: news@enyo.de Cancel-Lock: sha1:3EuM5z6cHSCVh55kDvdXDsiTbKU= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7103 I'm looking for a very lightweight library which permits replacing the code in a network server without closing the server socket. Basically, I expect it to monitor a JAR file on disk and switch to the new version once it changes. The actual server code does not keep any non-reconstructible state, and existing connection can keep using the old code, so the problem is quite simple. An application would also do it (except that those tend not to be lightweight), but the protocol is not HTTP, it's a customer protocol which runs over TLS. Currently, I use an SSLServerSocket with custom trust managers, which will lead to class loader issues because the container/application server will keep a reference to the trust manager past the intended life-time of the code, but I could switch to a plain ServerSocket and add the TLS to it using SSLEngine. Any suggestions?