ONJava.com    
 Published on ONJava.com (http://www.onjava.com/)
 See this if you're having trouble printing code examples


Connect the Dots

by Chris Adamson
ONJava Newsletter for 10/14/2004

Greetings...

Sometimes the complexity of a system hides from you. I recall a project where we just drew lines between the various parts of our system--spread out across the country on hundreds of business LANs--and it was so simple to think that since we'd accounted for all the pieces, we knew what to do. What'd we had done instead was to actually fool ourselves terribly. After all, what did those lines mean? In varying situations, they could be in-memory method calls, RMI calls across the network, files being transferred across an FTP connection, and more.

All of which goes to say that getting the pieces in place is one thing, while coordinating them can be quite another!

Benoit Aumars considers a hypothetical coordination challenge in XML Messaging Using JBoss, a networked producer/consumer scenario requiring scheduled pulls from two different databases that are then communicated to the rest of the system with Java Messaging Service (JMS). He brings open source tools to the task--JBoss, Quartz, Castor, and Hibernate--and shows how Java Management Extension (JMX) MBeans provided by these tools make coordinating them practical.

Scheduling tasks to occur at specific times or on specific intervals is another crucial element of many enterprise systems. J2SE has had a straightforward Timer since version 1.3, but it's taken until J2EE 1.4 to get an enterprise equivalent, one that offers transaction support and survives crashes. Debu Panda's Using Timers in J2EE Applications shows you how to get started with J2EE timer services and offers best practices for getting the most from them.

In a feature article from webservices.xml.com, Marc Hedlund offers an introduction to The New Bloglines Web Services. By offering a web services API, he writes, Bloglines makes it "very easy for developers to use RSS and Atom content for many purposes, and the services will also ease the traffic pileup that aggregators are beginning to cause for many large RSS/Atom publishers." He also shows off the power of the API by developing a Swing feed reader with just 150 lines of Groovy code.

To subscribe to the ONJava.com newsletter (or any O'Reilly Network newsletters), visit https://epoch.oreilly.com/account/default.orm and select the newsletters you wish to receive in your user profile (you'll need to log in with your existing O'Reilly Network account -- if you don't yet have an account, you'll need to create one).

To change your newsletter subscription options, please visit https://epoch.oreilly.com/account/default.orm and click the"Manage My Newsletters" link. For assistance, send help to

This week's feature article from java.net is Sanjay Dasgupta's From Writing Programs to Creating Compilers, in which "we build a simple compiler that augments Java with tasks (independent blocks of code that execute in parallel), thus creating a new language called AJ that well supports the programming of systems with concurrent activities." He uses a GPL parser generator, VisualLanguageLab, to develop the syntax and ultimately create a Java-based compiler, which can itself compile the AJ code.

Please join us again next week.

Chris Adamson, editor
ONJava.com

Copyright © 2009 O'Reilly Media, Inc.