<?xml version="1.0" encoding='utf-8'?>
<!-- 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
-->
<?xml-stylesheet type="text/xsl" href="http://ensode.net/roller/roller-ui/styles/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom">
    <title type="html">David R. Heffelfinger</title>
    <subtitle type="html">Software Development Notes</subtitle>
    <id>http://ensode.net/roller/dheffelfinger/feed/entries/atom</id>
        <link rel="self" type="application/atom+xml" href="http://ensode.net/roller/dheffelfinger/feed/entries/atom?cat=NetBeans" />
    <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/" />
    <updated>2025-08-06T01:58:20-04:00</updated>
    <generator uri="http://roller.apache.org" version="6.1.5">Apache Roller</generator>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/screencast_and_code_for_my</id>
        <title type="html">Screencast and Code for my JavaOne Java EE 7 / HTML 5 Presentation</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/screencast_and_code_for_my"/>
        <published>2013-09-26T02:46:06-04:00</published>
        <updated>2013-09-26T02:47:33-04:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="html5" scheme="http://roller.apache.org/ns/tags/" />
        <category term="javaee" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jsf" scheme="http://roller.apache.org/ns/tags/" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <category term="websocket" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">
&lt;p&gt;&lt;p&gt;Earlier this week I had the pleasure and the privilege to give a talk at the 2013 JavaOne conference. The session was very well attended and liked.&lt;/p&gt;&lt;p&gt;In the session I gave a demo on how to develop JSF applications using HTML 5 friendly markup, that is, no JSF specific tags, instead using regular HTML 5 input fields with JSF attributes to bind user input to a CDI managed bean. I started the application using a sample Websocket application included with NetBeans as a base.&lt;br&gt;&lt;/p&gt;&lt;p&gt; Then I finished the demo by adding developing a Java EE Websocket server endpoint that returned a JSON containing data to populate the JSF/HTML5 page, and finally added some Javascript to the page to parse the JSON and populate the page. &lt;br&gt;&lt;/p&gt;&lt;p&gt;After the talk was over, a number of attendees asked for the source code to the demo. I wasn&amp;#39;t expecting to be asked for the source code, so I hadn&amp;#39;t uploaded it anywhere, but since there was demand for it, I just uploaded a zip file containing all of the demo source code. Feel free to &lt;a href=&quot;http://ensode.net/downloads/Echo.zip&quot;&gt;download&lt;/a&gt; it and use it as you please.&lt;/p&gt;&lt;p&gt;Additionally, if you weren&amp;#39;t able to make it to the talk, I just uploaded a screencast of the demo to Youtube, you can find it &lt;a href=&quot;http://www.youtube.com/watch?v=jfQ0A-zgXd4&quot;&gt;here&lt;/a&gt;, or, even easier, embedded below. &lt;/p&gt;&lt;p&gt;If you would like to learn more about Java EE development with NetBeans, please check out my &lt;a href=&quot;http://www.packtpub.com/java-ee-development-with-netbeans-7/video&quot;&gt;Java EE Development with NetBeans&lt;/a&gt; video course.&lt;/p&gt;&lt;p&gt; &lt;br&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/p&gt;


&lt;p&gt;&lt;/p&gt;

</content>
    </entry>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/my_new_java_ee_development</id>
        <title type="html">My New Java EE Development With NetBeans Video Course is now available</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/my_new_java_ee_development"/>
        <published>2013-08-01T12:00:13-04:00</published>
        <updated>2013-08-01T12:00:13-04:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <content type="html">
&lt;p&gt;&lt;p&gt;For the past several months I&amp;#39;ve been diligently working on developing a &lt;b&gt;Java EE Development with NetBeans&lt;/b&gt; video course.&lt;/p&gt;&lt;p&gt;&amp;nbsp;The course has just been published by Packt Publishing and is available for download at &lt;a href=&quot;http://www.packtpub.com/java-ee-development-with-netbeans-7/video&quot;&gt;http://www.packtpub.com/java-ee-development-with-netbeans-7/video&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;It covers all of the most popular Java EE Technologies and APIs including JSF, Facelets, EJB, and JPA, as well as many NetBeans specific tips and tricks to boost productivity.&lt;br&gt;&lt;/p&gt;&lt;/p&gt;

</content>
    </entry>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/netbeans_tip_quickly_opening_windows</id>
        <title type="html">NetBeans Tip: Quickly opening windows without memorizing keyboard shortcuts</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/netbeans_tip_quickly_opening_windows"/>
        <published>2012-11-06T17:05:05-05:00</published>
        <updated>2012-11-06T20:44:53-05:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <category term="tip" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">
&lt;p&gt;&lt;p&gt;When working with NetBeans, sometimes I need to open a window to look at some information (breakpoints, output, etc). Windows can be accessed by going to the &amp;quot;Windows&amp;quot; pull down menu, then selecting the appropriate window, or, most windows have a keyboard shortcut (ctrl+1 for projects, for example).&lt;/p&gt;&lt;p&gt;The &amp;quot;Window&amp;quot; menu has several submenus, and it is not always entirely obvious where a specific window may be (the &amp;quot;Terminal&amp;quot; window, for example, is under &amp;quot;Output&amp;quot;).&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;img vspace=&quot;0&quot; hspace=&quot;0&quot; border=&quot;0&quot; align=&quot;bottom&quot; src=&quot;http://ensode.net/roller/dheffelfinger/resource/netbeans_window_menu.png&quot; alt=&quot;NetBeans Window Menu&quot;&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;Sometimes I would like to open a window, but I&amp;#39;m not sure exactly where it is located, and I don&amp;#39;t know it&amp;#39;s keyboard shortcut.&lt;/p&gt;&lt;p&gt;Fortunately NetBeans has a &amp;quot;Quick Search&amp;quot; text field at the top right, and typing the name of the window makes it appear in the search results, therefore, if I want to open the &amp;quot;Breakpoints&amp;quot; window, for example, all I have to do is type &amp;quot;Breakpoints&amp;quot; in the quick search&lt;/p&gt;&lt;p&gt;&lt;img vspace=&quot;0&quot; hspace=&quot;0&quot; border=&quot;0&quot; align=&quot;bottom&quot; src=&quot;http://ensode.net/roller/dheffelfinger/resource/netbeans_search_window.png&quot; alt=&quot;NetBeans search window&quot;&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;/p&gt;

</content>
    </entry>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/java_one_jsf_with_netbeans</id>
        <title type="html">Java One JSF with NetBeans BOF Demo</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/java_one_jsf_with_netbeans"/>
        <published>2012-10-06T16:18:31-04:00</published>
        <updated>2012-10-06T16:18:31-04:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="javaone" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jp" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jsf" scheme="http://roller.apache.org/ns/tags/" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">
&lt;p&gt;&lt;p&gt;I had the pleasure of being a speaker at this year&amp;#39;s JavaOne conference. One of the sessions I participated was a Birds of a Feather (BOF) session on JSF development with the NetBeans IDE.&lt;/p&gt;&lt;p&gt;During the demo I showed how a complete, nice looking application can be developed in only a few minutes using NetBeans.&lt;/p&gt;&lt;p&gt;For the benefit of those that couldn&amp;#39;t attend the session, here is a video of said demonstration.&lt;/p&gt;&lt;p&gt;For those that want to learn more, I wrote a &lt;a href=&quot;http://www.packtpub.com/java-ee-6-development-with-netbeans-7/book&quot;&gt;book on NetBeans and Java EE&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;/p&gt;


&lt;p&gt;&lt;/p&gt;

</content>
    </entry>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/new_spring_to_java_ee</id>
        <title type="html">New Spring to Java EE Migration Article Series</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/new_spring_to_java_ee"/>
        <published>2011-11-02T10:41:54-04:00</published>
        <updated>2011-11-02T10:41:54-04:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="ee" scheme="http://roller.apache.org/ns/tags/" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <category term="spring" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">
&lt;p&gt;&lt;p&gt;For the past few weeks I&amp;#39;ve been working on a new article series for the&amp;nbsp;&lt;a href=&quot;http://www.oracle.com/technetwork/index.html&quot;&gt;Oracle Technology Network&lt;/a&gt;. The topic of the series is Spring to Java EE migration using the NetBeans IDE.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.oracle.com/technetwork/articles/java/springtojavaee-522240.html&quot;&gt;Part 1&lt;/a&gt; of the series was just published. In this part we begin migrating Spring&amp;#39;s sample Pet Clinic application to standard Java EE APIs such as JavaServer Faces (JSF) and the Java Persistence API (JPA), while showcasing time saving NetBeans features such as JPA entity generation.&lt;/p&gt;&lt;/p&gt;

