Generics, the enhanced for loop, meta-data and other related features are getting all of the press for J2SE 1.5, but with Tiger you are also getting a new concurrency package.
Brian Goetz previews what's coming in Today's Featured Articles . In Brian's A First Look at JSR 166: Concurrency Utilities , he provides background for the JSR and an overview of the improvements you will find. Doug Lea influenced the spec in two important ways. First. his
util.concurrent package formed the base for the spec and second he involved the public in the process with "a public mailing list, concurrency-interest, to which frequent API snapshots were posted and from which opinions were solicited. This allowed knowledgeable outsiders to comment and make suggestions -- many of which were very useful -- without bogging down the process, and it also allowed the expert group to consider public input far earlier in the process, before decisions were set in stone." This has led to the changes in the JCP that you will soon see in version 2.6.
Goetz explains that "The goal of JSR 166 is, immodestly, to do for concurrency what the Java Collections Framework did for data structures." In an analagous way, the new concurrency utilities supplement the "low-level facilities for concurrency -- synchronized, volatile, wait(), notify(), and notifyAll() -- [with] higher-level constructs, such as concurrent collections, thread pools, semaphores, and explicit lock and condition objects." Goetz predicts that "Using the concurrency utilities will, in most cases, make your programs clearer, shorter, faster, easier to write, easier to read, more reliable, and more scalable. This is possible because most concurrent applications use the same common building blocks -- concurrent collections, thread pools, semaphores, and the like. "
Weblogs , Manoel Lemos writes More about JAVA and XML on the Brazilian National Health Card Project. He links to a paper which details the Java and XML implementation. "The Brazilian National Health Card Project is a huge project with the objective of building a huge repository of clinical data for the Brazilian Health Care System. This project was constructed with the support of two fundamental technologies: JAVA and XML."
Malcolm Davis suggests that you Adapt the Java style for your own . He recalls coming from C/C++ to Java and initially fighting Sun's Code Conventions for Java. It required reformatting existing Java code and making a mental jump between code styled using different conventions. Malcolm advocates a single coding standard for a team and credits Bruce Eckel with encouraging him to adopt Sun's standard. Already in the talkback, a reader counters that these standards "are derived from an antiquated and BAD way of coding." Your thoughts?
Bob Lee provides a a few tricks to creating performant and maintainable tests for DAO design in his blog entry Design and Test JDBC Code . Rather than use mock objects, he prefers "to test against hsqldb, a lightweight 100% Java database engine that can run completely in memory. I can set up and destroy the entire database within the scope of a single test. Keeping database agnostic (so I can test against hsqldb and still use Oracle in production) can be trying at times but is well worth the effort. My tests set up a minimal database (i.e. only what's needed by the test) and execute commands against it".
Also in Java Today , enjoy three sample recipes from Bruce Perry's Cooking with Java Servlets & JSP. These tips demonstrate Embedding an Applet in a JSP Using the HTML Converter, Configuring a DataSource in Tomcat, and Using the XML Transform Tags.
John Zukowski details all of your options in Beyond the basics of JOptionPane . What makes the JOptionPane tricky to use is the same class is used to specify Message Dialogs, Confirm Dialogs, Input Dialogs, and Option Dialogs. You determine which type is created with one of seven constructors or with factory methods. There are more than two dozen constants defined in the class used to specify some of the options (such as OK_CANCEL_OPTION) and return values (such as CANCEL_OPTION). John's walk through the JavaDocs should make everything clear.
In today's java.net News Headlines
- JBoss Talks About Its Plans with Capital
- JSR 154 -Java Servlet 2.4 Specification Draft Maintenance Release
- jTDS JDBC Driver 0.7
- Very Quick Wiki 2.6.4
- Xerox Parc Draper Prize Recipients Chosen
- Microsoft Concedes in Japan
Registered users can submit news items for the
href="http://today.java.net/today/news/">java.net News Page using
our news submission
form. All submissions go through an editorial review by news director
Steve Mallet before being posted to the site. You can also subscribe to
News RSS feed.
Current and upcoming
- March 4 Workshop Java Web Development
- March 5-7 Silicon Valley Software Symposium
- March 12-14 San Diego Software Symposium
- March 15-19 Software Developer Conference West
- March 19-21 Gateway Java Software Symposium
- March 22-26 Game Developers Conference, 2004
- March 23-25 7th Jini Community Meeting
Registered users can submit event listings for the
href="http://www.java.net/events">java.net Events Page using our
href="http://today.java.net/cs/user/create/e"> 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
Today RSS feed. All java.net members can subscribe to the email
updates for the site at the href="https://java-net.dev.java.net/servlets/ProjectMailingListList">
java-net Mailing Lists page. You must be logged in to subscribe
to the javanet_Daily and javanet_Weekly lists. Also, once this page
is no longer featured as the front page of
java.net it will be archived along with other past issues in the href="http://today.java.net/today/archive/">java.net Archive.