Friday Feb 01, 2013

The JCP Evolution!

Recent changes to the Java Community Process (JCP) program "focus on the way the organization itself is structured and organized" explained Patrick in this interview.  The changes will result from the implementation of three Java Specification Requests (JSRs). The first JSR, the JSR 348, makes the process more open and transparent to facilitate developers' participation. It was released a year ago and Heather witnessed increased transparency in projects,  additional participation and a simplified release process. "They are using public issue trackers and public discussion alias on projects. More people from the community are commenting and participating in the JSRs. The process of releasing final and maintenance releases is more agile," she commented.

She explained the different options for developers' participation in the JCP. Java user groups may become JCP members at no charge and contribute as a group. Individuals and user groups can contribute to the community initiative Adopt-A-JSR. Developers can give feedback on the transparency of a JSR process. Individuals, corporations and non-profit organizations (JUGs for example) can join the JCP. They then can comment on specs, join an expert group and become a spec lead

Information about the JCP program is available at Watch the recent presentation about Adopt-a-JSR with Martin Verburg and Java EE 7 JSR projects with Arun Gupta

Friday Oct 19, 2012

An Interview with JavaOne Rock Star Martijn Verburg

An interview with JavaOne Rock Star Martijn Verburg, by yours truly, titled “Challenging the Diabolical Developer: A Conversation with JavaOne Rock Star Martijn Verburg,” is now up on otn/java. Verburg, one of the leading movers and shakers in the Java community, is well known for his ‘diabolical developer” talks at JavaOne where he uncovers some of the worst practices that Java developers are prone to.

He mentions a few in the interview:

* “A lack of communication: Software development is far more a social activity than a technical one; most projects fail because of communication issues and social dynamics, not because of a bad technical decision. Sadly, many developers never learn this lesson.
* No source control: Some developers simply store code in local file systems and e-mail the code in order to integrate their changes; yes, this still happens.
* Design-driven design: Some developers are inclined to cram every design pattern from the Gang of Four (GoF) book into their projects. Of course, by that stage, they've actually forgotten why they're building the software in the first place.”

He points to a couple of core assumptions and confusions that lead to trouble:

“One is that developers think that the JVM is a magic box that will clean up their memory and make their code run fast, as well as make them cups of coffee. The JVM does help in a lot of cases, but bad code can and will still lead to terrible results!

The other trend is to try to force Java (the language) to do something it's not very good at, such as rapid Web development. So you get a proliferation of overly complex frameworks, libraries, and techniques trying to get around the fact that Java is a monolithic, statically typed, compiled, OO environment. It's not a Golden Hammer!”

Verburg has many insightful things to say about how to keep a Java User Group (JUG) going, about the “Adopt a JSR” program, bugathons, and much more.

Check out the article here.

Sunday Sep 30, 2012

The Java Specialist: An Interview with Java Champion Heinz Kabutz

Dr. Heinz Kabutz is well known for his Java Specialists’ Newsletter, initiated in November 2000, where he displays his acute grasp of the intricacies of the Java platform for an estimated 70,000 readers; for his work as a consultant; and for his workshops and trainings at his home on the Island of Crete where he has lived since 2006 -- where he is known to curl up on the beach with his laptop to hack away, in between dips in the Mediterranean.

Kabutz was born of German parents and raised in Cape Town, South Africa, where he developed a love of programming in junior high school through his explorations on a ZX Spectrum computer. He received a B.S. from the University of Cape Town, and at 25, a Ph.D., both in computer science.

He will be leading a two-hour hands-on lab session, HOL6500 – “Finding and Solving Java Deadlocks,” at this year’s JavaOne that will explore what causes deadlocks and how to solve them.

Q: Tell us about your JavaOne plans.

A: I am arriving on Sunday evening and have just one hands-on-lab to do on Monday morning. This is the first time that a non-Oracle team is doing a HOL at JavaOne under Oracle's stewardship and we are all a bit nervous about how it will turn out. Oracle has been immensely helpful in getting us set up. I have a great team helping me: Kirk Pepperdine, Dario Laverde, Benjamin Evans and Martijn Verburg from jClarity, Nathan Reynolds from Oracle, Henri Tremblay of OCTO Technology and Jeff Genender of Savoir Technologies.