</content>
    </entry>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/java_ee_6_development_with</id>
        <title type="html">Java EE 6 Development With NetBeans 7</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/java_ee_6_development_with"/>
        <published>2011-06-29T23:03:14-04:00</published>
        <updated>2011-07-28T12:33:14-04:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <content type="html">
&lt;p&gt;&lt;p&gt;A new edition of my NetBeans book has recently been published by Packt Publishing.&amp;nbsp; &lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://link.packtpub.com/6tBBvi&quot; title=&quot;Java EE 6 Development With NetBeans 7&quot;&gt;&lt;img align=&quot;baseline&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; border=&quot;0&quot; src=&quot;http://ensode.net/images/java_ee_7_with_netbeans_7_book.jpg&quot; alt=&quot;Java EE 6 Development With NetBeans 7&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;The book covers NetBeans 7&amp;#39;s support for all major Java EE 6 APIs, &lt;br&gt;
including JSF 2.0, EJB 3.1, JPA 2.0, CDI 1.0 and Servlets 3.0. The book &lt;br&gt;
also covers NetBeans support for PrimeFaces, a very popular high quality&lt;br&gt;
 JSF 2.0 component library.&lt;br&gt;&lt;br&gt;Development of web applications taking advantage of new Servlet 3.0 and JSF 2.0 features is covered. New&lt;br&gt;
 JSF 2.0 features such as XML-less configuration, project stages, new &lt;br&gt;
JSF 2.0 conventions, resource directories, Facelets templating &lt;br&gt;
(including predefined templates included with NetBeans) are covered as &lt;br&gt;
well. The book also explains how NetBeans can help application &lt;br&gt;
developers build JSF 2.0 components using markup only, without having to&lt;br&gt;
 develop any Java code.&lt;br&gt;&lt;br&gt;The book explains how to develop sophisticated JSF 2.0 applications with PrimeFaces.&lt;br&gt;&lt;br&gt;New EJB 3.1 features such as the new EJB timer service are covered. &lt;br&gt;&lt;br&gt;The book also covers NetBeans 7 support for JPA 2.0, including the new &lt;br&gt;
Criteria API, and how to use NetBeans to automatically generate JPA code&lt;br&gt;
 from existing databases; as well as generating complete Java EE CRUD &lt;br&gt;
applications from an existing database schema.&lt;br&gt;&lt;br&gt;Contexts and Dependency Injection (CDI) is covered as well, including coverage of CDI&lt;br&gt;
 named beans, scopes, CDI Qualifiers, Stereotypes and Interceptor &lt;br&gt;
Binding Types are covered as well.&lt;br&gt;&lt;br&gt;After finishing the book, readers not only will be well versed in the latest Java EE technologies,&lt;br&gt;
 but they will also be able to take advantage of NetBeans 7 &lt;br&gt;
functionality that allows developing Java EE applications in record &lt;br&gt;
time.&lt;/p&gt;&lt;/p&gt;

</content>
    </entry>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/netbeans_visual_web_pack_dead</id>
        <title type="html">NetBeans Visual Web Pack Dead, What a Shame</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/netbeans_visual_web_pack_dead"/>
        <published>2009-06-26T23:57:10-04:00</published>
        <updated>2009-06-26T23:57:10-04:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <content type="html">
&lt;p&gt;&lt;p&gt;&lt;br&gt;
One of the features I really liked about NetBeans was it&amp;#39;s Visual Web Pack (VWP) functionality, it allowed developing the GUI of a JSF application by simply dragging and dropping components from a palette into the page.&lt;/p&gt;&lt;p&gt;Although I have no trouble actually typing code or markup by hand, especially with a&amp;nbsp; good code editor such as the one provided by NetBeans, the convenience of VWP didn&amp;#39;t stop with the visual drag and drop.&lt;/p&gt;&lt;p&gt;When creating a VWP page, a managed bean was created automatically, and automatically added to &lt;code&gt;faces-config.xml&lt;/code&gt;. Although on the surface this sounds simple, it was a big time saver. Additionally, a database table could be dragged to some of the components, and a lot of &amp;quot;plumbing&amp;quot; code was automatically generated to display or update, as illustrated in &lt;a href=&quot;http://www.netbeans.org/kb/60/web/helloweb.html&quot;&gt;this tutorial&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Visual Web Pack used the &lt;a href=&quot;https://woodstock.dev.java.net/&quot;&gt;Woodstock JSF component library&lt;/a&gt;, in October 2008, Sun announced that it would be &lt;a href=&quot;http://www.nabble.com/Re%3A-project-status-p20239202.html&quot;&gt;abandoning project Woodstock&lt;/a&gt;, but luckily provided a migration path to IceFaces, going as far as having IceFaces provide a VWP plugin for NetBeans. Unfortunately it looked like this was the beginning of the end of VWP.&lt;br&gt;&lt;/p&gt;&lt;p&gt;I actually used the IceFaces VWP NetBeans plugin for a small project, although &lt;a href=&quot;http://www.ensode.net/roller/dheffelfinger/entry/netbeans_icefaces_plugin_first_impressions&quot;&gt;my initial impression of the NetBeans IceFaces plugin&lt;/a&gt; was less than favorable, after a while I started liking it. Lately, I&amp;#39;ve been using the NetBeans 6.7 release candidate, one of the first things I did after installing this version of NetBeans was to get the IceFaces NetBeans plugin for it. To my surprise and dismay, it does not provide Visual Web functionality. &lt;/p&gt;&lt;p&gt;It is really unfortunate that for whatever reason, IceFaces decided to drop support for visual web development, as far as I can tell, all their current NetBeans plugin does is provide a palette that introduces markup to JSF pages (mind you, this is not visual), and include the IceFaces libraries in any JSF project declared to use IceFaces. &lt;/p&gt;&lt;p&gt;&lt;img vspace=&quot;0&quot; hspace=&quot;0&quot; border=&quot;0&quot; align=&quot;baseline&quot; alt=&quot;NetBeans Ice Faces plugin screenshot&quot; src=&quot;http://www.ensode.net/roller/dheffelfinger/resource/netbeans_icefaces_plugin_screenshot.png&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Dragging and dropping into markup is not really that useful, we can simply type an opening angled bracket (&amp;quot;&amp;lt;&amp;quot;) and hit &lt;code&gt;ctrl+space&lt;/code&gt; to see all the JSF tags we can use, this is actually faster than moving the hand to the mouse, scroll the components in the palette up and down until we find the one we need, then drag it and drop it to the appropriate location on the page.&lt;/p&gt;&lt;p&gt;The one thing I will miss the most is the automated managed bean generation, in practice, I rarely used the feature where a database table could be visually linked to a JSF component since th generated code was a bit convoluted an unusual. I want to say it used JDBC, but this is not exactly accurate, it used a VWP specific concept of a dataprovider to link the database data to the component, I tend to use JPA in my Java EE projects, the fact that the database table drag and drop functionality did not generate JPA code kept me from using it in my project.&lt;/p&gt;&lt;p&gt;In any case, it looks like VWP is dead, long live VWP! &lt;br&gt;&lt;/p&gt;&lt;/p&gt;

</content>
    </entry>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/netbeans_in_an_old_clunker</id>
        <title type="html">NetBeans in an Old Clunker</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/netbeans_in_an_old_clunker"/>
        <published>2009-01-15T23:53:09-05:00</published>
        <updated>2009-06-26T12:47:53-04:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="javaee" scheme="http://roller.apache.org/ns/tags/" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;p&gt;
