dom-to-xml-225x225

XML Creation with DOM in Java

Awhile back I wrote a blog about parsing XML documents with the DOM facilities provided by Java. As it turns out you can use the same API to programmatically create an XML document. So I’ve dusted off the old XmlDomDocument class and added some methods that make it easy to build an XML document from…

condition-variable-225x225

Condition Variable Class in C++

Condition variables are used in conjunction with mutexes by one thread to signal other threads that it has changed the state of a given variable. Synchronizing threads with the standard Pthreads functions is straightforward, but wrapping these calls in C++ classes makes them all the easier to use. In my last article I showed you…

mutex-lock-225x225

Mutex Class in C++

When multiple threads want to synchronize access to a shared resource they use mutexes and condition variables. A mutex enables a thread to block other threads from accessing a shared resource, while a condition variable is used by a thread to make itself wait for the state of a resource to be changed by other…

java-server-225x225

Mimic CGI Behavior in RESTful Java Web Services

In my article RESTful Java Web Services with NetBeans, Jersey and Tomcat I showed you how to create a simple Java web service to handle HTTP GET and POST requests. The service handlers in this example didn’t do much. The GET handler just returned a single string and the POST handler echoed back any text…

multithreaded-225x225

Multithreaded Work Queue Based Server in C++

Creating a multithreaded TCP/IP protocol based server requires the capabilities to handle network communication, multithreading and transferring data between threads. I have described how to build C++ components to handle this functionality in previous blogs. This time I’ll show you how to combine these components to create a simple multithreaded server.   Background Articles The…