Monday will be hard work, but after that, I will hopefully get to network with fellow Java experts, attend interesting sessions and just enjoy San Francisco. Oh, and my kids have already given me a shopping list of things to get, like a GoPro Hero 2 dive housing for shooting those nice videos of Crete. (That's me at the beginning diving down.)

Q: What sessions are you attending that we should know about?

A: Sometimes the most unusual sessions are the best. I avoid the "big names". They often are spread too thin with all their sessions, which makes it difficult for them to deliver what I would consider deep content. I also avoid entertainers who might be good at presenting but who do not say that much.

In 2010, I attended a session by Vladimir Yaroslavskiy where he talked about sorting. Although he struggled to speak English, what he had to say was spectacular. There was hardly anybody in the room, having not heard of Vladimir before. To me that was the highlight of 2010. Funnily enough, he was supposed to speak with Joshua Bloch, but if you remember, Google cancelled. If Bloch has been there, the room would have been packed to capacity.

Q: Give us an update on the Java Specialists’ Newsletter.

A: The Java Specialists' Newsletter continues being read by an elite audience around the world. The apostrophe in the name is significant.  It is a newsletter for Java specialists. When I started it twelve years ago, I was trying to find non-obvious things in Java to write about. Things that would be interesting to an advanced audience.

As an April Fool's joke, I told my readers in Issue 44 that subscribing would remain free, but that they would have to pay US$5 to US$7 depending on their geographical location. I received quite a few angry emails from that one. I would have not earned that much from unsubscriptions. Most readers stay for a very long time.

After Oracle bought Sun, the Java community held its breath for about two years whilst Oracle was figuring out what to do with Java. For a while, we were quite concerned that there was not much progress shown by Oracle. My newsletter still continued, but it was quite difficult finding new things to write about. We have probably about 70,000 readers, which is quite a small number for a Java publication. However, our readers are the top in the Java industry. So I don't mind having "only" 70000 readers, as long as they are the top 0.7%.

Java concurrency is a very important topic that programmers think they should know about, but often neglect to fully understand. I continued writing about that and made some interesting discoveries. For example, in Issue 165, I showed how we can get thread starvation with the ReadWriteLock. This was a bug in Java 5, which was corrected in Java 6, but perhaps a bit too much. Whereas we could get starvation of writers in Java 5, in Java 6 we could now get starvation of readers. All of these interesting findings make their way into my courseware to help companies avoid these pitfalls.

Another interesting discovery was how polymorphism works in the Server HotSpot compiler in Issue 157 and Issue 158. HotSpot can inline methods from interfaces that have only one implementation class in the JVM. When a new subclass is instantiated and called for the first time, the JVM will undo the previous optimization and re-optimize differently.

Here is a little memory puzzle for your readers:

public class JavaMemoryPuzzle {
  private final int dataSize =
      (int) (Runtime.getRuntime().maxMemory() * 0.6);

  public void f() {
      byte[] data = new byte[dataSize];
    byte[] data2 = new byte[dataSize];

  public static void main(String[] args) {
    JavaMemoryPuzzle jmp = new JavaMemoryPuzzle();

When you run this you will always get an OutOfMemoryError, even though the local variable data is no longer visible outside of the code block.

So here comes the puzzle, that I'd like you to ponder a bit. If you very politely ask the VM to release memory, then you don't get an OutOfMemoryError:

public class JavaMemoryPuzzlePolite {
  private final int dataSize =
      (int) (Runtime.getRuntime().maxMemory() * 0.6);

  public void f() {
      byte[] data = new byte[dataSize];

    for(int i=0; i<10; i++) {
      System.out.println("Please be so kind and release memory");
    byte[] data2 = new byte[dataSize];

  public static void main(String[] args) {
    JavaMemoryPuzzlePolite jmp = new JavaMemoryPuzzlePolite();
    System.out.println("No OutOfMemoryError");

Why does this work? When I published this in my newsletter, I received over 400 emails from excited readers around the world, most of whom sent me the wrong explanation. After the 300th wrong answer, my replies became unfortunately a bit curt. Have a look at Issue 174 for a detailed explanation, but before you do, put on your thinking caps and try to figure it out yourself.

Q: What do you think Java developers should know that they currently do not know?

A: They should definitely get to know more about concurrency. It is a tough subject that most programmers try to avoid. Unfortunately we do come in contact with it. And when we do, we need to know how to protect ourselves and how to solve tricky system errors.

Knowing your IDE is also useful. Most IDEs have a ton of shortcuts, which can make you a lot more productive in moving code around. Another thing that is useful is being able to read GC logs. Kirk Pepperdine has a great talk at JavaOne that I can recommend if you want to learn more. It's this: CON5405 – “Are Your Garbage Collection Logs Speaking to You?”

Q: What are you looking forward to in Java 8?

A: I'm quite excited about lambdas, though I must confess that I have not studied them in detail yet. Maurice Naftalin's Lambda FAQ is quite a good start to document what you can do with them. I'm looking forward to finding all the interesting bugs that we will now get due to lambdas obscuring what is really going on underneath, just like we had with generics.

I am quite impressed with what the team at Oracle did with OpenJDK's performance. A lot of the benchmarks now run faster.

Hopefully Java 8 will come with JSR 310, the Date and Time API. It still boggles my mind that such an important API has been left out in the cold for so long.

What I am not looking forward to is losing perm space. Even though some systems run out of perm space, at least the problem is contained and they usually manage to work around it. In most cases, this is due to a memory leak in that region of memory. Once they bundle perm space with the old generation, I predict that memory leaks in perm space will be harder to find. More contracts for us, but also more pain for our customers.

Originally published on

Tuesday May 15, 2012

JSF 2.0 for the Cloud, Part Two

Part Two of Deepak Vohra’s “JSF 2.0 for the Cloud” is now up on otn/java. In Part One, Vohra demonstrated how to take advantage of resource handling, @ManagedBean annotation, and implicit navigation. In Part Two, he explores new features in JSF 2.0 that make it ready for the cloud, including Ajax support, view parameters, preemptive navigation, event handling, and bookmarkable URLs.

Ajax support for JSF 2.0 components includes asynchronous transfer of data between a client and a server, along with partial page rendering, partial page processing, and grouping of components, and can be added using either f:ajax tag or the JSF Ajax library (jsf.js).

Regarding view parameters, Vohra explains, “JSF 2.0 added support for view parameters, which add the provision to send request parameters in a GET request. A view parameter is a UI component represented with the UIViewParameter class. Just like other UI components, it is saved in the UI component tree for a Facelets page and can be associated with validators and converters. A view parameter is an EditableValueHolder because it implements the interface.”

Preemptive navigation allows developers to determine the resource file that they  navigate to and request parameters, if needed, based on the navigation case and view parameters, thus allowing them to create a URL for JSF resources that they access from a GET request. As a result, the URL displayed shows the resource and all request parameters.

Developers should take note that plans are in the works to update Java EE 7 for “cloud-related practical considerations, such as multitenancy and elasticity, also known as horizontal scaling.” This will be available through JSR 342, which is scheduled to complete an early draft review on May 23, 2012. Specification leads are Oracle’s Bill Shannon and Linda DeMichiel.
Access the article here.

Wednesday Nov 09, 2011

Working with the XML Parser API — JSR 172

Vikram Goyal’s article, “Working with the XML Parser API — JSR 172,” now up on otn/java, covers the basics of the XML Parsing API via a concrete example that uses SAX (Simple API for XML), a parsing method which is now preferred to the alternative method, and DOM (Document Object Model), which has a heavy memory footprint that led the XML Parser API to disallow its use in XML processing. “The XML Parser API,” explains Goyal, “defines the use of the SAX parser for parsing XML documents in resource-constrained devices.”


He explains through a working example what the SAX parser is, how it is defined by the API, and how best to use it.


From the article:


“In a nutshell, for the parsing of a custom XML document, you need to create a handler that extends the DefaultHandler class provided by the API. This custom handler is responsible for listening to the events from the parser and creating the model based on those events (and the supplied data). Your handler is responsible for validating the document and its data.”


Read the article.


Friday Nov 04, 2011

Adopt A JSR!

JUG Leaders have started an 'Adopt a JSR' program for Java User Groups! This program is intended to encourage JUG members to get involved in a Java Specification Request (JSR) and to evangelize that JSR to their JUG and the wider Java community, in order to increase grass roots participation.  JSRs cover all aspects of the Java ecosystem, such as the new Date and Time API coming into Java 8 and the latest JEE7 APIs for the cloud. Martjin Verburg, London Java Community(LJC) JUG Leader explained, "With JSR-348 bringing openness and transparency to the way in which JSRs are run, this is a great opportunity for everyone in the Java Community to help the Java ecosystem thrive."

The idea behind this program is to have a greater involvement of JUGs into the Java standards process so that:

  • Standards get earlier feedback, leading to more developer-friendly APIs
  • Standards get 'end user/developer' expert input
  • Standards get developed faster as the community helps with some of the heavy lifting
    of building Reference Implementations (RI) and Technical Compatibility Kits (TCK)
  • JUGs can help with the management of the open source projects that springs up
    around a JSR (managing mailing lists, triaging issues, etc.)

The benefits to JUGs and individual members adopting a JSR are obvious, hopefully. "It looks great on your our resume(CV), gives you new technical and community skills, and much more!" exclaimed Ben Evans, LJC Leader. Along those lines, Java Recruiter Barry Cranford wrote the blog "Give your career a boost by Adopting a JSR."

If you'd like to get your JUG involved, learn more about the Adopt a JSR program. Some JSRs have already been adopted, so please check the page so you can coordinate with other JUGs. Send comments or questions to the JUG Leaders list. Help adopt a JSR today. They need you!

Monday Oct 17, 2011

The Ninth Annual Java Community Process Program Awards

In a festive room full of Java luminaries and fine food at JavaOne 2011, the 9th annual JCP Program Awards were handed out Tuesday night at the Anzu Restaurant of the Nikko Hotel. The award categories were: JCP Member/Participant of the Year; Most Innovative JSR; and Outstanding Spec Lead.

The nominees in their respective categories were:

JCP Member/Participant of the Year

--Mike DeNicola, of Fujitsu, for his role as Working Group Lead: While not officially Spec Lead of JSR 348, Mike has contributed a lot in getting the JCP reform plans where they are at a great pace, compared to earlier efforts. Helping the JCP to be fit for the next decades of Java following the Oracle-Sun merger.

--SouJava: For tirelessly promoting the JCP, JSRs, openness, transparency and our community at large (to say nothing of Bruno Souza's marvelous cape!).

--IBM: For their participation in the OpenJDK project, which has significantly increased the momentum of Java SE.   

--London Java Community: For their efforts to involve the developer community in the activities of the JCP.   

--Doug Lea: After a long and distinguished tenure on the JCP EC, Doug Lea (along with Tim Peierls and The Apache Software Foundation) felt he had no choice but to resign at the end of 2010. In doing so, he demonstrated integrity, independence, and courage that truly sets him apart. If the JCP is to retain any shred of legitimacy and relevance in the future, it will be through the actions other members who display the traits exemplified by Doug: integrity, independence, and courage, coupled with unparalleled technical expertise and a genuine love for the Java ecosystem.

Most Innovative JSR

--JSR 321: Trusted Computing API for Java. Beside a picture book example for Agile and Transparent Expert Group work, JSR 321 also anticipated another vision of, by being the first JSR with a known implementation in a language other than Java, called Hybrid JSR by (Part 2 and beyond). Apart from all that, Trusted Java holds the key to a safer more reliable and trusted usage of PaaS/Cloud or other Pervasive Technologies like Social Networking and Mobile.

--JSR 334: Small Enhancements to the Java Programming Language (Project Coin): Due to the process it was run under and the requirement of participants to 'put some skin in the game'.

--JSR 292:  Supporting Dynamically Typed Languages on the Java Platform: As the first JSR specifically designed to support languages other than Java, JSR 292 will ensure the long-term success of the Java VM.

Outstanding Spec Lead

--John Rose: (JSR 292 Supporting Dynamically Typed Languages on the Java Platform) Due to his excellence in ensuring consensus across the community -- both EG members and the wider JVM language community.

--Alex Buckley: (JSR 901, Java Language Specification and JSR 924: Java Virtual Machine Specification.) For his leadership.

--Mark Reinhold: For his leadership and promotion of the first Java SE platform JSR in several years.

The Winners

JCP Member/Participant of the Year: Mike DeNicola of Fujitsu

Most Innovative JSR: JSR 292, John Rose, Oracle, spec lead for JSR 292

Outstanding Spec Lead: John Rose, Oracle: JSR 292 Supporting Dynamically Typed Languages on the Java Platform

Community Leadership Award

Finally, the JCP Executive Committee gave a special Community Leadership Award to  Patrick Curran, Chair, Java Community Process, Oracle, who was recognized for the fabulous job he has done coping with a period of substantial change and conflict in the JCP over the past 18 months.

Obviously, the work of John Rose and his team was singularly honored. But as Rose himself graciously emphasized, it was itself a great honor to be counted among his fellow nominees.

Congratulations to all involved!, JSR 348 -- Towards a New Version of the Java Community Process

At JavaOne 2011, Tuesday's mid-day JCP discussion, presented by Heather VanCura, Oracle Manager, JCP Program, and Patrick Curran, Chair, Java Community Process, Oracle, explored some big news about the JCP. Oracle's commitment to greater transparency, participation, and openness is coming through loud and clear in JSR 348, "Towards a new version of the Java Community Process" -- otherwise known as

The main improvements, at this stage, involve gaining greater transparency by requiring, rather than suggesting, that all development is done on open mailing lists and issue trackers.  Furthermore, the recruiting process for Expert Group members will be publicly viewable, and ways to disclose TCK testing process results will be investigated - currently, the public is rarely aware of the results of the TCK testing process. All of these developments are designed to result in a more public, open, accessible and transparent JCP.

JSR 348 passed through a Pubic Review Ballot in mid-September with results for the SE/EE Executive Community showing 14 YES votes, one Abstain (Google) and one non-vote (VMWare). Oracle expects the initial version of JSR 348 to be concluded in October 2011, offering simple changes that will be quickly implemented. A subsequent second JSR, to be filed soon afterward, will tackle more complex issues, including any changes required to the Java Specification Participation Agreement (JSPA).

The JSPA is defined by the JCP as "a one-year, renewable agreement between you [[the participant in the agreement]] and Oracle America. It entitles you to review and comment on JSRs during the Community Review period - after they are initially approved by their sponsoring Expert Group and before they are open for Public Review. The agreement carries an annual fee, depending on your Member category."

The success of the Java community depends upon an open and transparent JCP, so is worthy of our praise and attention.

Wednesday Jun 08, 2011 Update

Did you know it takes a JSR to change the JCP process? JSR 348, titled "Towards a New Version of the Java Community Process," has been approved by both Executive Committees, who will now serve as the Expert Group for this JSR. The Early Draft Review is planned for early this (Northern Hemisphere) summer 2011.

JSR 348 focuses on changes to the JCP Process Document in the following areas:  transparency, participation, agility and governance. The JCP program office has posted a new article detailing plans for JSR 348 (AKA This article explains the background of the JSR, how to find the project, and how to follow the workings of the JCP Executive Committee and how you can get involved. On the project page you can find instructions for joining the Observer alias, a link to the discussion forum, a document archive and an (upcoming) issue tracker. Now is the time for community members to get involved!


JCP Article: The JCP Program Moves Towards a New Version:
JCP Program Office Blog: How to Participate in JCP.Next
JSR 348: Towards a New Version of the Java Community Process
JSR 348 Project Page


Insider News from the Java Team at Oracle!



« October 2015