For the past few months I&amp;#39;ve been working with a new client that does not allowed personal hardware to be plugged into their network. They provide the hardware for their consultants and employees to use.
&lt;/p&gt;
&lt;p&gt;
The only computer they had available for me was a laptop with great specs (five years ago), 1 GB of RAM, and a 1.6 Gz (single core, but I think it goes without saying) processor.
&lt;/p&gt;
&lt;p&gt;
On this laptop I&amp;#39;ve had to run NetBeans, alongside with JBoss or GlassFish (one of the projects I&amp;#39;m working on uses JBoss another one uses GlassFish).
&lt;/p&gt;
&lt;p&gt;
I&amp;#39;ve always had the fortune of having access to fairly modern hardware, and although I had heard complaints about NetBeans performance, it was always good on the hardware I had available. This situation gave me an opportunity to use NetBeans in, let&amp;#39;s just say, &amp;quot;less than ideal&amp;quot; hardware.
&lt;/p&gt;
&lt;p&gt;
What I have noticed is that NetBeans takes a very long time to initialize, but once it does, it works fine, for the most part. The most noticeable annoyance I have seen is that opening files via the &amp;quot;SHIFT+ALT+O&amp;quot; shortcut is slow, many times I finish typing the file name before the list to pick from pops up.
&lt;/p&gt;
&lt;p&gt;
Even with substandard hardware, for the most part I&amp;#39;ve found that NetBeans performs fairly well.
&lt;/p&gt;</content>
    </entry>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/new_version_of_icefaces_netbeans</id>
        <title type="html">New Version of IceFaces NetBeans Plugin Out</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/new_version_of_icefaces_netbeans"/>
        <published>2009-01-10T18:10:58-05:00</published>
        <updated>2009-06-26T12:47:17-04:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="icefaces" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jsf" scheme="http://roller.apache.org/ns/tags/" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;p&gt;A couple of days ago I noticed that the NetBeans IceFaces plugin had been updated. I wrote my &lt;a href=&quot;http://www.ensode.net/roller/dheffelfinger/entry/netbeans_icefaces_plugin_first_impressions&quot;&gt;initial impressions&lt;/a&gt; about the plugin a while back.&lt;/p&gt;
&lt;p&gt;
I&amp;#39;ve been wanting to take the updated version for a spin, but other commitments have been preventing me from trying it out. Today I had a few minutes to spare so I gave it a try.
&lt;/p&gt;
&lt;p&gt;
I am happy to report that most of the issues I found with the plugin are now fixed. 
&lt;/p&gt;
&lt;p&gt;
Pages developed with the plugin now work with GlassFish 3 effortlessly.
&lt;/p&gt;
&lt;p&gt;
Additionally, I can drop components into the navigator view to avoid the CSS absolute positioning that happens when dropping components directly in the page, please note that I only tried this under Linux, which wasn&amp;#39;t broken to start with; in my previous test I used both a Windows and a Linux box, and only under Windows I wasn&amp;#39;t able to drop components in the navigator.
&lt;/p&gt;
&lt;p&gt;
I was also very glad to be able to change the default package where the automatically generated JSF managed beans get created, it was awful having all of these classes in a package named &amp;quot;WebApplication5&amp;quot; or something along those lines before.
&lt;/p&gt;
&lt;p&gt;
There are a couple of issues that still persist.
&lt;/p&gt;
&lt;p&gt;
The &amp;quot;label&amp;quot; attribute of IceFaces components is still ignored. The weird thing is, it works fine when using Facelets (without visual editing, of course) why doesn&amp;#39;t it work with JSPs with Visual Web is anyone&amp;#39;s guess. When JSF 1.2 came out, I was so glad that we had an easy way to display user friendly error messages, it has been frustrating not to be able to easily use this feature, first with Woodstock and now with IceFaces
&lt;/p&gt;
&lt;p&gt;
Another issue that is still present is that &lt;code&gt;ctrl+shift&lt;/code&gt; dragging from a label or message component into an input component does not yet set the &amp;quot;for&amp;quot; attribute like it was possible with Woodstock. The mouse pointer changes into a crosshair when doing this, also the target component is highlighted when hovering over it, therefore I believe this issue is a bug and not an omission of the feature.
&lt;/p&gt;
&lt;p&gt;
It looks like the folks at IceFaces are making some progress getting this plugin up to speed. Hopefully in the near future the remaining issues will be addressed.
&lt;/p&gt;</content>
    </entry>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/netbeans_icefaces_plugin_first_impressions</id>
        <title type="html">NetBeans IceFaces Plugin First Impressions</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/netbeans_icefaces_plugin_first_impressions"/>
        <published>2008-12-18T23:56:47-05:00</published>
        <updated>2009-06-26T12:47:37-04:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="icefaces" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jsf" scheme="http://roller.apache.org/ns/tags/" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;p&gt;
Recently Sun announced that there will be no further development for Project Woodstock. Some maintenance will be done in the project, but no new features are planned.
&lt;/p&gt;
&lt;p&gt;
This announcement affects NetBeans Visual Web projects, since they use Project Woodstock JSF components behind the scenes.
&lt;/p&gt;
&lt;p&gt;
Sun is now recommending that current Woodstock applications be migrated to IceFaces. An IceFaces plugin has been available for a while to develop JSF applications visually using the IceFaces components, the plugin works in a way that is very similar to the standard Visual Web JSF NetBeans plugin.
&lt;/p&gt;
&lt;p&gt;
Since Woodstock will no longer be developed, I figured now is a good time to take the NetBeans IceFaces plugin for a spin, to see how well it works, turns out, it doesn&amp;#39;t work very well, at least the current version available from the NetBeans Plugin Manager.
&lt;/p&gt;
&lt;p&gt;
The first issue I ran into is that the Java package for managed beans defaults to the project name and cannot be changed. The project name never adheres to standard Java package naming conventions (i.e. com.mycompany.packagename), therefore we end up with classes in nonstandard packages.
&lt;/p&gt;
&lt;p&gt;
Under Windows, I wasn&amp;#39;t able to drag components from the palette into the navigator page, this it is possible using NetBeans standard Visual Web JSF functionality (oddly enough, I was able to do this under Ubuntu Linux). I prefer dropping the components in the navigator page instead of directly in the JSP design view, since dropping the components in the design view results in CSS absolute positioning. I&amp;#39;d rather use the JSF standard way of placing components, which is using a panel grid for layout right inside a JSF form component. This issue can be worked around, by placing a grid in the design view then manually removing its &amp;quot;style&amp;quot; attribute, but it feels cleaner to just drop components in the navigator page.
&lt;/p&gt;
&lt;p&gt;
Also, applications developed using IceFaces cannot be run under GlassFish 3. Maybe there is some faces-config.xml or web.xml incantation that needs to be done in order to make this work, I didn&amp;#39;t try and didn&amp;#39;t research it, all I did was develop a simple test application and try to deploy it.
&lt;/p&gt;
&lt;p&gt;
Here is a partial stack trace from the GlassFish 3 log when attempting to deploy an IceFaces application developed using the NetBeans Plugin:
&lt;/p&gt;
&lt;code&gt;
&lt;/code&gt;&lt;pre&gt;SEVERE: Can&amp;#39;t find TLD for location [http://java.sun.com/jsf/core]. JAR containing the TLD may not be in the classpath
SEVERE: Can&amp;#39;t find TLD for location [http://java.sun.com/jsf/html]. JAR containing the TLD may not be in the classpath
SEVERE: Failed to execute JSP lifecycle.
java.lang.IllegalStateException: ICEfaces parser unable to determine JSF implementation ViewTag class.
        at com.icesoft.faces.webapp.parser.Parser.parse(Parser.java:152)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:528)
        at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:159)
&lt;/pre&gt;

