Jakarta Commons Online Bookshelf: Validator

TheServerSide.com's coverage of Day One of JavaOne, 2005 gives you perspectives from a number of attendees, who attended the keynote from Sun and a number of other sessions.

TheServerSide.com's coverage of Day One of JavaOne, 2005 gives you perspectives from a number of attendees, who attended the keynote from Sun and a number of other sessions. Some of the highlights of the conference are : Sun's push of open source on a lot of levels in the Java stack, the rebranding of J2SE and J2EE, and the presence of two major technologies: JBI (Java Business Integration) and AJAX, both of whom are represented in lots of ways. Without any further ado:

Morning keynote and announcements

The 10th Java One was introduced by John Gage, proclaiming that 15,000 Java developers were in attendance. Remarking at the changing community, John noted that even Microsoft is doing a handful of sessions on interoperability.

Johnathan Schwartz was introduced, proclaiming that there are 8-10,000 developers in attendance, with 250,000 people watching the keynotes over the Internet. John talked about his opinions on revolutions in the software.

Director from Panasonic was introduced, and told the audience about the new “Blu-ray discs”, which can hold 50 gigs on a single “CD”. In addition, Blu-ray discs have a collaboration facility and they will be using Java for that layer. This means that all the consumer electronics vendors and other players in the blu-ray disc association will need to ship Java with their equipment. A demo was shown of the movie “I, Robot,” which displayed menu-like controls far more advanced than anything on current DVD systems, and all the controls were Java-powered. “We believe that the next huge market for java developers will be the Digital A/V world.”

“We’ve had a bit of a chill in our relationship with IBM,” Schwartz said. What we are announcing today is that IBM has renewed their relationship with Sun over Java. They’ve announced comprehensive support for the entire set of IBM products running on Solaris 10 on Solaris 10 and AMD/Sparc processors. John Mills from IBM was shown on video explaining the relationship. “We’ve been able to extend our licensing arrangement with Sun for another 10 years… truly one of the better and more creative pieces of work done in the last 10 years…. I’m very happy that we continue to be a participant in the JCP, in making contributions to Java, and I look forward to decades of Java being a key part of technology infrastructure to power the world's businesses...”

Sun President Jonathan Schwarts on video cast

“There is one community with whom we have not had a close embrace”, Jonathan introduced about open source. “FOSS”, free and open source software. “The most popular products in the world are free. There is a social utility to free software. “It’s good for business, it brings more participants into the economy and creates more opportunities for software vendors.” He described Sun's current software strategy as “one step forward to open sourcing all of sun’s software assets, first OpenOffice, Sun ONE app servers, ....”

John Loiacono, EVP software group, Sun Microsystems talked next. He started off by describing Java's success worldwide, showing that the number of Java enabled handsets actually exceeds the number of Java enabled PC’s, and, addressing confusion about Java's market penetration slowing down, he put up a slide showing massive growth rates in all sectors of Java usage. He then introduced Java Business Integration, which aims to do for integration development what J2EE did for app development. “This specification will change the way business operates as it relates to Java and integration. “3/4 of the vendors on the JBI expert group committed to delivering products on JBI in the next 12 months.” Sun also re-announced that they are open sourcing the Sun One application server (which was announced on TSS a few weeks ago). Project Glassfish is available under the CDDL license. “We believe it’s the most flexible and appropriate for you to intermingle code, but also allows for full indemnification and patent protection.” He pointed out indemnification as a major benefit of the CDDL.

John also announced that they are making their implementation of JBI – called “Java System ESB” - open source and available to everyone.

Robert Leblanc, general manager, WebSphere software. IBM is back as a platinum sponsor, licensing Java for another eleven years. The plan is that the entire WebSphere platform - WebSphere, Tivoli, DB2, et al - will be ported on to Solaris running SPARC or AMD.

Tigers, Mustangs, and Dolphins, oh my!

This technical session went over the features being worked on for Mustang, which have already been announced. It concluded with a brief look at what is being thought for Dolphin (Java 7). Dolphin is so far away, that the only items currently on the drawing board include:

Modules - JSR 277. This specification is intended to solve problems with JAR files, which have been around since 1996. JAR files suffer from problems such as no support for versioning, no dependency management, difficulties in executing native code, etc. JSR 277 will define a new module format coupled with a repository, that among other things will allow having one jar on a machine be used by multiple JRE's, and include sophisticated support for version control, managing dependencies, etc.

