Yesterday, one of the JAXB users sent me an e-mail, asking for how to solve the problem he faced.
The scenario was like this; you have a client and a server, and you want a client to send an XML document to a server (through a good ol' TCP socket), then a server sends back an XML document. A very simple use case that should just work.
The problem he had is that unless the client sends the "EOS" (end of stream) signal to the server, the server keeps blocked. When he modified his code to send EOS by partial-closing the TCP socket (Socket.shutdownOutput), the server somehow won't be able to send back the response saying the socket is closed.
P. Kroha. Database and Expert Systems Applications, volume 1873 of Lecture Notes in Computer Science, page 675-684. Springer Berlin / Heidelberg, (2000)
B. Lavoie, O. Rambow, and E. Reiter. Proceedings of the Fifth Conference on Applied Natural Language Processing (ANLP-97), page 253--256. Morristown, NJ, USA, Association for Computational Linguistics, (1997)