&lt;p&gt;
Additionally, when working with standard Visual Web JSF, the &amp;quot;for&amp;quot; attribute of labels and message components can be set by ctrl+shift dragging from the label or message component to the target component. This functionality is not available in the IceFaces visual plugin.
&lt;/p&gt;
&lt;p&gt;
One thing I was looking forward to was finding out if IceFaces wouldn&amp;#39;t suffer from my Woodstock pet peeve. In JSF 1.2, the &amp;quot;label&amp;quot; attribute was added to all standard JSF input components. This attribute results in user friendly error messages. The JSF message and messages components by default use the component id to identify a validation error in a component, which is meaningless to the user. The label attribute allows the error message to use a user friendly label, as opposed to the component ID.
&lt;/p&gt;
&lt;p&gt;
Woodstock components have a label attribute that, in addition to enabling user friendly error messages as described in the previous paragraph, actually adds a label to the component. Kind of neat, but it also makes it very difficult to right align all the components and left align all the labels like it is usually done in web applications. Therefore, when using Woodstock, there was always this catch-22 between user friendly error messages and ease of component alignment.
&lt;/p&gt;
&lt;p&gt;
One of the first things I tried when testing the IceFaces NetBeans plugin was to set the &amp;quot;label&amp;quot; attribute on an input text component, and set the component&amp;#39;s &amp;quot;required&amp;quot; attribute to &amp;quot;true&amp;quot;. I ran the application, submitted the page (purposefully leaving the required input field blank) braced myself and bam! The component id is still shown in the error message, as opposed to my user friendly label, bummer!
&lt;/p&gt;
&lt;p&gt;
I googled a bit and read some people had success with the label attribute using Facelets. I installed the NetBeans Facelets plugin and redid my simple application using Facelets. This time the label attribute &amp;quot;kicked in&amp;quot; and worked as expected.  
&lt;/p&gt;
&lt;p&gt;
Although I am not afraid to code things by hand, especially with excellent code/tag completion support like the one found in NetBeans, Visual web provides a nice way to preview a page while working with it, this functionality is lost when using Facelets with NetBeans.
&lt;/p&gt;
&lt;p&gt;
I guess the plugin is &amp;quot;almost there&amp;quot;, but the fact that the &amp;quot;label&amp;quot; attribute is ignored is a big bummer. Also, I miss the ability to drop components from the palette into the navigator window, bypassing CSS absolute positioning.
&lt;/p&gt;
&lt;p&gt;
Other functionality we are used to from Visual Web JSF is still there. A request scoped managed bean is created for each IceFaces visual page we create (one caveat, the default package for these managed beans can&amp;#39;t be changed, it defaults to the project name, which does not adhere to standard java package naming conventions). Also, double clicking on a command button automatically creates a method on the managed bean to handle its action event.
&lt;/p&gt;
&lt;p&gt;
Although I don&amp;#39;t have a lot of experience with this plugin, my impression is that it is better than coding JSF applications by hand, but I really miss some of the missing features from the standard Visual Web JSF functionality.
&lt;/p&gt;
&lt;p&gt;
I would also like to clarify that this entry is not meant to knock IceFaces. I&amp;#39;ve seen the IceFaces demo apps and I can see that it eases creation of very sophisticated and elegant web applications, I just found some issues with the IceFaces NetBeans plugin that I hope will be addressed in the near future.
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;Update:&lt;/b&gt; a new version of the plugin came out, I tested the new version and wrote my thoughts &lt;a href=&quot;http://www.ensode.net/roller/dheffelfinger/entry/new_version_of_icefaces_netbeans&quot;&gt;here&lt;/a&gt;.
&lt;/p&gt;</content>
    </entry>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/netbeans_podcast_interview_just_finished</id>
        <title type="html">NetBeans Podcast Interview Just Finished</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/netbeans_podcast_interview_just_finished"/>
        <published>2008-12-12T12:10:30-05:00</published>
        <updated>2009-06-26T12:46:33-04:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="javaee" scheme="http://roller.apache.org/ns/tags/" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;p&gt;
My &lt;a href=&quot;http://ensode.net/roller/dheffelfinger/entry/netbeans_podcast_interview&quot;&gt;NetBeans Podcast Interview&lt;/a&gt; just finished a few minutes ago. 
&lt;/p&gt;
&lt;p&gt;
We talked about NetBeans, Java EE and &lt;a href=&quot;http://www.amazon.com/gp/product/1847195466?ie=UTF8&amp;amp;tag=ensode-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1847195466&quot;&gt;my book&lt;/a&gt;&lt;img height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; style=&quot;border:medium none  ! important;margin:0px ! important;&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=ensode-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=1847195466&quot;&gt;. 
&lt;/p&gt;
&lt;p&gt;
There were some interesting questions regarding NetBeans and Java EE, in addition to questions about how I got involved with my publisher, Packt Publishing, and how I got the idea of writing a book about NetBeans.
&lt;/p&gt;
&lt;p&gt;
The &lt;a href=&quot;http://blogs.sun.com/nbpodcast/&quot;&gt;podcast&lt;/a&gt; is scheduled to come out sometime this month.
&lt;/p&gt;</content>
    </entry>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/netbeans_podcast_interview</id>
        <title type="html">NetBeans Podcast Interview</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/netbeans_podcast_interview"/>
        <published>2008-12-06T01:59:09-05:00</published>
        <updated>2009-06-26T12:46:14-04:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;p&gt;
I was just invited to be interviewed in the next &lt;a href=&quot;http://blogs.sun.com/nbpodcast/&quot;&gt;NetBeans Podcast&lt;/a&gt;. &lt;a href=&quot;http://blogs.sun.com/geertjan/&quot;&gt;Geertjan Wielenga&lt;/a&gt; and Lloyd Dunn will be asking me questions about my new book, &lt;a href=&quot;http://www.amazon.com/gp/product/1847195466?ie=UTF8&amp;amp;tag=ensode-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1847195466&quot;&gt;Java EE 5 Development with NetBeans 6&lt;/a&gt;&lt;img height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; style=&quot;border:medium none  ! important;margin:0px ! important;&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=ensode-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=1847195466&quot;&gt;
&lt;/p&gt;
&lt;p&gt;
I&amp;#39;m very excited about the opportunity to be a part of an episode of the NetBeans podcast, I&amp;#39;ve been listening to it for the past several month to keep up to date on what is going on in the NetBeans world.
&lt;/p&gt;</content>
    </entry>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/netbeans_6_5_final_now</id>
        <title type="html">NetBeans 6.5 Final Now Available</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/netbeans_6_5_final_now"/>
        <published>2008-11-19T15:06:28-05:00</published>
        <updated>2009-06-26T11:52:11-04:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="ee" scheme="http://roller.apache.org/ns/tags/" />
        <category term="j2ee" scheme="http://roller.apache.org/ns/tags/" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;p&gt;
It has come to my attention that NetBeans 6.5 final &lt;a href=&quot;http://www.netbeans.org/servlets/NewsItemView?newsItemID=1313&quot;&gt;is now available&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
It can be downloaded from the &lt;a href=&quot;http://www.netbeans.org/&quot;&gt;NetBeans web site&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
If you would like to learn the ins and outs of enterprise Java development, my book, &lt;a href=&quot;http://www.amazon.com/gp/product/1847195466?ie=UTF8&amp;amp;tag=ensode-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1847195466&quot;&gt;Java EE 5 Development with NetBeans 6&lt;/a&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; style=&quot;border:medium none  ! important;margin:0px ! important;&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=ensode-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=1847195466&quot;&gt;, may help.
&lt;/p&gt;</content>
    </entry>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/javaranch_book_promotion_over</id>
        <title type="html">JavaRanch Book Promotion Over</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/javaranch_book_promotion_over"/>
        <published>2008-11-09T00:13:13-05:00</published>
        <updated>2008-11-09T00:13:13-05:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="j2ee" scheme="http://roller.apache.org/ns/tags/" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;p&gt;The &lt;a href=&quot;http://www.javaranch.com&quot;&gt;JavaRanch&lt;/a&gt; book promotion we had this week for my new book, &lt;a href=&quot;http://www.packtpub.com/java-ee5-development-with-netbeans-6/book&quot;&gt;Java EE 5 Development With NetBeans 6&lt;/a&gt; is now over.&lt;/p&gt;
&lt;p&gt;
There were many good questions over the week about the book and NetBeans in general.
&lt;/p&gt;
&lt;p&gt;
I would like to personally congratulate all the &amp;quot;Java Ranchers&amp;quot; that won a free copy of the book:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt; renu richard
&lt;li&gt; Peter Johnson
&lt;li&gt; Rogerio Kioshi
&lt;li&gt; Ankit Garg 
&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/ul&gt;

Congratulations to all!</content>
    </entry>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/java_ee_development_with_netbeans</id>
        <title type="html">Java EE Development With NetBeans 6 has been published</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/java_ee_development_with_netbeans"/>
        <published>2008-10-31T11:43:09-04:00</published>
        <updated>2009-06-26T13:02:03-04:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="j2ee" scheme="http://roller.apache.org/ns/tags/" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;p&gt;I&amp;#39;m pleased to announce that my latest book, &lt;b&gt;Java EE Development With NetBeans 6&lt;/b&gt; has been published.&lt;/p&gt;

&lt;a href=&quot;http://www.packtpub.com/java-ee5-development-with-netbeans-6/book&quot;&gt;&lt;img alt=&quot;Java EE 5 Development With NetBeans 6&quot; src=&quot;http://images.packtpub.com/images/100x123/1847195466.png&quot;&gt;&lt;/a&gt;

&lt;p&gt;The book covers several aspects of Java EE development using NetBeans, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Visual Web JSF Development
&lt;/li&gt;&lt;li&gt;JPA development, including automatic JPA generation from existing database schemas.
&lt;/li&gt;&lt;li&gt;Automated JSF CRUD application generation from existing JPA entities
&lt;/li&gt;&lt;li&gt;EJB 3 development, including session and message driven beans.
&lt;/li&gt;&lt;li&gt;Debugging Java EE applications with the NetBeans debugger
&lt;/li&gt;&lt;li&gt;Profiling Java EE applications with the NetBeans profiler
&lt;/li&gt;&lt;li&gt;Additional Java EE Development Topics
&lt;/li&gt;&lt;/ul&gt;

I have been working on the book for the past several months, I am glad to finally see the fruits of my labor.</content>
    </entry>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/netbeans_book_promotion_next_week</id>
        <title type="html">NetBeans Book Promotion Next Week On JavaRanch</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/netbeans_book_promotion_next_week"/>
        <published>2008-10-28T01:10:46-04:00</published>
        <updated>2009-06-26T13:01:44-04:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="j2ee" scheme="http://roller.apache.org/ns/tags/" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">
&lt;p&gt;&lt;div style=&quot;margin:10px;float:left;&quot;&gt;&lt;br&gt;
&lt;a href=&quot;http://www.packtpub.com/java-ee5-development-with-netbeans-6/book&quot;&gt;&lt;img alt=&quot;Java EE 5 Development With NetBeans 6&quot; src=&quot;http://images.packtpub.com/images/100x123/1847195466.png&quot;&gt;&lt;/a&gt;&lt;br&gt;
&lt;/div&gt;&lt;/p&gt;


&lt;p&gt;Next week I&amp;#39;ll be discussing my new book, &lt;b&gt;Java EE 5 Development With NetBeans 6&lt;/b&gt; in the &lt;a href=&quot;http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=forum&amp;amp;f=12&quot;&gt;IDEs, Version Control and other tools&lt;/a&gt; of the &lt;a href=&quot;http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi&quot;&gt;JavaRanch Big Moose Saloon&lt;/a&gt;.&lt;/p&gt;


&lt;p&gt;I will be answering questions about the book, Java EE 5 and NetBeans.&lt;/p&gt;


&lt;p&gt;See you there!&lt;/p&gt;

</content>
    </entry>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/netbeans_book_title_changed</id>
        <title type="html">NetBeans Book Title Changed</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/netbeans_book_title_changed"/>
        <published>2008-10-23T23:12:12-04:00</published>
        <updated>2009-06-26T13:01:10-04:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="ee" scheme="http://roller.apache.org/ns/tags/" />
        <category term="j2ee" scheme="http://roller.apache.org/ns/tags/" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">
&lt;p&gt;After some discussion with the publisher, we decided to change the title of my NetBeans book scheduled to be released very soon.&lt;/p&gt;


&lt;p&gt;The new title is &amp;quot;Java EE 5 Development With NetBeans 6&amp;quot;, the main reason for the change is that we wanted to have version numbers in the title, so that the title gives a better idea of exactly what is covered.&lt;/p&gt;


&lt;p&gt;I would like to clarify that the book targets NetBeans 6.5, however, most of the material is applicable to NetBeans 6.0 and 6.1, therefore we decided to just state &amp;quot;NetBeans 6&amp;quot; in the title, since the material applies to any NetBeans 6.X version.&lt;/p&gt;

</content>
    </entry>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/netbeans_6_5_rc1_released</id>
        <title type="html">NetBeans 6.5 RC1 Released</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/netbeans_6_5_rc1_released"/>
        <published>2008-10-22T16:45:03-04:00</published>
        <updated>2009-06-26T13:00:53-04:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">
&lt;p&gt;NetBeans 6.5 RC1 available, it can be found at &lt;a href=&quot;http://download.netbeans.org/netbeans/6.5/rc/&quot;&gt;http://download.netbeans.org/netbeans/6.5/rc/&lt;/a&gt;.&lt;/p&gt;


&lt;p&gt;My soon to be published book, &lt;a href=&quot;http://www.packtpub.com/java-ee5-development-with-netbeans-6&quot;&gt;Java EE Development With NetBeans&lt;/a&gt;, covers NetBeans 6.5.&lt;/p&gt;

</content>
    </entry>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/netbeans_6_5_rc1_to</id>
        <title type="html">Netbeans 6.5 RC1 to be released soon</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/netbeans_6_5_rc1_to"/>
        <published>2008-10-17T22:43:57-04:00</published>
        <updated>2009-06-26T13:00:24-04:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">
&lt;p&gt;The NetBeans Core QA Team has announced that &lt;a href=&quot;http://blogs.sun.com/coreqa/entry/release_candidate_one_is_on&quot;&gt;NetBeans 6.5 RC1 will be released soon&lt;/a&gt; . It is expected to be available this afternoon.&lt;/p&gt;


&lt;p&gt;I would like this opportunity to mention that my new &lt;a href=&quot;http://www.packtpub.com/java-ee5-development-with-netbeans-6/book&quot;&gt;NetBeans Book&lt;/a&gt; covers NetBeans 6.5.&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;http://www.packtpub.com/java-ee5-development-with-netbeans-6/book&quot;&gt;&lt;img alt=&quot;Java EE Development With NetBeans Book&quot; src=&quot;http://images.packtpub.com/images/100x123/1847195466.png&quot;&gt;&lt;/a&gt;&lt;/p&gt;

</content>
    </entry>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/netbeans_ide_turning_10_years</id>
        <title type="html">NetBeans IDE Turning 10 Years Old</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/netbeans_ide_turning_10_years"/>
        <published>2008-10-15T23:35:23-04:00</published>
        <updated>2009-06-26T13:00:38-04:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">
&lt;p&gt;&lt;img src=&quot;http://www.ensode.net/roller/dheffelfinger/resource/logo-10y-nb-outline-180.png&quot;&gt;&lt;/p&gt;


&lt;p&gt;The &lt;a href=&quot;http://www.netbeans.org&quot;&gt;NetBeans&lt;/a&gt; IDE will turn 10 years old this month.&lt;/p&gt;


&lt;p&gt;To celebrate, the NetBeans team is planning several activities. Check it out at &lt;a href=&quot;http://www.netbeans.org/birthday/&quot;&gt;http://www.netbeans.org/birthday/&lt;/a&gt;.&lt;/p&gt;

</content>
    </entry>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/automated_dao_generation_from_jpa</id>
        <title type="html">Automated DAO Generation from JPA Entities with NetBeans</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/automated_dao_generation_from_jpa"/>
        <published>2008-10-13T23:53:27-04:00</published>
        <updated>2009-06-26T12:59:35-04:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="dao" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jpa" scheme="http://roller.apache.org/ns/tags/" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">
&lt;p&gt;One very nice NetBeans feature is the ability to generate Java Persistence API (JPA) entitites from an existing database schema. NetBeans can also generate complete JSF CRUD applications from JPA entities in a project. Both of these features are covered in detail in my &lt;a href=&quot;http://www.packtpub.com/java-ee5-development-with-netbeans-6/book&quot;&gt;Java EE 5 Development With NetBeans&lt;/a&gt; book.&lt;/p&gt;


&lt;p&gt;As of NetBeans 6.5, scheduled to be released next month, will also add the ability to automatically generate DAO&amp;#39;s (NetBeans calls them controllers, but they are, in fact, Data Access Objects) from existing JPA Entities.&lt;/p&gt;


&lt;p&gt;&lt;img alt=&quot;NetBeans JPA Controller&quot; src=&quot;http://www.ensode.net/roller/dheffelfinger/resource/nb_jpa_controllers.png&quot;&gt;&lt;/p&gt;


&lt;p&gt;This will certainly save us developers a lot of work, here is a sample DAO from generated from the Customer JPA entity discussed in the book:&lt;br&gt;
&lt;pre&gt;&lt;code&gt;&lt;br&gt;
package com.ensode.customerdb.jpacontrollers;&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;


&lt;p&gt;import com.ensode.customerdb.jpa.Customer;&lt;br&gt;
import com.ensode.customerdb.jpacontrollers.exceptions.NonexistentEntityException;&lt;br&gt;
import com.ensode.customerdb.jpacontrollers.exceptions.PreexistingEntityException;&lt;br&gt;
import com.ensode.customerdb.jpacontrollers.exceptions.RollbackFailureException;&lt;br&gt;
import java.util.List;&lt;br&gt;
import javax.annotation.Resource;&lt;br&gt;
import javax.persistence.EntityManager;&lt;br&gt;
import javax.persistence.EntityManagerFactory;&lt;br&gt;
import javax.persistence.PersistenceUnit;&lt;br&gt;
import javax.persistence.Query;&lt;br&gt;
import javax.persistence.EntityNotFoundException;&lt;br&gt;
import com.ensode.customerdb.jpa.CustomerOrder;&lt;br&gt;
import java.util.ArrayList;&lt;br&gt;
import java.util.Collection;&lt;br&gt;
import com.ensode.customerdb.jpa.Address;&lt;br&gt;
import com.ensode.customerdb.jpa.Telephone;&lt;br&gt;
import javax.transaction.UserTransaction;&lt;/p&gt;


&lt;p&gt;/**&lt;br&gt;
 *&lt;br&gt;
 * @author heffel&lt;br&gt;
 */&lt;br&gt;
public class CustomerJpaController {&lt;br&gt;
    @Resource&lt;br&gt;
    private UserTransaction utx = null;&lt;br&gt;
    @PersistenceUnit(unitName = &amp;quot;WebApplication1PU&amp;quot;)&lt;br&gt;
    private EntityManagerFactory emf = null;&lt;/p&gt;


&lt;p&gt;    public EntityManager getEntityManager() {&lt;br&gt;
        return emf.createEntityManager();&lt;br&gt;
    }&lt;/p&gt;


&lt;p&gt;    public void create(Customer customer) throws PreexistingEntityException, RollbackFailureException, Exception {&lt;br&gt;
        if (customer.getCustomerOrderCollection() == null) {&lt;br&gt;
            customer.setCustomerOrderCollection(new ArrayList());&lt;br&gt;
        }&lt;br&gt;
        if (customer.getAddressCollection() == null) {&lt;br&gt;
            customer.setAddressCollection(new ArrayList());&lt;br&gt;
        }&lt;br&gt;
        if (customer.getTelephoneCollection() == null) {&lt;br&gt;
            customer.setTelephoneCollection(new ArrayList());&lt;br&gt;
        }&lt;br&gt;
        EntityManager em = null;&lt;br&gt;
        try {&lt;br&gt;
            utx.begin();&lt;br&gt;
            em = getEntityManager();&lt;br&gt;
            Collection attachedCustomerOrderCollection = new ArrayList();&lt;br&gt;
            for (CustomerOrder customerOrderCollectionCustomerOrderToAttach : customer.getCustomerOrderCollection()) {&lt;br&gt;
                customerOrderCollectionCustomerOrderToAttach = em.getReference(customerOrderCollectionCustomerOrderToAttach.getClass(), customerOrderCollectionCustomerOrderToAttach.getCustomerOrderId());&lt;br&gt;
                attachedCustomerOrderCollection.add(customerOrderCollectionCustomerOrderToAttach);&lt;br&gt;
            }&lt;br&gt;
            customer.setCustomerOrderCollection(attachedCustomerOrderCollection);&lt;br&gt;
            Collection attachedAddressCollection = new ArrayList();&lt;br&gt;
            for (Address addressCollectionAddressToAttach : customer.getAddressCollection()) {&lt;br&gt;
                addressCollectionAddressToAttach = em.getReference(addressCollectionAddressToAttach.getClass(), addressCollectionAddressToAttach.getAddressId());&lt;br&gt;
                attachedAddressCollection.add(addressCollectionAddressToAttach);&lt;br&gt;
            }&lt;br&gt;
            customer.setAddressCollection(attachedAddressCollection);&lt;br&gt;
            Collection attachedTelephoneCollection = new ArrayList();&lt;br&gt;
            for (Telephone telephoneCollectionTelephoneToAttach : customer.getTelephoneCollection()) {&lt;br&gt;
                telephoneCollectionTelephoneToAttach = em.getReference(telephoneCollectionTelephoneToAttach.getClass(), telephoneCollectionTelephoneToAttach.getTelephoneId());&lt;br&gt;
                attachedTelephoneCollection.add(telephoneCollectionTelephoneToAttach);&lt;br&gt;
            }&lt;br&gt;
            customer.setTelephoneCollection(attachedTelephoneCollection);&lt;br&gt;
            em.persist(customer);&lt;br&gt;
            for (CustomerOrder customerOrderCollectionCustomerOrder : customer.getCustomerOrderCollection()) {&lt;br&gt;
                Customer oldCustomerIdOfCustomerOrderCollectionCustomerOrder = customerOrderCollectionCustomerOrder.getCustomerId();&lt;br&gt;
                customerOrderCollectionCustomerOrder.setCustomerId(customer);&lt;br&gt;
                customerOrderCollectionCustomerOrder = em.merge(customerOrderCollectionCustomerOrder);&lt;br&gt;
                if (oldCustomerIdOfCustomerOrderCollectionCustomerOrder != null) {&lt;br&gt;
                    oldCustomerIdOfCustomerOrderCollectionCustomerOrder.getCustomerOrderCollection().remove(customerOrderCollectionCustomerOrder);&lt;br&gt;
                    oldCustomerIdOfCustomerOrderCollectionCustomerOrder = em.merge(oldCustomerIdOfCustomerOrderCollectionCustomerOrder);&lt;br&gt;
                }&lt;br&gt;
            }&lt;br&gt;
            for (Address addressCollectionAddress : customer.getAddressCollection()) {&lt;br&gt;
                Customer oldCustomerIdOfAddressCollectionAddress = addressCollectionAddress.getCustomerId();&lt;br&gt;
                addressCollectionAddress.setCustomerId(customer);&lt;br&gt;
                addressCollectionAddress = em.merge(addressCollectionAddress);&lt;br&gt;
                if (oldCustomerIdOfAddressCollectionAddress != null) {&lt;br&gt;
                    oldCustomerIdOfAddressCollectionAddress.getAddressCollection().remove(addressCollectionAddress);&lt;br&gt;
                    oldCustomerIdOfAddressCollectionAddress = em.merge(oldCustomerIdOfAddressCollectionAddress);&lt;br&gt;
                }&lt;br&gt;
            }&lt;br&gt;
            for (Telephone telephoneCollectionTelephone : customer.getTelephoneCollection()) {&lt;br&gt;
                Customer oldCustomerIdOfTelephoneCollectionTelephone = telephoneCollectionTelephone.getCustomerId();&lt;br&gt;
                telephoneCollectionTelephone.setCustomerId(customer);&lt;br&gt;
                telephoneCollectionTelephone = em.merge(telephoneCollectionTelephone);&lt;br&gt;
                if (oldCustomerIdOfTelephoneCollectionTelephone != null) {&lt;br&gt;
                    oldCustomerIdOfTelephoneCollectionTelephone.getTelephoneCollection().remove(telephoneCollectionTelephone);&lt;br&gt;
                    oldCustomerIdOfTelephoneCollectionTelephone = em.merge(oldCustomerIdOfTelephoneCollectionTelephone);&lt;br&gt;
                }&lt;br&gt;
            }&lt;br&gt;
            utx.commit();&lt;br&gt;
        } catch (Exception ex) {&lt;br&gt;
            try {&lt;br&gt;
                utx.rollback();&lt;br&gt;
            } catch (Exception re) {&lt;br&gt;
                throw new RollbackFailureException(&amp;quot;An error occurred attempting to roll back the transaction.&amp;quot;, re);&lt;br&gt;
            }&lt;br&gt;
            if (findCustomer(customer.getCustomerId()) != null) {&lt;br&gt;
                throw new PreexistingEntityException(&amp;quot;Customer &amp;quot; + customer + &amp;quot; already exists.&amp;quot;, ex);&lt;br&gt;
            }&lt;br&gt;
            throw ex;&lt;br&gt;
        } finally {&lt;br&gt;
            if (em != null) {&lt;br&gt;
                em.close();&lt;br&gt;
            }&lt;br&gt;
        }&lt;br&gt;
    }&lt;/p&gt;


&lt;p&gt;    public void edit(Customer customer) throws NonexistentEntityException, RollbackFailureException, Exception {&lt;br&gt;
        EntityManager em = null;&lt;br&gt;
        try {&lt;br&gt;
            utx.begin();&lt;br&gt;
            em = getEntityManager();&lt;br&gt;
            Customer persistentCustomer = em.find(Customer.class, customer.getCustomerId());&lt;br&gt;
            Collection customerOrderCollectionOld = persistentCustomer.getCustomerOrderCollection();&lt;br&gt;
            Collection customerOrderCollectionNew = customer.getCustomerOrderCollection();&lt;br&gt;
            Collection addressCollectionOld = persistentCustomer.getAddressCollection();&lt;br&gt;
            Collection addressCollectionNew = customer.getAddressCollection();&lt;br&gt;
            Collection telephoneCollectionOld = persistentCustomer.getTelephoneCollection();&lt;br&gt;
            Collection telephoneCollectionNew = customer.getTelephoneCollection();&lt;br&gt;
            Collection attachedCustomerOrderCollectionNew = new ArrayList();&lt;br&gt;
            for (CustomerOrder customerOrderCollectionNewCustomerOrderToAttach : customerOrderCollectionNew) {&lt;br&gt;
                customerOrderCollectionNewCustomerOrderToAttach = em.getReference(customerOrderCollectionNewCustomerOrderToAttach.getClass(), customerOrderCollectionNewCustomerOrderToAttach.getCustomerOrderId());&lt;br&gt;
                attachedCustomerOrderCollectionNew.add(customerOrderCollectionNewCustomerOrderToAttach);&lt;br&gt;
            }&lt;br&gt;
            customerOrderCollectionNew = attachedCustomerOrderCollectionNew;&lt;br&gt;
            customer.setCustomerOrderCollection(customerOrderCollectionNew);&lt;br&gt;
            Collection attachedAddressCollectionNew = new ArrayList();&lt;br&gt;
            for (Address addressCollectionNewAddressToAttach : addressCollectionNew) {&lt;br&gt;
                addressCollectionNewAddressToAttach = em.getReference(addressCollectionNewAddressToAttach.getClass(), addressCollectionNewAddressToAttach.getAddressId());&lt;br&gt;
                attachedAddressCollectionNew.add(addressCollectionNewAddressToAttach);&lt;br&gt;
            }&lt;br&gt;
            addressCollectionNew = attachedAddressCollectionNew;&lt;br&gt;
            customer.setAddressCollection(addressCollectionNew);&lt;br&gt;
            Collection attachedTelephoneCollectionNew = new ArrayList();&lt;br&gt;
            for (Telephone telephoneCollectionNewTelephoneToAttach : telephoneCollectionNew) {&lt;br&gt;
                telephoneCollectionNewTelephoneToAttach = em.getReference(telephoneCollectionNewTelephoneToAttach.getClass(), telephoneCollectionNewTelephoneToAttach.getTelephoneId());&lt;br&gt;
                attachedTelephoneCollectionNew.add(telephoneCollectionNewTelephoneToAttach);&lt;br&gt;
            }&lt;br&gt;
            telephoneCollectionNew = attachedTelephoneCollectionNew;&lt;br&gt;
            customer.setTelephoneCollection(telephoneCollectionNew);&lt;br&gt;
            customer = em.merge(customer);&lt;br&gt;
            for (CustomerOrder customerOrderCollectionOldCustomerOrder : customerOrderCollectionOld) {&lt;br&gt;
                if (!customerOrderCollectionNew.contains(customerOrderCollectionOldCustomerOrder)) {&lt;br&gt;
                    customerOrderCollectionOldCustomerOrder.setCustomerId(null);&lt;br&gt;
                    customerOrderCollectionOldCustomerOrder = em.merge(customerOrderCollectionOldCustomerOrder);&lt;br&gt;
                }&lt;br&gt;
            }&lt;br&gt;
            for (CustomerOrder customerOrderCollectionNewCustomerOrder : customerOrderCollectionNew) {&lt;br&gt;
                if (!customerOrderCollectionOld.contains(customerOrderCollectionNewCustomerOrder)) {&lt;br&gt;
                    Customer oldCustomerIdOfCustomerOrderCollectionNewCustomerOrder = customerOrderCollectionNewCustomerOrder.getCustomerId();&lt;br&gt;
                    customerOrderCollectionNewCustomerOrder.setCustomerId(customer);&lt;br&gt;
                    customerOrderCollectionNewCustomerOrder = em.merge(customerOrderCollectionNewCustomerOrder);&lt;br&gt;
                    if (oldCustomerIdOfCustomerOrderCollectionNewCustomerOrder != null &amp;amp;&amp;amp; !oldCustomerIdOfCustomerOrderCollectionNewCustomerOrder.equals(customer)) {&lt;br&gt;
                        oldCustomerIdOfCustomerOrderCollectionNewCustomerOrder.getCustomerOrderCollection().remove(customerOrderCollectionNewCustomerOrder);&lt;br&gt;
                        oldCustomerIdOfCustomerOrderCollectionNewCustomerOrder = em.merge(oldCustomerIdOfCustomerOrderCollectionNewCustomerOrder);&lt;br&gt;
                    }&lt;br&gt;
                }&lt;br&gt;
            }&lt;br&gt;
            for (Address addressCollectionOldAddress : addressCollectionOld) {&lt;br&gt;
                if (!addressCollectionNew.contains(addressCollectionOldAddress)) {&lt;br&gt;
                    addressCollectionOldAddress.setCustomerId(null);&lt;br&gt;
                    addressCollectionOldAddress = em.merge(addressCollectionOldAddress);&lt;br&gt;
                }&lt;br&gt;
            }&lt;br&gt;
            for (Address addressCollectionNewAddress : addressCollectionNew) {&lt;br&gt;
                if (!addressCollectionOld.contains(addressCollectionNewAddress)) {&lt;br&gt;
                    Customer oldCustomerIdOfAddressCollectionNewAddress = addressCollectionNewAddress.getCustomerId();&lt;br&gt;
                    addressCollectionNewAddress.setCustomerId(customer);&lt;br&gt;
                    addressCollectionNewAddress = em.merge(addressCollectionNewAddress);&lt;br&gt;
                    if (oldCustomerIdOfAddressCollectionNewAddress != null &amp;amp;&amp;amp; !oldCustomerIdOfAddressCollectionNewAddress.equals(customer)) {&lt;br&gt;
                        oldCustomerIdOfAddressCollectionNewAddress.getAddressCollection().remove(addressCollectionNewAddress);&lt;br&gt;
                        oldCustomerIdOfAddressCollectionNewAddress = em.merge(oldCustomerIdOfAddressCollectionNewAddress);&lt;br&gt;
                    }&lt;br&gt;
                }&lt;br&gt;
            }&lt;br&gt;
            for (Telephone telephoneCollectionOldTelephone : telephoneCollectionOld) {&lt;br&gt;
                if (!telephoneCollectionNew.contains(telephoneCollectionOldTelephone)) {&lt;br&gt;
                    telephoneCollectionOldTelephone.setCustomerId(null);&lt;br&gt;
                    telephoneCollectionOldTelephone = em.merge(telephoneCollectionOldTelephone);&lt;br&gt;
                }&lt;br&gt;
            }&lt;br&gt;
            for (Telephone telephoneCollectionNewTelephone : telephoneCollectionNew) {&lt;br&gt;
                if (!telephoneCollectionOld.contains(telephoneCollectionNewTelephone)) {&lt;br&gt;
                    Customer oldCustomerIdOfTelephoneCollectionNewTelephone = telephoneCollectionNewTelephone.getCustomerId();&lt;br&gt;
                    telephoneCollectionNewTelephone.setCustomerId(customer);&lt;br&gt;
                    telephoneCollectionNewTelephone = em.merge(telephoneCollectionNewTelephone);&lt;br&gt;
                    if (oldCustomerIdOfTelephoneCollectionNewTelephone != null &amp;amp;&amp;amp; !oldCustomerIdOfTelephoneCollectionNewTelephone.equals(customer)) {&lt;br&gt;
                        oldCustomerIdOfTelephoneCollectionNewTelephone.getTelephoneCollection().remove(telephoneCollectionNewTelephone);&lt;br&gt;
                        oldCustomerIdOfTelephoneCollectionNewTelephone = em.merge(oldCustomerIdOfTelephoneCollectionNewTelephone);&lt;br&gt;
                    }&lt;br&gt;
                }&lt;br&gt;
            }&lt;br&gt;
            utx.commit();&lt;br&gt;
        } catch (Exception ex) {&lt;br&gt;
            try {&lt;br&gt;
                utx.rollback();&lt;br&gt;
            } catch (Exception re) {&lt;br&gt;
                throw new RollbackFailureException(&amp;quot;An error occurred attempting to roll back the transaction.&amp;quot;, re);&lt;br&gt;
            }&lt;br&gt;
            String msg = ex.getLocalizedMessage();&lt;br&gt;
            if (msg == null || msg.length() == 0) {&lt;br&gt;
                Integer id = customer.getCustomerId();&lt;br&gt;
                if (findCustomer(id) == null) {&lt;br&gt;
                    throw new NonexistentEntityException(&amp;quot;The customer with id &amp;quot; + id + &amp;quot; no longer exists.&amp;quot;);&lt;br&gt;
                }&lt;br&gt;
            }&lt;br&gt;
            throw ex;&lt;br&gt;
        } finally {&lt;br&gt;
            if (em != null) {&lt;br&gt;
                em.close();&lt;br&gt;
            }&lt;br&gt;
        }&lt;br&gt;
    }&lt;/p&gt;


&lt;p&gt;    public void destroy(Integer id) throws NonexistentEntityException, RollbackFailureException, Exception {&lt;br&gt;
        EntityManager em = null;&lt;br&gt;
        try {&lt;br&gt;
            utx.begin();&lt;br&gt;
            em = getEntityManager();&lt;br&gt;
            Customer customer;&lt;br&gt;
            try {&lt;br&gt;
                customer = em.getReference(Customer.class, id);&lt;br&gt;
                customer.getCustomerId();&lt;br&gt;
            } catch (EntityNotFoundException enfe) {&lt;br&gt;
                throw new NonexistentEntityException(&amp;quot;The customer with id &amp;quot; + id + &amp;quot; no longer exists.&amp;quot;, enfe);&lt;br&gt;
            }&lt;br&gt;
            Collection customerOrderCollection = customer.getCustomerOrderCollection();&lt;br&gt;
            for (CustomerOrder customerOrderCollectionCustomerOrder : customerOrderCollection) {&lt;br&gt;
                customerOrderCollectionCustomerOrder.setCustomerId(null);&lt;br&gt;
                customerOrderCollectionCustomerOrder = em.merge(customerOrderCollectionCustomerOrder);&lt;br&gt;
            }&lt;br&gt;
            Collection addressCollection = customer.getAddressCollection();&lt;br&gt;
            for (Address addressCollectionAddress : addressCollection) {&lt;br&gt;
                addressCollectionAddress.setCustomerId(null);&lt;br&gt;
                addressCollectionAddress = em.merge(addressCollectionAddress);&lt;br&gt;
            }&lt;br&gt;
            Collection telephoneCollection = customer.getTelephoneCollection();&lt;br&gt;
            for (Telephone telephoneCollectionTelephone : telephoneCollection) {&lt;br&gt;
                telephoneCollectionTelephone.setCustomerId(null);&lt;br&gt;
                telephoneCollectionTelephone = em.merge(telephoneCollectionTelephone);&lt;br&gt;
            }&lt;br&gt;
            em.remove(customer);&lt;br&gt;
            utx.commit();&lt;br&gt;
        } catch (Exception ex) {&lt;br&gt;
            try {&lt;br&gt;
                utx.rollback();&lt;br&gt;
            } catch (Exception re) {&lt;br&gt;
                throw new RollbackFailureException(&amp;quot;An error occurred attempting to roll back the transaction.&amp;quot;, re);&lt;br&gt;
            }&lt;br&gt;
            throw ex;&lt;br&gt;
        } finally {&lt;br&gt;
            if (em != null) {&lt;br&gt;
                em.close();&lt;br&gt;
            }&lt;br&gt;
        }&lt;br&gt;
    }&lt;/p&gt;


&lt;p&gt;    public List findCustomerEntities() {&lt;br&gt;
        return findCustomerEntities(true, -1, -1);&lt;br&gt;
    }&lt;/p&gt;


&lt;p&gt;    public List findCustomerEntities(int maxResults, int firstResult) {&lt;br&gt;
        return findCustomerEntities(false, maxResults, firstResult);&lt;br&gt;
    }&lt;/p&gt;


&lt;p&gt;    private List findCustomerEntities(boolean all, int maxResults, int firstResult) {&lt;br&gt;
        EntityManager em = getEntityManager();&lt;br&gt;
        try {&lt;br&gt;
            Query q = em.createQuery(&amp;quot;select object(o) from Customer as o&amp;quot;);&lt;br&gt;
            if (!all) {&lt;br&gt;
                q.setMaxResults(maxResults);&lt;br&gt;
                q.setFirstResult(firstResult);&lt;br&gt;
            }&lt;br&gt;
            return q.getResultList();&lt;br&gt;
        } finally {&lt;br&gt;
            em.close();&lt;br&gt;
        }&lt;br&gt;
    }&lt;/p&gt;


&lt;p&gt;    public Customer findCustomer(Integer id) {&lt;br&gt;
        EntityManager em = getEntityManager();&lt;br&gt;
        try {&lt;br&gt;
            return em.find(Customer.class, id);&lt;br&gt;
        } finally {&lt;br&gt;
            em.close();&lt;br&gt;
        }&lt;br&gt;
    }&lt;/p&gt;


&lt;p&gt;    public int getCustomerCount() {&lt;br&gt;
        EntityManager em = getEntityManager();&lt;br&gt;
        try {&lt;br&gt;
            return ((Long) em.createQuery(&amp;quot;select count(o) from Customer as o&amp;quot;).getSingleResult()).intValue();&lt;br&gt;
        } finally {&lt;br&gt;
            em.close();&lt;br&gt;
        }&lt;br&gt;
    }&lt;/p&gt;


&lt;p&gt;}&lt;/p&gt;


&lt;p&gt;&lt;/p&gt;


&lt;p&gt;Isn&amp;#39;t it great to get all this code generated? No need to develop and debug it ourselves, letting us focus on implementing business logic.&lt;/p&gt;

</content>
    </entry>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/netbeans_book_almost_ready</id>
        <title type="html">NetBeans Book Almost Ready</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/netbeans_book_almost_ready"/>
        <published>2008-10-10T22:14:14-04:00</published>
        <updated>2009-06-26T12:58:45-04:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="j2ee" scheme="http://roller.apache.org/ns/tags/" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">
&lt;p&gt;We are working on the final touches of my new &lt;a href=&quot;http://www.packtpub.com/java-ee5-development-with-netbeans-6/book&quot;&gt;Netbeans book&lt;/a&gt;. If everything goes well, it should be published later this month.&lt;/p&gt;


&lt;p&gt;Today I received &amp;quot;prefinal&amp;quot; versions of the first few chapters. Prefinal versions are what the publisher will sent to the printers once the book is completed. They are sent to the author for a final inspection and &amp;quot;sanity check&amp;quot; before having the book printed.&lt;/p&gt;


&lt;p&gt;I&amp;#39;m very excited about this book. NetBeans is such a nice IDE and I hope my book can help others learn how to use it to its full potential.&lt;/p&gt;

</content>
    </entry>
    <entry>
        <id>http://ensode.net/roller/dheffelfinger/entry/new_netbeans_book_available_for</id>
        <title type="html">New NetBeans Book Available for Pre-Order</title>
        <author><name>David R. Heffelfinger</name></author>
        <link rel="alternate" type="text/html" href="http://ensode.net/roller/dheffelfinger/entry/new_netbeans_book_available_for"/>
        <published>2008-10-06T20:30:17-04:00</published>
        <updated>2009-06-26T12:57:17-04:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <content type="html">I am pleased to announce that my new book, &lt;a href=&quot;http://www.packtpub.com/java-ee5-development-with-netbeans-6/book&quot;&gt;Java EE Development With NetBeans&lt;/a&gt;, is now available for pre-order.</content>
    </entry>
</feed>