Language level support for XML - existing approaches to working with XML can be cumbersome and tedious. A quick slide was thrown up showing how they are thinking of adding language level support for XML. For example, rather than a big 10 line method to add some elements to an XML file, one could get away with something along the lines of this:

Void addReviewed (Feature aFeature, user, ...)




Interestingly, this is also an approach Groovy has already adopted, with Groovy markup.

Groovy = Java Technology+ Ruby + Python for the JVM

Rod Cope, CTO of OpenLogic presented a technical session on Groovy that succinctly explained all the main features of the scripting language, which combines the features of Ruby, Python and Java, put together.

Rod started off by showing a 27 line java program that filters an array for strings of a certain length, and prints them. The groovy equivalent code was only 4 lines, with the code on each line looking fairly clean and maintainable.

Scripting languages were built for duct taping and gluing things together very well. Specifically, the web tier is usually a whole lot of plumbing code with small pockets of business logic. Why not use a scripting language for that?

Why Groovy when there are so many other languages? Java and Groovy are compatible at the bytecode. You don't need a separate island of API's as you would for other languages.

The main features of Groovy include:

Dynamic and optional static typing, such as: int a = 2, or def a = 2. However, your performance will vary based on how much you use this feature. Essentially, the more information you give the compiler, the more efficient it can be.

Native syntax for lists, maps, arrays, etc.. ie: Def list = ["Rod", 3, Date()] Def myMap = ["Neeta":31, "Eric":34]

Closures: myMap.each( {name, age -> println "$name is $afe years old" } )

Regular expressions built in: If ("name"==~ "na.*") {println "match!"}

Operator overloading: Dec list = ([1,2,3] + [4,5,6]).flatten() List.each {print it} - here we see the + sign adding two lists easily

How are these extra features added? There is a Groovy JDK that adds these convenient methods. For example, String has: contains(), count(), execute(), etc. The Collections class has collect(), count(), join(), each(), etc. The File class has a number of useful functions, such as eachLine(), which automatically returns strings of each line in a file without needing to do all the usual drudgery.

Rod then went on to describe some other major additions, such as scripting ANT from Groovy. You can basically replace ANT with Groovy scripts that make calls out to ANT tasks.

A really cool feature of Groovy is native support. Groovy has native support for hierarchical data structures such as XML. An example was shown where a bunch of XML was created with an easy 9 lines of code. XML element names were used in Groovy itself that looked as though there were object methods being called. It looked really smooth.

Parsing was even easier. A bunch of XML was parsed in one line and then one more line was used to find set of element values in an XML file, that were nested 3 levels deep. No multiple levels of iteration were required!

Equivalently easier SQL scripting was displayed, as well as the final list of "additional cool stuff":

  • Processes - easy way to execute commend line processes in one line
  • Threading – start a thread in one line of code and simply pass in some code to run concurrently, in a curly brace
  • Testing, SWT support, and Groovy pages/Template engine.
  • Unix scripting API for pipe, cat, grep, etc.
  • Plugins avialble for IDEA, Eclipse, Jedit
  • ActiveX proxy - allowing a way to control Windows and Windows applications on the fly through groovy, such as Excel, Word, etc.

Rod then went into a live demo, and showed how the Groovy ActiveX proxy was used to open Excel, and set a value in a cell in Excel sheet.

In conclusion, Groovy 1.0 is expected in September. It aims to allow development time cut down by typically half, and it's performance is 20% - 90% of Java, depending on usage, although very little performance tuning was done to the current implementations. Rod's final recommendation was that Groovy be used for small, non-mission-critical projects.

BOF: Research and Collaboration on the next JDK

The JDK community was launched Nov 2004, and contains weekly snaptshots. There are four projects, where you can get Tiger code, Mustang code, and the JCK. You can get weekly downloads of the JDK and play with all the new features far earlier than when they might be generally available.

To get started, simply login to java.net, click through the JRL (Java Research License), sign and return your contribution agreement. Then you can download and build it on your system, check out the bug parade and then go and try to fix a bug! Submit your fix to http://jdk-collaboration.dev.java.net. Then work with Sun engineer who will evaluate your contribution to help make sure it works. That's it!

The presentation was short, and immediately went into questions:

