The Source for Java Technology Collaboration
User: Password:



Gregg Sporar's Blog

April 2007 Archives


Pro NetBeans IDE 5.5 Enterprise Edition

Posted by gsporar on April 08, 2007 at 05:25 PM | Permalink | Comments (2)

Apress has just published Pro NetBeans IDE 5.5 Enterprise Edition, by Adam Myatt. The physical book is now shipping and can be ordered from amazon.com and all the other usual spots. I read the ebook version and liked it quite a bit. The book is organized topically, so you do not have to read it from cover to cover - you can dive in to a specific chapter without needing context information from previous chapters.

I think the primary audience is folks who are new to the NetBeans IDE. It is important to note, however, that experienced users of the IDE can also benefit from having a copy. If you are an experienced user of the NetBeans IDE and you want to learn more about the NetBeans Visual Web Pack or the Enterprise Pack or the UML support or Project Jackpot or the IDE's database explorer or collaboration features then there are plenty of online articles and tutorials available. But this book is the only thing you can get in hard copy that describes those features. So if you really like having a physical book, this might be one you should consider buying.

A few specific things I liked about the book:

  • It is based on one developer's experiences with the NetBeans IDE. It is not that I dislike books with multiple authors (I even contributed to one), but it is nice to read something written in a single voice. Frequently you will see phrases such as "I have made extensive use of..." which provide practical advice on day-to-day usage of the IDE.

  • There are feature tips sprinkled throughout the text. Most of these were not news to me, but a few were. Your mileage may vary.

  • In addition to tips on features, there are also some detailed descriptions of how to avoid problems. For example, practical information on how to configure WebLogic in order to prevent it from using so much memory.

  • The book covers version 5.5 of the NetBeans IDE, which is the current release. There are a few spots, however, where it also describes features that are coming in NetBeans 6.0, so the author has obviously been experimenting with either the daily or milestone builds of 6.0.

  • There is a chapter on how to use Cobertura within the NetBeans IDE. I am not familiar with Cobertura (although it looks interesting), but I really liked the information on how to integrate a third-party tool into the IDE.

And now, a few minor complaints:

  • Despite being listed as one of the author's favorite features, there is no information on how to use the NetBeans Profiler. There is, however, information included on how to install it and do some configuration. (Just FYI, there is an online tutorial for those who are interested.)

  • It would have been helpful if even more links to additional resources were included. For example, the chapters on using the Visual Web Pack and the Enterprise Pack do a good job of providing the basics and therefore whetting your appetite, but to really get into it you will need additional tutorials; good starting points are here and here.

  • I would have preferred the web services information in chapter 6 instead of chapter 7. I understand the reasoning behind why it was put in chapter 7, but I hope folks realize that full support for JAX-WS development is in the standard NetBeans IDE - the NetBeans Enterprise Pack is not required in order to develop web services.

So all in all, a worthwhile read. I am hoping there will be future editions as the NetBeans IDE continues to evolve.



Tracking Down Memory Leaks, Part 1

Posted by gsporar on April 01, 2007 at 05:43 PM | Permalink | Comments (1)

The April, 2007 issue of Software Test & Performance magazine has an article that I wrote with Sundar. Our original title was not very snazzy: "Tracking Down Memory Leaks, Part 1," so they changed it to "Baffled by Brain Drain In Your Java Apps?"

The idea behind it is drawn from several sources. I did a BOF last year at JavaOne where I talked about the different types of tools available for tracking down memory leaks in Java applications. I firmly believe that the tool/technique you should use depends upon your situation.

It is important to note that in that BOF I was only talking about what I refer to as memory leaks on the "regular" heap. In other words, leaks that occur in the permanent generation were out of scope. In part that was because I don't have much real-world experience dealing with problems in the permanent generation.

When the article was proposed it seemed to me that permanent generation leaks needed to be included. That naturally led me to Sundar, who had been writing really excellent blog entries on how to use jhat (an essential tool for tracking down permanent generation leaks).

Once we started pulling everything together, it became obvious that it was too much for one article, so this first article is about "regular" heap memory leaks only. The May issue should contain Part 2 which will cover permanent generation memory leaks. For that Part 2 article we also added the very knowledgeable Frank Kieviet as an additional author. Frank had been writing some excellent blogs about the pains of debugging permanent generation memory leaks.

One of the nice things about Software Test & Performance magazine is they make their print edition available as a .pdf file. Reading the article in the .pdf file makes it easy to click on all the links we provide. Gathering together all those links was one of the main things I wanted to accomplish with this article.

I had also been hoping to write an error-free article. Alas, that did not happen. This always seems to be the case... we reviewed it and proofread it over and over again. Alas, two errors and one typo did creep in:

  • In the description of the output from the -verbose:gc command line option, there is this sentence: "The number in parentheses is the total amount of free heap space." That is incorrect. It is the total amount of heap space (not counting the permanent generation), minus one of the survivor spaces. More information here.

  • In the section on generating a heap memory snapshot file, there is this sentence: "A Ctrl-\ (or Ctrl-Break in Windows) at the console of your application will end the application and create the snapshot file." That is partially correct - the snapshot file will get created but the application is not terminated and will continue to run.

  • The typo is pretty minor. This command line flag is specified: "Xrunhprof:heap=dump,format=b" and it should begin with a hyphen, in other words: "-Xrunhprof:heap=dump,format=b" That problem got introduced during the production process at the magazine. That only one minor typo snuck in is a testament to the quality controls at the magazine. Further, I really enjoyed the back-and-forth of the editing process with Eddie Correia.

One final note: at this year's JavaOne, Frank and Edward Chou will be doing a BOF on the topic of permanent generation memory leaks. I'm hoping Frank and Edward will show up for JavaOne one day early in order to attend NetBeans Day on May 7. If you plan to be in the San Francisco area that day, be sure to join us - it is a free event, but you do have to register.





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds