Skip to main content

JRecordBind v2.3: A Closer Look

Posted by editor on September 23, 2009 at 9:15 AM PDT

A few days ago, the JRecordBind project released Version 2.3 (see the Java Today entry below). JRecordBind, which is led by Federico Fissore, is a member of the Java Tools Community. The project is licensed under the GNU Lesser General Public License (LGPL). JRecordBind Version 2.3 adds support for xs:choice.

JRecordBind provides two services that are applicable to business applications, in particular to situations where an interface between two different systems is required. The library provides two simple capabilities:

  • map a fixed or variable length text file to bean instances, ready to be chewed by an import procedure (Unmarshaller)
  • export record beans into a fixed or variable length text file (Marshaller)

So, you can see that JRecordBind is useful in any situation where data must be transferred between a bean-based application and an application that can read and write text files. The latter application might be, for example, a legacy operational business platform, that can write out or read in data records in the form of fixed field text data dumps, or write data into formatted text reports.

About 8 years ago I was very much involved in developing software for document archival and retrieval. The company I worked for sold software to insurance companies and other businesses, along with goverment agencies, all of which needed to maintain historical records for periods of years to even decades. The documents were ingested into the archive, key elements were detected and catalogued, and the users could search for and retrieve documents based on the catalogued data elements. One of the most common types of document was a text report, with fixed fields and a fixed page or text record format. Clearly, JRecordBind is well-tailored for addressing this kind of task.

The JRecordBind home page refers to JRecordBind as "a tiny and super fast library." I downloaded Version 2.3 and took a look. The download unpacks into jrecordbind-2.3.jar and two subdirectories: apidocs and lib. While the byte size of a jar isn't the perfect way to measure size, for the record, jrecordbind-2.3.jar comes in at just over 36 KBytes.

The lib directory contains XML-schema API component jars, related to, for example, JAXB, RELAX NG, XSOM (the GlassFish/Metro XML Schema Object Model), and StAX (Streaming API for XML). Just for comparison, the combined size of the lib jars is 4.5 MBytes (with the JAXB jars occupying 4.1 MBytes of the total).

Looking at it this way, JRecordBind is indeed a small library. It performs its own specific task, applying some powerful standardized APIs to do some of the lower-level heavy lifting.

The apidocs subdirectory contains javadocs files. The JRecordBind home page includes a lot of good discussion about the library's features, and points you to additional xsd examples and class examples that demonstrate the library's features.

Congratulations to Federico and the JRecordBind team on releasing stable Version 2.3!

In Java Today,'s JRecordBind project has announced the release of Version 2.3. JRecordBind is a tiny and super fast library that aims to: 1) map a fixed or variable length text file to bean instances, ready to be chewed by an import procedure (Unmarshaller); and 2) export record beans into a fixed or variable length text file (Marshaller). Version 2.3, which is now available for download, adds xs:choice support:

Since version 2.3, you can specify the jrb:setter attribute at the xs:choice level. JAXB allows you to have only one method in classes defined as "choice" in the xsd, but that's defined outsiBhavani Shankarde of the xsd, in a file called bindings.xjb (using the "choiceContentProperty" option). JRecordBind knows nothing about that file, so you need to duplicate that information into the xsd, in a way JRecordBind can understand. So, for instance, if you have the elements One and Two inside an xs:choice element ...

peligri talks about development activity as the team moves Towards GlassFish v3 fcs - FindBugs Push...:

As we get closer to
GlassFish v3 FCS,
the development is moving into cleanup stage - and with high volume, see the DEV alias. Part of the cleanup is the usual bug fixing, part is an Increased Testing via FishCAT and part is general code quality cleanup via tools like

Francois Orsini talks about some Videos to get acquainted with Apache Derby and Java DB:

Kristian Wagaan and Richard Hillegas, both Apache Derby committers who also work on Java DB, recently gave some great presentations about Apache Derby and Java DB.

Kristian Wagaan presented at the 2009 OpenSQLCamp, in conjunction with FrOSCon 2009 in Europe.

The presentation (slides) gives a brief overview of Apache Derby, its history and the community around it. Further, it goes into the details of features that have been added in the latest releases and show how they enable powerful ways to use a relational database.

In today's Weblogs, Greg Brown is Announcing Apache Pivot 1.3:

The Pivot development team is happy to announce the release of Apache Pivot 1.3. Apache Pivot is a platform for building rich internet applications in Java. It combines the enhanced productivity and usability features of a modern RIA toolkit with the robustness of the industry-standard Java platform. Pivot is currently undergoing incubation at the Apache Software Foundation. Notable updates in this release include:

  • New FileBrowser component - Pivot now includes out-of-the-box support for navigating the local filesystem. A screen shot is shown below...

Terrence Barr will be Over the Air, London, 9/25 & 9/26:

On Thursday I head up to London for the Over the Air event. I'll do two talks on Saturday on LWUIT and JavaFX Mobile. Check out the draft schedule. Plenty of interesting topics - I attended Over the Air last year and it was a fun, down-to-earth developer event. I'm looking forward to it. Maybe I'll see you there? ...

And Bhavani Shankar announces the New Basic3pcc sample application addition in SailFin:

The newly introduced "Basic3pcc" sample demonstrates a simple Third Party Call Control (3pcc) application in SailFin. Download latest SailFin to get this sample. This sample includes 2 applications as shown in the figure below ...

In the Forums, abith74 is Unable to sort out issues of JNDI JDBC Connectivity: "I want to create a stand-alone JDBC application with Java SE using Swing technologies and JNDI technology. The purpose of using JNDI technology is to avoid change of Java Source Code every time I move the database to different location. I use..."

renfrow asks about Using UndoManager: "I wanted to do 'undo/redo' for a small utility I'm writing, and using the demo code from the JDK 1.6.0_02 demo code, I was able to get it implemented easily enough. However, there's a small, 'glitch', shall we say: You get undo/redo points..."

And alberto101 has a problem involving WebService deployment in Glassfish cluster: cannot find wsdl file: "I have an EJB exposing business logic as a webService. I have deployed the webSercice successfully in Glassfish (cluster environment and local instance). The cluster is preceded by Apache acting as a proxy ..."

Our current Spotlight is the new Janice Heiss interview with "Java Champion Kirk Pepperdine on Performance Tuning and Cloud Computing": " (JSC): In your talks, you always warn developers that they must carefully evaluate any generic advice that you provide to see if it applies to a particular situation. Why is this so important? Pepperdine: While I do give generic advice, I carefully explain that people have to evaluate it to see if it will work. I am giving advice in a vacuum, so what may work for many people most of the time may be very detrimental in other contexts. I don't know in advance what specific problem someone is working on..."

The current Poll, which was submitted by Geertjan Wielenga, asks "What's your opinion of 'the Cloud'?" The poll will run through Thursday.

Our Feature Articles include Jeff Lowery's A Finite State Machine Supporting Concurrent States, which demonstrates how Java enums and EnumSets can be used as a basis to define and validate application states and state transitions. We're also featuring Jeff Friesen's article Introducing Custom Paints to JavaFX, which shows how you can leverage undocumented JavaFX capabilities to support custom paints in JavaFX Version 1.2.

The latest Java Mobility Podcast is Java Mobile Podcast 87: Tranqueira project used LWUIT: "Eloi Junior from Brazil has just opened the Tranqueira project and shares his experience in using LWUIT."

Current and upcoming Java Events:

Registered users can submit event listings for the Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.

Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of it will be archived along with other past issues in the Archive.

-- Kevin Farnham

O'Reilly Media