If you are working in a group that redistributes a modified JVM, and you are using the JIUL (Java internal use license), can you re-distribute it to your customers? The answer was no. You can't redistribute it. The rationale: Inside a company, if someone shoots themselves in the foot, then there is nothing Sun can do to stop it. But, they are nervous about allowing companies to start shipping versions of the JVM that did not pass commercial testing. They consider the JIUL an experiment they are putting on probation.

Question: How long does it take for a contribution made into the JDK to make it? If it's for Tiger (J2SE 1.5), then it can take about 3 months assuming it's not a controversial change.

Question: What is the size of the development team on different projects like Tiger and Mustang. Graham Hamilton: “It's hard to count them, how do we account for the J2EE guys contributing the web services stack stuff? I'd say any where from 200 to 400 people.”

Questions: If making a contribution, what artifacts should we also be adding? Ie: do you want Junit tests? Answer: Yes, unit tests would be nice. But you should know that we don't just want code submissions. For example, if you wanted to translate some documentation into your language of choice, that would be very useful to the Java community.

Someone else asked a question on what kinds of bugs to fix, the response was that Sun will always prioritize the most serious bugs first, leaving the less important stuff for later. So, it would be very useful if people went in and fixed the less critical bugs that Sun is always putting off. That will get you familiar with how to work with Sun, and then you can take on bigger features and enhancements.

Evening events:

JBoss cocktail party

JBoss had a cocktail party from 6-9pm at the top of the Marriott hotel. At least 200 people were there, including all of the key people from JBoss and friends. The party was loud and lively. Marc Fleury was very upbeat and made a tribute speech to Java's 10 year anniversary and the emergence of JBoss as a pioneer in the professional open source arena.

Comments on the floor included that JBoss is doing well, is profitable, and all of the open source project founders part of the JBoss community were very happy to be there. Marc Fleury commented on how JBoss has gotten so big that it can achieve "mini-Microsoft" affects in certain areas, where having a project simply affiliated with JBoss will jump start it's user base and interest levels. Marc pointed to JBoss Portal as a big success, whose monthly download count already allegedly surpasses that of Liferay and Exo combined.

Spec lead star awards dinner

Spec leads awaiting rewards

TSS was invited to an exclusive dinner where the new JCP spec lead star awards program was unveiled. Bob Lee, Cameron Purdy, and Cedric Beust were also present. 50 spec leads were considered for the award, the point of which, according to the JCP management office, is to "to endorse the good work that they do, showcase their methods for current spec leads to emulate, and motivate other JCP program members to become Spec Leads".   The 15 winners, which included EJB spec lead Linda DeMichiel and JSR 170 spec lead David Neuscheler has just been posted on jcp.org

Flash Rich Clients for J2EE Applications: The Lessons Learned From a Real-World Experience

An electronic patient helper application project decided to use Flash for it's client technology. The application is meant for doctors to see what ailments patients have, etc. The system had to be really fast, 24/7 availability, and strong application security. The system is deployed in 25 medical centers and used by 800 doctors, deployed with EJB and running on JBoss.

They then talked a lot about why they used Flash. The usual reasons of near-universal deployment with given, but also a number of technical features.

Flash features an event system, layout and animation system, a data loader and binder, and API's that completely hide all protocol transport issues.

The server side architecture they used centers around a Servlet Gateway, of two flavours: Macromedia flash remoting, and Open AMF (Action Message Format), an open source gateway. The servlet gateway handles requests and responds to the flash client asynchronously using a call back. The gateway allows POJO services to be invoked (referenced by classname), or EJB's (by JNDIName), or servlets. The client interface to EJB's was made very easy by Flash remoting.

They then went to talk about some of practices they applied:

Separation of tasks. Roles were nicely split into a client side designer who did layouts and special effects. They had a client side developer who did action scripting, take care of servers side invocations, and also implementing the action script on the server side. They also had a DBA.

Service oriented architecture. Their business delegate was stateful. It was a layer being called by the Flash remoting layer which afforded a lot of flexibility and portability.

Server-proofing the environment. They tested the application in server environments, providing an offline option. "Fail fast", don't try to re-try a connection and hold up the end user. They found that common failure points was network congestion.

