Java classes and jars that you may find useful

This isn't where all my work goes. Too much of it is done for clients, but occasionally I'll need to make a general purpose library that I'll develop in my own time that will fit needs in this project and future projects.

dtd.jar

View the Javadoc
Summary: A non-validating DTD parser that presents the XML 1.0 DTD as a kind of tree structure. This is intended for situations where you don't know the XML or DTD at compile time, but will need this information at runtime.

How did I use this: This was needed for a QA testing harness for an application server-based app. We had a minor testing process in place that would take hand-coded XML files and pass them into the system, then return the results to stdout. This was a process that required the QA personnel to know as much about the system as the developer, as well as install the application server and app on each machine, or go to one machine for testing.

By developing a web-based (servlet) front-end, we could make the system more accessible to the QA tester by presenting forms based on the DTD data. The submission of the XML files could now take place on the server itself, and the results could be returned to the servlet for interpretation and storage of their results.

 
MyJStyle.zip

I don't know where to get the source software any longer
Summary: We needed batch formatting of Java source files, and we wanted them in a modified Berkeley C-style. This was a quick hack on JStyle to make the needed changes.

Usage documentation is included in the ZIP file. The only real problem I've seen with it is a tendency to revert to the old Java/Perl type indenting style when it comes across "finally" clauses.

 
Weblogic and EJB in web apps Using Weblogic and Enterprise Java Beans in a web application. This describes a system developed using EJBs, JSP, Weblogic, XSLT, XML, Servlets, etc.
 
pollserve.jar

View the Javadoc
Summary: An attempt at a high-performance, low-impact muti-threaded poll()-style Java server implementation. Intended to be used with systems that don't handle huge numbers of threads, so connected sockets are iterated across instead of given individual threads which block. There were a number of problems with the design which could all have been overcome at great cost in code and overhead. It's easier to go along with Java's implicit design goal of one thread per connection, so this was modified to form the communications core of a distributed mud.

How did I use this: This is intended to be used as the core for a peer-to-peer program code and trust distribution network. This is a work in progress (until I get bored of it, or re-implement it in C or the like).

 
dmud.jar

View the Javadoc
Summary: A reimplementation of the multi-threaded poll()-style Java server using traditional one-thread-per-connection communications. The advantages of this design include the blocking of the connected client threads (reducing CPU utilization). A big disadvantage occurs in context switching when more than a few dozen threads are running at once.

This will form the communications core of a prototype distributed MUD-like server in Java. A specialized client will be required to access the system (in order to pass and receive event messages).

 
 
EJBs, JSPs, and Tag Libraries in a CORBA-based Distributed Application Using CORBA with EJBs in Weblogic application server, as well a brief description of a View-to-Model EJB design pattern. User interfaces are implemented using JSPs as well as taglibs for specialized output. Discusses the advantages and disadvantages of this kind of layered application.
 
Ant task to check if a file or directory exists This is an implementation of a simple Ant task to determine if a file or directory exists and set a property indicating such. To compile the file, make sure the ant.jar file is in your classpath. To use the file, add the fileExists.jar or class to the Ant classpath (such as in the optional directory). To use the task, seek guidance from this trivial example:
<project name="exists" default="checkit" basedir=".">
  <taskdef name="FileExists" classname="FileExists" classpath="fileExists.jar"/>

  <target name="verify_dir">
    <FileExists property="file_found" filename="foo"/>
  </target>

  <target name="checkit" depends="verify_dir" if="file_found">
    <echo message="It worked!"/>
  </target>
</project>

As a co-worker said, "There must be a dozen implementations of this out there." I spent more time trying to find one than it took to write it.