Skip to main content

Blog Archive for kohsuke during October 2005

Every once in a while, you just have to go down to the native code to really feel like a real programmer. Those garbage collections and bytecode verifications are all great, but it's just not so fun to live in an environment where you can't even shoot yourself. Not always, but sometimes. That was my feeling for the past 1 hour, so I picked up my com4j project and fixed a bunch of bugs and...
Those of us who run projects on java.net knows how painful the java.net web interface can be sometimes. Simple things like adding a person to your project take multiple mouse clicks, and when pages load slowly (like just now!), it can quickly kill your productivity. Today, I'm going to talk about the java.net tools that solve this problem. The java.net tools is a simple command line tool. If...
Dalma is a workflow engine that lets you write conversational programs quickly. In my last blog about Dalma, I showed a little code snipet that explains the concept, but I wanted to have the real working code. So today, I added a little hangman game as a sample to Dalma. It's a daemon that handles hangman games with multiple users concurrently, via e-mail. The entry point looks like this:...
Different Output Media The most basic notion of the marshalling is to take a JAXB-bound object that has @XmlRootElement, and write it out as a whole XML document. So perhaps you have a class like this: @XmlRootElementclass Point {  @XmlElement  public int x;  @XmlElement  public int y;  Point(...) { ... }} Then you can do: marshaller.marshal( new Point(1,3), System.out...
Many applications of today need to have a part of the program that waits for other entities. For example, a mailing list manager waits for an e-mail to trigger actions. A web application waits for incoming HTTP requests. Sometimes those applications are conversational; they not only just receive messages, but also send out messages. Those programs often maintain some state and change it as the...
Many XML parser APIs accept InputStream or Reader. For example, JAXB unmarshaller has unmarshal(InputStream), StAX has XMLInputFactory.createStreamReader(InputStream), XStream has XStream.fromXML(Reader). So all too often you'd write something like: XMLInputFactory xif = ...;xif.createStreamReader(new FileInputStream("data/foo.xml")); Or maybe: XMLInputFactory xif = ...;xif....