Flash coding tips. They put multiple method invocations in one server request, and since services are processed asynchronously, the server will then just handle the individually. They cached remote procedure calls and saved the results as an array of objects. They also suggested not loading all the items in the list, just a list of objects, much like the inbox frame in outlook.

Security. Use HTTPS, send passwords through a secure channel. They put all the authorization into the business methods instead of at the servlet layer, for fear that anyone could get through the servlet layer and access the whole application. "Anyone can do a request to the servlet which can go directly to the server, so it's very important to do server side access control".

They also advised minimizing server round trips, and minimizing UI goodies to minimize download latencies. They mentioned that in Brazil, every high school student knows flash so it's easy to find resources for flash, easier than HTML developers. Infact, flash rich clients are better accepted even by end users than HTML-based. Sounds like Brazil is ahead of the Western world in the transition to rich from thin clients!

BEA keynote, BEA announces Open Source integration

Mark Carges, CTO of BEA began by talking about it’s focus on Enterprise Java, and took a very different spin from most of the other keynotes.  Looking at where innovations are occurring in Enterprise Java, “aside from the IDE’s itself, the single biggest thing for productivity has been around application frameworks”.

Mentioning BEA’s frameworks, Mark quickly moved into open source framework contributions to Java. “At every tier of the app, we have seen the emergence of these frameworks”.  Pointing to Struts for the web tier, Spring, Beehive, etc., he said, “There are a tremendous amount of innovations coming out of the open source community today.”

“What these provide for you are best practices, and ease of development”. Mark also made the important distinction that frameworks are just frameworks – they assume that there is a robust runtime underneath such as transactions and security, that they can leverage, and that’s where app servers like BEA, IBM, and open source [Jboss, JONAS, Geronimo] come in.

Mark spent some time talking about the value proposition of POJO frameworks and DI, AOP, and metadata, leading into some of the problems they are hearing from their clients, most common of which is integration testing. Customers are having a hard time integration testing with open source frameworks combined with other tools, deployment support.

To support their customers, Mark announced that BEA will be certifying a number of open source frameworks on top of WebLogic server, and offering support for those frameworks. Specifically, BEA will be supporting the Spring framework, and partnering with Interface21 to take on second and third layer support.  

They will also be supporting Beehive, Struts, and JSF, but interestingly they will also support using Tomcat and Geronimo in a development environment, making it easy to migrate to WebLogic for a deployment. 

“The way we see the world is a blended mode of combining open source and commercial tools to solve problems.”

Following up on their February announcement of supporting Eclipse, Mark confirmed that Weblogic Workshop will be built on top of Eclipse.

Rod Johnson came up to stage and illustrated how Spring on WebLogic can work well. An interesting distinction Rod made is that Spring doesn’t compete with WebLogic, it simply hides the need to work with proprietary APIs.  For example, Spring provides declarative transaction management, and when working on WebLogic, it can work with native BEA API’s to provide more robust transaction management. In reverse, BEA’s sophisticated JMX-based management console can also integrate with Spring, allowing Spring beans to be managed from the WebLogic console.

The Opening Keynote, Redux

The 2005 JavaOne conference began this morning in a very ministerial tone. The conference turns 10 this year and presentations from John Gage, Jonathan Schwartz, John Loiacono and many other Sun executives talked about Java with an assumption that the platform is adopted, complete, battle tested, and mature. Past performances by Jonathan Schwart, President and COO at Sun Microsystem's played like cheerleading sessions. At this conference Jonathan played statesman.

For instance, he drew attention to Thomas Edison's patent of the light bulb as an instance of client-server lock-in.

"Edison wanted to control what the wires were connecting too. It didn't work then," Schwartz said, "And, later attempts to have the US adopt Direct Current (DC) power lost again too."

Jonathan raised the conversation above the typically fights and snits between Sun, Microsoft, and IBM to a higher level.

"All technology if successful has a tremendous social utility. What's the social value of the network," Schwartz asked?

At first it looked like this would be an "announcement free" opening session. Instead, the session announced several key initiatives.

John Loiacono gave a presentation on how Java's growth, showing the following statistics:

4.5 Million Java developers, a 42% increase over 2004
1 Billion Java Cards deployed, a 23% increase
140 Carrier deployments, an 8% increase
600 Million handsets from 32 manufacturers, a 77% increase
700 Million Personal computers, a 50% increase
708 Million Java-powered phones, a 67% increase
2.5 Billion Java devices worldwide, a 12% increase

Loiacono announced that the Java Business Integration specification (JSR 208) is now published and approved by the Java Community Process (JCP.) There is a lot of interest in JBI from the developer audience. Web Services and XML are well adopted by this audience and many of them are viewing systems based on XML as an implementation of an Enterprise Service Bus (ESB.) Details are found at https://open- esb.dev.java.net/. After the session Loiacono told me, "Our implementation of the JSR 207 for JBI is our ESB."

Blu-Ray Picks Java

Yasuhi Mishimura, Director of Panasonic R&D, announced that "Blu- Ray", http://www.blu-ray.com/info/ will ship with Java as its interactivity standard. Blu-Ray is a new form of DVD that can store up to 50 Gigabytes on one DVD disc, with the potential to store up to 200 Gbytes. The format was developed to enable recording, rewriting and playback of high-definition HD video, as well as storing large amounts of data. The Blue-Ray Disc Associate counts 132 members including most of the PC manufacturers (Apple, Dell, Hitachi, HP.) Mishimura said they chose Java for the interactivity standard because Java provides great interactivity and network connectivity. Blu-ray devices are expected to replace VCRs and DVD players as the world transitions to HD format. Blu-ray devices will have a network connection to allow network enabled value added services. For instance, if Serbian subtitles become available after the content is baked into a disc and can be downloaded when the DVD plays.

IBM Signs New Java License Agreement with Sun

Robert LeBlanc, General Manager for WebSphere Software at IBM General announced that IBM signed a new license agreement with Sun for Java.

Sun wins big from this agreement in that IBM will support Sun's OpenSolaris operating environment.

There was a bit of humor in the IBM announcement. John Loiacono, Executive Vice President of the Software Group at Sun Microsystems said, "IBM re-upped the license for Java deal for 11 years. As Spinal Tap said 11 is better." To which LeBlance quipped, "11 is 10% better."

Sun Says Free and Open Source Software (FOSS) Is Our Strategy

Jonathan Schwartz announced that Sun is distributing the Java System Application Server (JSAS) under an open-source license. Sun chose the CDDL license that is OSI approved and contains indemnification and patent protection. The code distribution will include the integrated NetBeans IDE code, Java EE 5 and JBI (JSR 208) code.

From Schwartz's perspective, "There is no downside to FOSS." He said the developer community should assume this is the first step of many.

DTrace for Java

Adam Levanthal of the Solaris Kernel Development team showed DTrace for Java. DTrace is a utility that lets a Java developer capture a trace of the entire stack – from the application layer down through the JVM, kernel, scheduler, and system calls. Levanthal showed a demonstration of DTrace running on Solaris 10 on an AMD laptop running Java desktop. The DTrace script ran a Java application that was causing lots of activity in the kernel. He noted that Java is a "tower of abstraction" and "any misstep requires a huge amount of code to run underneath." Previous trace utilities stopped at the Java level. DTrace showed a hierarchical list of calls all the way down to the kernel.

I Thought This Was A Party

Scott McNealy, Chief Executive Officer at Sun Microsystems showed up at the end of the morning general session asking "I thought this was our 10th year anniversary. Where's the band, where's the cake, where's the party?" That ushered in a New Orlean's style Jazz band and a very large cake.

The morning keynote session went very well. Few if any demonstrations crashed and the presentations had a nice lets-get-to-it attitude. The conference is benefiting from the growing economy – 15,000 attendees up from 10,000 last year – and that makes JavaOne a fun conference again.

Jonathan Schwartz ended the morning keynote by declaring, "The information age is history. We are now entering the Participation Age."

More on Business Processes and SOA

Later in the day JavaOne hosted a session on Business Process Execution Language (BPEL) that was so well attended they started turning away attendees. In that session, Sun talked about the needed components to an integration platform, including BPEL and the Business Process Modeling Notation (BPMN) specification. BPMN looks somewhat like UML and defines the basic elements for flow objects, connection objects, pools, and artifacts. Sun demonstrated BPMN visual description of a business process by using the visual BPMN editor in Studio Enterprise Edition. They showed a travel itinerary whose XML schema produced a 232-page XML document. That kind of XML complexity is on the way.

Raining Data described the SOA Repository (SOAR) as a toolset to provide SOA federation and service acceleration through the use of native XML database and XQuery functions. SOAR stores Web Service XML data in the mid-tier through its TigerLogic XML database technology. Details are found at http://www.rainingdata.com. SOAR has immediate applications in BPEL architectures.

The technical morning session described the roadmap for the Java platform by stating a theme: Compatibility, community, creativity and productivity, and performance.

Java Naming Conventions Lose A '2'

Sun is dropping the "2" from the Java platform naming. For instance, J2SE becomes JSE. They explain that "2" sounded good back in 1998 when JVM 1.2 shipped but now it seems out of date for how far the platform has come.

Sun said they would not be doing a Java 5.1 release. Java 5.0 has been shipping since September 2004 and they are happy with its stability and completeness. The Java team is working on 6.0 next. In general the Java team is working towards an 18-month cycle for new feature releases. That puts Java 6.0 (codenamed Mustang) in Summer

2006 and Java 7.0 (codenamed Dolphin) for 2008

The main themes for Mustang are to maintain compatibility, stability, and quality. Mustang will incorporate the Rhino JavaScript engine into Java and JSR 223, the JNI-based framework for calling scripts from within Java apps. Mustang will deliver an implementation of JDBC 4.0, including EoD features (JSR 221.) Mustang will deliver an update to Javadoc (JSR 260) that will make it easier to group together and structure class hierarchies. Mustang will include full Longhorn support. For instance, Mustang will deliver the Avalon look-and-feel and windows system tray support.

Open Bug Patching

Sun is pursuing a new open-source style process to deliver Mustang. Sun posted the first snapshots of Mustang to mustage.dev.java.net in November 2004. Sun is releasing all of Mustang in weekly builds and seeks developer feedback. Additionally, several senior software engineers at Sun have volunteered to mentor Java developers outside of Sun to find and fix bugs in Mustang.

To operate in this open development process, Sun is delivering Mustang under two licenses: Java Research License (JRL) and Java Internal Use License (JIUL). The JRL is a simple two-page license that allows very broad use for research. It does not allow for commercial use and is really meant for developers wanting to read the source code. The JIUL allows you to deploy your own bug fixes without having to run the Java compatibility kit (TCK.) The JIUL is an honor system for you to eventually contribute your improvements to the Java team. The JIUL is primarily to allow for urgent bug fixes.

Java 7.0 (Dolphin) Feature Thoughts

Sun discussed its thoughts on features for Java 7.0 (Dolphin) release. For instance, changes to the Java language included direct XML support in the language, cross-package references, and method references. These were listed as "maybe." At the JVM level, Sun said they are working on special bytecodes that would facilitate dynamic script language support, specifically in method dispatching. Tim Bray's Dynamic Scripting Language Summit in 2004 may have influenced this decision to be more supportive of dynamic scripting on the JVM. Sun is even looking at including BeanShell as a scripting language (JSR 274.)

Additional enhancements to Dolphin include new I/O APIs (JSR 203,) virtual file systems so one can implement the various operating system specific features in a generalized way, new packaging/ deployment architecture to separate distribution from caching from loading parameters. Imagine JAR files that include versioning and dependency information in the package.

Java EE Roadmap

Bill Shannon, manager of the Java EE projects at Sun, gave a rundown of the next release of JEE (formerly known as J2EE.) The enhancements come in three forms: POJO programming using annotations, resource injection from the supporting application server, and new APIs and frameworks.

Two years ago a JavaOne Birds-of-a-Feather (BOF) had a panel discussion of deployment descriptors. It seemed apparent to me that enhancing deployment descriptors was a difficult and complex problem.

Resource injection seems to solve the problem by getting rid of deployment descriptors! Instead, the POJO tells the container what resources it needs. Sun called this an "inversion of control."

JEE 5 will feature implementations of a number of initiatives. For instance, EE 5 will deliver JSP Standard Tag Library (JSR 52,) the Streaming XML Parser (StAX, JSR 173,) Web Services Metadata (JSR 181,) a new persistence API (JSR 220,) JAXB 2.0 (JSR 222,) Common Annotations (JSR 250,) and a new version of JavaServer Faces (JSR 252.)

EJB 3.0

Sun described enhancements planned for EJB 3.0, including a new persistence API for EJB 3.0, they claim to have resolved the EJB/JDO conflict (although to learn the details I need to attend the TS-7949 session tomorrow,) and EJB support annotations. For example, the following delivers a Web Service implemented on a stateless session bean:

public class Hello
{ … }

All of the specifications for JEE 5.0 are available for review now. Shannon expects final drafts by Q3 of 2005 and a expects "beta" releases in Q4 2005. He expects final release by Q1 2006.

Java Studio Creator And Ajax

Ajax is a toolset and protocol to enable enhanced interactivity through a Web browser interface. Ajax languished until Google adopted it for the Google Maps interface. In Google Maps one can drag maps

left/right/up/down without requiring an HTTP submit to the server, and the consequential roundtrip to the server. Instead Google Maps makes several HTTP requests to the server to get updated map

information. Google Maps created developer community interest in Ajax and Sun got behind it by enhancing Java Studio Creator.

Tor Norbye, Sr Staff Engineer, demonstrated Java Studio Creator 2. Creator is now build entirely on NetBeans 4.2 APIs and adds WYSIWYG components and portlet editing capabilities. The table component is much richer than 1.0. For instance, the table component makes several Web Service requests to a service and adds the response results to the component without requiring the browser to refresh the entire page. Creator delivers an Ajax-enabled component that lets the user type-as-you-go to see search criteria applied to the table component without round-tripping to the Web host. The new Creator details are found at http://www.developers.un.com/jscreator and Creator 2.0 is available now.

Subscribe To An Ugly Workstation For Only $29.95/month

Sun's developer program is now offering a Sun Ultra 20 workstations with an AMD Opteron 144 CPU (1.8 Ghz/1Mb cache,) 512 Mbytes to 2 Gbytes of RAM, and an 80 to 250 Gbyte hard disk drive. Subscribe to the developer program for $29.95/month for 3-years and Sun sends you the workstation for free. Details at http://www.sun.com/ultra20.

I work with Macintosh, PC, and Unix/Linux systems everyday. It is amazing to me how consistently ugly Sun workstations look in comparison. They must work hard to maintain such standards. The iron I find in this is that I will pay more for good industrial design. (I'm typing this on my Powerbook G4.) I wish Sun would respond to my want to pay more.

Groovy: a new world of possibilities

By far the best session that I went to toady was the Groovy session by Rod Cope the CTO of www.OpenLogic.com. I went into the session not knowing anything about Groovy and walked very excited about the massive possibilities that Groovy represents for the Java community.

Groovy is a scripting language that is compiled to java byte code .class files which are executed by the Java Virtual Machine. All Java source files are valid Groovy scripts, however Groovy defines an alternative syntax that is much more expressive than java and just plain groovy. Groovy is very expressive for the typical things that you would expect a scripting language to be expressive for, Rod gave an example of a Java class that filters a list of strings and removes strings over a certain length. The Java program was 27 lines the groovy script that implements the same functionality 3 lines. He then proceeded to show many examples of situations where groovy scripts save you a lot of typing by doing what you want without you having to write lots of java code to accomplish the same task.

Because Groovy is compiled to a .class file it means that the entire classes that are part of the JDK are accessible from Groovy, this is extremely useful and allows you to do all sorts of wickedly cool stuff.

For example you can call Groovy classes from Java code and you can call Groovy code from Java; this means that you can write JUnit tests in Groovy and save yourself a lot of time and effort since Groovy is much more expressive than Java. Another example was a script that Rod showed which can be used to create a GUI program using Swing, what was cool was the economy of the Groovy script, what would take you 10 lines of code in Java seems to only take 1 line of code in Groovy. Anything you can write in Java you can write in Groovy however according to Rod it will run 20 to 90% slower than if you had written the code in Java.

To demonstrate how cool Groovy, is Rod wrote a groovy script that opened up Microsoft Excel, created a new file, then entered some data and formula all done programmatically from Groovy through the use of a generic Java to COM bridge that allows you to instantiate COM objects and manipulate them.

So what’s the impact of Groovy on Java, and should you be excited? Other than the fact that it is super cool, there are many reasons to be excited about groovy and here are the key reasons that excite me the most.

Framework writers take notice Groovy opens up the door for far better ways to configure your frameworks, than using XML files. I have lost track of how many times misguided programmers have shifted complexity from Java code to an XML file without accomplishing anything. Here is the stereotypical example of how this shift in complexity occurs.

Something is tedious and boring to code so we write an XML file to express what we want and we write a Java program to execute the XML file. Ant and all the various XML configuration files are examples of XML being used to do reduce complexity by saving you from having to write Java code. The problem is that that the boring thing that we wanted to do gets more complex and in no time we have to add if statements, loops, variables other programming language features to what used to be a simple XML configuration file. And so my main claim that we have shifted complexity from Java to XML. Instead of writing an if statement in Java I write in XML.

With Groovy there is no need to turn your XML schema into a programming language. If you need if statements and loops in your configuration file better write a groovy script rather that inflict another XML loop construct on us unsuspecting programmers. Groovy is more expressive than XML in situations that need programming constructs and it is extremely easy to learn. This is why I expect Groovy to find its place alongside XML as a great way to configure software systems and satisfy a programmers insatiable appetite for flexibility.

According to Rod, OpenLogic has over 100,000 lines of Groovy code in their product. So you can use Groovy to build useful applications. While you may not use Groovy to write your next app, I encourage you to consider Groovy for writing JUnit cases because you can save yourself quite a bit of time and effort.

The Java Business Integration Standard

Following Lunch, developers could be seen rushing through the halls to attend the afternoon technical sessions.  With all the buzz about the new Java Business Integration specification we headed to 307 on the Esplanade level to get the whole scoop.  There, Sun Engineers Mark Hapner, Ron Ten-Hove and Peter Walker demystified the new JSR 208 Java Business Integration standard.

Imagine a large corporate environment where different system are hosted by different vendors products using different service standards:  Some services exist in legacy systems exchanging messages via EDI, other systems use web services and SOAP, and still other systems are using J2EE, EJB, and JMS.  Integrating these systems can be a formidable task.  JBI seeks to simplify this problem by defining a standard, pluggable, extensible architecture for an Enterprise Service Bus to simplify the integration of systems.

JBI begins by defining interfaces to vendors to provide pluggable protocol bindings to allow different network protocols and message formats to integrate into the bus.  Next, various service engines that can both provide and consume services onto the bus using their native protocols.  Then, the Normalized Message Router which lies at the heart of JBI coordinates how messages from each of the various services is routed and through the system.

A J2EE application could submit a request to the bus, which the normalized business router may then route the message to another service running providing BPEL orchestration technology, which in turn could use the bus to coordinate a series of requests to other services on the bus... all the while allowing the bus to abstract away the various differences in protocols and service types.

The Normalize Message Router moderates the message exchange, manages protocol conversion, defines the message formats (using WSDL), coordinates security and transaction meta-data, and encapsulates optional data which services may wish to include with their requests or responses.

In the end, the intent of the JBI standard is to allow vendors to collaborate and interoperate without vendor lock-in through a rigorous set of APIs for a pluggable enterprise service bus architecture.  From the reactions and questions from the audience, it is clear that the final release of the Java Business Integration spec is generating a lot of excitement at this years JavaONE.

While JBI may be what's new at this years conference, there were plenty of other sessions capturing attendees attention as well.  Jess Garms and Tim Hanson teamed up to provide the powerful session "Experiences with the 1.5 Language Features: Tips and Tricks".  With a packed room and people lining the back wall, Jess and Tim went on to review the Java 1.5 new language features, but unlike past years which simply introduced the new features, this talk focused on effective usage and best practices.  The first 15 minutes of the talk discussed the benefits of using the enhanced for loop, enums, annotations, and variable length argument lists.  Some of the items Jess and Garm choose to stress included:

+ As of Java 1.5 (or Java 5.0 depending who you ask) the new enumerated types replace the public static final int as the preferred method for creating a list of eligible values.  The benefits to this include strong type checking, meaningful string conversion, and the ability to include methods with the enumerated type. 

+ Annotations are NOT a preprocessor.  They simply tag extra information which is then made available to the runtime.  Therefore ideas like using annotations to shorten code by generating getters and setters is not only an anti-pattern, but it also simply doesn't work.

  public class Cat
    private @property String name;  //Only tags the field.  Annotations do NOT generate code.
    private @property int age;

The remainder of the talk then moved into a much more complex and complete discussion of the proper use of Generics and Covariant return types in the design of APIs and interfaces.  To this end, Jess and Tim sought to demystify the confusion

Dig Deeper on Java web services and SOA

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.