<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3629115681334104374</id><updated>2011-11-08T19:20:49.415-08:00</updated><category term='Spring 3.0'/><category term='Spring MVC'/><category term='Annotations'/><title type='text'>White's Board</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>31</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-7011754366189434695</id><published>2010-01-13T08:22:00.000-08:00</published><updated>2010-01-13T08:24:49.682-08:00</updated><title type='text'>I'm Moving!</title><content type='html'>My blog is moving as of today!  Intertech is moving all of its instructor blogs to an internally managed blog site.  Therefore, to follow my blog, go to &lt;a href="http://www.intertech.com/blog/"&gt;http://www.intertech.com/blog/&lt;/a&gt;.  You'll find my blog along with blogs from my fellow Intertech instructors and consultants.   Thanks for your continued support.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-7011754366189434695?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/7011754366189434695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2010/01/im-moving.html#comment-form' title='77 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/7011754366189434695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/7011754366189434695'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2010/01/im-moving.html' title='I&apos;m Moving!'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><thr:total>77</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-1412053404942563782</id><published>2009-12-22T10:30:00.000-08:00</published><updated>2009-12-22T10:35:22.241-08:00</updated><title type='text'>Intertech Trained? Get a $10 Starbucks Gift Card</title><content type='html'>Are you a former student of Intertech Training? If so, simply display the Intertech Trained logo on your blog, personal website, or other online forum to receive a $10 Starbucks gift card.&lt;br /&gt;&lt;br /&gt;With over 10,000 developers trained since 1991, technology professionals recognize the value of Intertech training. The Intertech Trained logo provides the recognition you need to excel in your career and validates of your training and skills.&lt;br /&gt;&lt;br /&gt;To get the Intertech Trained logo and information about how to display it on your pages, contact Tony Caswell at &lt;a href="mailto:tcaswell@intertch.com"&gt;tcaswell@intertch.com&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-1412053404942563782?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/1412053404942563782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/12/intertech-trained-get-10-starbucks-gift.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/1412053404942563782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/1412053404942563782'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/12/intertech-trained-get-10-starbucks-gift.html' title='Intertech Trained? Get a $10 Starbucks Gift Card'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-2276364491845553179</id><published>2009-12-06T12:11:00.001-08:00</published><updated>2009-12-08T06:11:13.050-08:00</updated><title type='text'>JSF Component Power Demonstrated through Data Table</title><content type='html'>&lt;span xmlns=""&gt;&lt;p&gt;When it comes to MVC Web frameworks in Java there are a lot of choices. The leading frameworks or "Big 3" as they are sometimes know are usually considered to be Struts, Spring MVC and JavaServer Faces (JSF). Each framework has its pros/cons, its supporters and detractors. For those looking to some for a good comprehensive comparison, you might want to check out Matt Raible's blog and presentation &lt;a href="http://static.raibledesigns.com/repository/presentations/ComparingJavaWebFrameworks-ApacheConEU2007.pdf"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;JSF is an extremely powerful, component driven framework. In fact, its nickname is "Swing for the Web." The JSF data table serves as an excellent example of JSF's Swing-like capability. A JSF data table can display a collection of data objects while also offering features such as pagination, column header/footers, style sheet application (for header, even and odd rows, etc.).&lt;br /&gt;&lt;/p&gt;&lt;a href="http://4.bp.blogspot.com/_Cy4Xw0LoxNc/SxwW5_xmIVI/AAAAAAAAAGQ/R-NlsX6IEkw/s1600-h/jsfdatatable.bmp"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 165px;" src="http://4.bp.blogspot.com/_Cy4Xw0LoxNc/SxwW5_xmIVI/AAAAAAAAAGQ/R-NlsX6IEkw/s320/jsfdatatable.bmp" border="0" alt=""id="BLOGGER_PHOTO_ID_5412226037820301650" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2&gt;Data Table Example&lt;br /&gt;&lt;/h2&gt;&lt;p&gt;First, to familiarize you with the JSF data table, let's look at a small example. In a JSP, use the &amp;lt;h:dataTable…&amp;gt; JSF tag to define a table in your page. The &amp;lt;h:column …&amp;gt; tag helps to define the table columns while the &amp;lt;f:facet …&amp;gt; tag is used to define header and footer rows.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;&amp;lt;f:view&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    &amp;lt;h:dataTable value="#{orderBean.orderModel}" var="order"&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        binding="#{orderBean.orderTable}" headerClass="columnHeader"&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        rowClasses="oddRow,evenRow"&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        &amp;lt;h:column&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;            &amp;lt;f:facet name="header"&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;                &amp;lt;h:outputText value="Description" /&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;            &amp;lt;/f:facet&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;            &amp;lt;h:outputText value="#{order.description}" /&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        &amp;lt;/h:column&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        &amp;lt;h:column&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;            &amp;lt;f:facet name="header"&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;                &amp;lt;h:outputText value="Customer" /&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;            &amp;lt;/f:facet&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;            &amp;lt;h:outputText value="#{order.customer}" /&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        &amp;lt;/h:column&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        &amp;lt;h:column&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;            &amp;lt;f:facet name="header"&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;                &amp;lt;h:outputText value="Price" /&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;            &amp;lt;/f:facet&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;            &amp;lt;h:outputText value="#{order.price}"&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;                &amp;lt;f:convertNumber type="currency" /&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;            &amp;lt;/h:outputText&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        &amp;lt;/h:column&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        &amp;lt;h:column&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;            &amp;lt;f:facet name="header"&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;                &amp;lt;h:outputText value="Quantity" /&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;            &amp;lt;/f:facet&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;            &amp;lt;h:outputText value="#{order.quantity}" /&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        &amp;lt;/h:column&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        &amp;lt;h:column&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;            &amp;lt;f:facet name="header"&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;                &amp;lt;h:outputText value="Cost" /&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;            &amp;lt;/f:facet&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;            &amp;lt;h:outputText value="#{order.cost}"&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;                &amp;lt;f:convertNumber type="currency" /&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;            &amp;lt;/h:outputText&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        &amp;lt;/h:column&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        &amp;lt;h:column&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;            &amp;lt;h:form&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;                &amp;lt;h:commandLink action="#{orderBean.editOrder}"&amp;gt;Edit&amp;lt;/h:commandLink&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;                &amp;lt;f:verbatim&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;                &amp;lt;/f:verbatim&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;                &amp;lt;h:commandLink action="#{orderBean.deleteOrder}"&amp;gt;Delete&amp;lt;/h:commandLink&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;                &amp;lt;f:verbatim&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;                &amp;lt;/f:verbatim&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;                &amp;lt;h:commandLink action="#{orderBean.displayOrder}"&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;                    &amp;lt;f:param name="id" value="#{order.id}" /&amp;gt;Display&amp;lt;/h:commandLink&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;            &amp;lt;/h:form&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        &amp;lt;/h:column&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    &amp;lt;/h:dataTable&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;&amp;lt;/f:view&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;In this example a collection of Order objects is obtained from a JSF managed bean (OrderManagedBean) to populate the data table. Note the value attribute to the &amp;lt;h:dataTable…&amp;gt; element above. Unified expression language is used to bind the orderModel property of an instance of a managed bean to the data table.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The var attribute on the data table establishes the name of the variable used to reference to each object in the nested elements of the data table. In this example, the name "order" is used to reference each of the Order objects in the collection provided to the data table.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Unified expression language in the &amp;lt;h:column …&amp;gt; element allows properties of the Order objects to be obtained and displayed.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Note how cascading styles can be used to differentiate odd and even rows. Other attributes like first, rows, cellspacing, cellpadding, etc. can add pagination and better layout to the table. See the JSF API &lt;a href="http://java.sun.com/javaee/javaserverfaces/1.2_MR1/docs/api/index.html"&gt;documentation&lt;/a&gt; for a complete list of how to customize the data table.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;For completeness of the example, here is the managed bean definition for this example in the JSF faces-config.xml.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;&amp;lt;faces-config&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    xmlns="http://java.sun.com/xml/ns/javaee"&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    version="1.2"&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    &amp;lt;managed-bean&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        &amp;lt;managed-bean-name&amp;gt;orderBean&amp;lt;/managed-bean-name&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        &amp;lt;managed-bean-class&amp;gt;com.intertech.beans.OrderManageBean&amp;lt;/managed-bean-class&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        &amp;lt;managed-bean-scope&amp;gt;session&amp;lt;/managed-bean-scope&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    &amp;lt;/managed-bean&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;&amp;lt;/faces-config&amp;gt;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;h2&gt;Populating a Data Table&lt;br /&gt;&lt;/h2&gt;&lt;p&gt;Flexibility epitomizes JSF components. Extreme flexibility can be demonstrated by data table population and row selection. With regard to the binding, the JSF data table can be populated with an array, a List, an SQL ResultSet, a JSTL SQL Result, or even a JSF table data model object as shown here.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;public class OrderManageBean {&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    private ListDataModel orderModel;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    private OrderDAO dao = new OrderDAO();&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    public ListDataModel getOrderModel() {&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        if (orderModel == null) {&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;            List&amp;lt;Order&amp;gt; list = dao.getOrders();&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;            orderModel = new ListDataModel(list);&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        }&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        return orderModel;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    }&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    public void setOrderModel(ListDataModel orderModel) {&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        this.orderModel = orderModel;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    }&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    …&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;}&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;All that is required is that the getOrderModel( ) method must return one of these types of objects.&lt;br /&gt;&lt;/p&gt;&lt;h2&gt;Selecting and Working With a Row in the Data Table&lt;br /&gt;&lt;/h2&gt;&lt;p&gt;When displaying a list of objects, a common requirement is to provide a means to select an object, or more precisely an object's row, for the purpose of working with that object – for example to edit or delete the object. Again, JSF provides the flexibility to accomplish this task in many ways.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;You can bind a property of the managed bean to the data table component itself. Then, call on the getRowData( ) method of the data table object to get the selected object. Below, the managed bean's edit action method uses the bound data table component to get the selected Order object.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    private UIData orderTable;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    public UIData getOrderTable() {&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        return orderTable;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    }&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    public void setOrderTable(UIData orderTable) {&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        this.orderTable = orderTable;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    }&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    public String editOrder() {&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        Order o = (Order) orderTable.getRowData();&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        //do work to get and edit an order&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        dao.editOrder(o);&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        return null;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    }&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;You can bind a property of the managed bean to the data table model and call on the getRowData( ) method of the model object to get the selected object. This is the case in the delete method below, which uses the bound data table model to fetch the selected Order object.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    public String deleteOrder() {&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        Order o = (Order) orderModel.getRowData();&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        //do work to delete order&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        dao.deleteOrder(o);&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        return null;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    }&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;Or, you can add the object's unique identifier as a parameter to the link or button in the data table (see the &amp;lt;h:commandLink ….&amp;gt; to Display above) so that when it is pushed, the object's identifier is passed to action method. The id can then be used to fetch the selected object. Here, the managed bean's details method uses the id passed via the command link in the page to fetch the selected Order to display.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    public String displayOrder() {&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        Order o = (Order) orderModel.getRowData();&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        //do work to get and display an order&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        dao.getOrder(o);&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;        return null;&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;strong&gt;    }&lt;br /&gt;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;The code for this example is available &lt;a href="http://www.intertech.com/downloads/DataTableDemo.zip"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;h2&gt;Powerful JSF&lt;br /&gt;&lt;/h2&gt;&lt;p&gt;Again, JSF is a very powerful MVC framework in Java. Its component nature, as represented by the data table, allows it to be customized quickly/easily and allows for great integration into technologies like AJAX. To be fair, JSF has also suffered some performance criticism (see JavaOne presentation &lt;a href="http://developers.sun.com/learning/javaoneonline/2008/pdf/TS-6517.pdf"&gt;here&lt;/a&gt;). As JSF 2.0 is now out, more organizations are exploring (or possibly re-exploring) it for Web applications. JSF 2.0 will be part of Java EE 6 which is expected to be released at anytime.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Intrigued by the power and capability of JSF? Come attend Intertech's &lt;a href="http://www.intertech.com/Courses/Course.aspx?CourseID=99339"&gt;Complete JSF&lt;/a&gt; class.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-2276364491845553179?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/2276364491845553179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/12/jsf-component-power-demonstrated.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/2276364491845553179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/2276364491845553179'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/12/jsf-component-power-demonstrated.html' title='JSF Component Power Demonstrated through Data Table'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_Cy4Xw0LoxNc/SxwW5_xmIVI/AAAAAAAAAGQ/R-NlsX6IEkw/s72-c/jsfdatatable.bmp' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-3421173426527741855</id><published>2009-10-21T20:36:00.000-07:00</published><updated>2009-10-21T20:47:22.776-07:00</updated><title type='text'>Help!!! What training do you need?</title><content type='html'>My company, Intertech Inc., is conducting a survey on the training needs of the software development community.  Whether you are a current customer or a potential future customer, your input is valuable!  We want to understand what technology you and your organization are exploring and what training needs are at the top of your “want list.”&lt;br /&gt;&lt;br /&gt;In addition to influencing our next course offerings, let me give you another reason to fill out the survey.  If you complete the survey and provide Intertech with your email address at the end of the survey, Intertech will send you a coupon for &lt;span style="color:#ff0000;"&gt;&lt;strong&gt;$250 off your next Intertech class&lt;/strong&gt;&lt;/span&gt; (valid for public classes held in 2010)!  Its simple and takes about 10 minutes to complete.  Just click on the survey link here - &lt;a href="http://www.surveymonkey.com/s.aspx?sm=GHjyzVhHSlDxxsOAnMc23Q_3d_3d"&gt;2010 Intertech Course Planning Survey&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-3421173426527741855?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/3421173426527741855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/10/help-what-training-do-you-need.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/3421173426527741855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/3421173426527741855'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/10/help-what-training-do-you-need.html' title='Help!!! What training do you need?'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-5057153793381924588</id><published>2009-10-19T11:10:00.001-07:00</published><updated>2009-10-19T11:11:58.059-07:00</updated><title type='text'>Interest in Noop?</title><content type='html'>&lt;span xmlns=""&gt;&lt;p&gt;Have you heard of Noop yet? Noop (see project page &lt;a href="http://code.google.com/p/noop/"&gt;here&lt;/a&gt;) is a new programming language developed by Google engineers (although not sponsored directly by Google) that is expected to run on the Java Virtual Machine. Why a new program language? According to the project Web site, the purpose of Noop is "encouraging what we believe to be good coding practices and discouraging the worst offenses."&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Fans of Spring and the importance of testing (especially unit testing) will note the first two goals of the new language are to build dependency injection and testability right into the language versus having to use 3&lt;sup&gt;rd&lt;/sup&gt; party libraries to bring DI and testing into application environments. Not included in the language (supposedly to make things clearer, simpler, and easier to maintain), among other things are statics, primitive types, and subclassing (implementation inheritance).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;To find out more about Noop join their mailing list at &lt;a href="mailto:noop@googlegroups.com"&gt;noop@googlegroups.com&lt;/a&gt;. Also, a short article on Noop can be found on Application Development Trends website &lt;a href="http://adtmag.com/Articles/2009/09/29/New-Language-for-Java-by-Google-Developers-Gains-Interest.aspx?sc_lang=en&amp;amp;Page=1"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-5057153793381924588?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/5057153793381924588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/10/interest-in-noop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/5057153793381924588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/5057153793381924588'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/10/interest-in-noop.html' title='Interest in Noop?'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-2248819803020143977</id><published>2009-10-11T12:03:00.001-07:00</published><updated>2009-10-11T12:43:31.973-07:00</updated><title type='text'>Hibernate’s Smart Automatic Dirty Check</title><content type='html'>&lt;span xmlns=""&gt;&lt;p&gt;I am one lucky guy. As an instructor, my job begins anew each week. Each week, I face a new group of people trying to learn a technology or skill. People have asked "don't you get bored teaching." How could I? Each week the topic changes and the needs of my students change. And when I am not teaching, I am working to understand new technologies and how/when to put it into courseware.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;But perhaps what makes my job the most enjoyable is when I have a group of students that are really engaging and come up with questions that make me stop and think. In other words, they challenge me to improve my own skills/knowledge on a topic that I think I already know pretty well. This week, I was teaching Hibernate and had just one of those questions from one of my students, Josephine.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;We were exploring Hibernate's automatic dirty checking. As those familiar with Hibernate have learned, Hibernate knows persistent objects and tracks state change to those objects. No explicit call to save (or update) a persistent object is necessary. Just committing the transaction causes the new state of a persistent object to be synchronized to the database. However, Josephine asked what would happen if the state of an object was changed and then changed back again to the original state in the same transaction? Would Hibernate know that no real change occurred and therefore avoid an SQL call to the database? What's your guess? In fact, the answer surprised me when I tested it out.&lt;/p&gt;&lt;p&gt;To describe the situation with a little more detail, explore the following persistent class and Hibernate mapping file. Nothing real complex about the Contact class or its mapping to a Contact table.&lt;/p&gt;&lt;p&gt;&lt;pre&gt;public class Contact {&lt;br /&gt; private Long id = 0L;&lt;br /&gt; private String firstName;&lt;br /&gt; private String lastName;&lt;br /&gt; private Date dateOfBirth;&lt;br /&gt; private boolean married = false;&lt;br /&gt; private int children;&lt;br /&gt; private int age;&lt;br /&gt; //getters and setters and constructors&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&amp;lt;hibernate-mapping package="com.intertech.domain"&amp;gt;&lt;br /&gt;  &amp;lt;class name="Contact"&amp;gt;&lt;br /&gt;    &amp;lt;id name="id"&amp;gt;&lt;br /&gt;      &amp;lt;generator class="increment" /&amp;gt;&lt;br /&gt;    &amp;lt;/id&amp;gt;&lt;br /&gt;    &amp;lt;property name="firstName" column="first_name" not-null="true" /&amp;gt;&lt;br /&gt;    &amp;lt;property name="lastName" column="last_name" not-null="true" /&amp;gt;&lt;br /&gt;    &amp;lt;property name="dateOfBirth" column="date_of_birth" type="date" not-null="true" /&amp;gt;&lt;br /&gt;    &amp;lt;property name="married" /&amp;gt;&lt;br /&gt;    &amp;lt;property name="children" /&amp;gt;&lt;br /&gt;    &amp;lt;property name="age" formula="datediff(&amp;apos;yy&amp;apos;, date_of_birth, curdate())" access="field"/&amp;gt;&lt;br /&gt;  &amp;lt;/class&amp;gt;&lt;br /&gt;&amp;lt;/hibernate-mapping&amp;gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Now check out this little bit of test code. In this example, the Contact with an ID of 2 (2 long) has 4 children.&lt;/p&gt;&lt;p&gt;&lt;pre&gt;SessionFactory sf = new Configuration().configure().buildSessionFactory();&lt;br /&gt;Session s = sf.openSession();&lt;br /&gt;Transaction t = s.beginTransaction();&lt;br /&gt;Contact c = (Contact) s.load(com.intertech.domain.Contact.class, 2L);&lt;br /&gt;c.setChildren(32);&lt;br /&gt;c.setChildren(4);&lt;br /&gt;t.commit();&lt;br /&gt;s.close();&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;So, what happens if code updates the number of children to another number (in this case 32) and then returning it to 4? Take a look at the log output (with hibernate.show_sql=true). The answer surprised me!&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;br /&gt;Hibernate:&lt;br /&gt;     select&lt;br /&gt;        contact0_.id as id0_0_,&lt;br /&gt;        contact0_.first_name as first2_0_0_,&lt;br /&gt;        contact0_.last_name as last3_0_0_,&lt;br /&gt;        contact0_.date_of_birth as date4_0_0_,&lt;br /&gt;        contact0_.married as married0_0_,&lt;br /&gt;        contact0_.children as children0_0_,&lt;br /&gt;        datediff('yy',contact0_.date_of_birth,curdate()) as formula0_0_     from&lt;br /&gt;        Contact contact0_&lt;br /&gt;     where&lt;br /&gt;        contact0_.id=?&lt;/pre&gt;&lt;/p&gt;&lt;p&gt;The SQL select is made to load to the Contact, but no update SQL is issued.  Hibernate actually checks to see if the state has undergone real modification before issuing an SQL to synchronize the state with the database. Another case of the students teaching the instructor.&lt;/p&gt;&lt;p&gt;Come join me in learning Hibernate in Intertech's &lt;a href="http://www.intertech.com/Courses/Course.aspx?CourseID=99267"&gt;Complete Hibernate&lt;/a&gt; class. We offer both live and virtual training, and while I may not have all the answers, I'll work hard to find them for you! That's one of the best parts of my job!&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-2248819803020143977?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/2248819803020143977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/10/hibernates-smart-automatic-dirty-check.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/2248819803020143977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/2248819803020143977'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/10/hibernates-smart-automatic-dirty-check.html' title='Hibernate’s Smart Automatic Dirty Check'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-9198105043189089593</id><published>2009-10-04T20:20:00.001-07:00</published><updated>2009-10-12T13:01:32.643-07:00</updated><title type='text'>HandlerInterceptors in Spring Web MVC Framework</title><content type='html'>Last week, I had a wonderful group of people in my class to learn the Spring Framework. In this group, one of my students – Eric - asked me about Spring Web MVC Interceptors. In particular, Eric had a great question about interceptors versus aspect-oriented programming (AOP) provided in Spring. Were they different? Could "normal" Spring AOP be used in place of interceptors and vice versa?&lt;br /&gt;&lt;br /&gt;In general, Interceptors, or more precisely HandlerInterceptors, are used to provide cross cutting concerns to a Spring MVC Web application. Here is a quote from Rod Johnson et al's book &lt;span style="TEXT-DECORATION: underline"&gt;Java Development with the Spring Framework&lt;/span&gt;: "HandlerInterceptors provide the capability to intercept incoming HTTP requests. Interceptors are useful to add additional crosscutting behavior to your web infrastructure, such as security, logging, auditing." Of course, you'll find "crosscutting behavior" the purpose of AOP as well. So indeed, HandlerInterceptors and AOP serve a similar purpose; that is they serve to collect cross cutting concern code usually sprinkled throughout the core concerns of an application. AOP provides a framework for providing cross-cutting concerns throughout all types of applications and application components. HandlerInterceptors are an extension point to a Spring MVC framework, and as such, are a means to provide cross-cutting concerns specific to Web applications. These special cross-cutting concern components also have access to the Web request, response and ModelAndView objects; something normal AOP aspects are not provided directly without some work. If you are unfamiliar with AOP, the Spring API documentation also indicates that HandlerInterceptors work like Servlet Filters.&lt;br /&gt;&lt;br /&gt;While there is a rather large amount of documentation and tutorials on intertwining AOP into a Spring application, there is not as much on HandlerInterceptors. So let me use this blog entry to show you how HandlerInterceptors work both in Spring 2 and in Spring 2.5 where annotations (rather than XML) are used to specify the controller and request mapping.&lt;br /&gt;&lt;br /&gt;HandlerInterceptors must implement the org.springframework.web.servlet.HandlerInterceptor interface. This interface defines three methods (preHandle, postHandle, and afterCompletion) that get called before a handler is executed (#1 in the diagram below), after a handler is executed but before the view is rendered (#2 below), and after completely handling a Web request and rendering the view(#3 below). These methods allow for all sorts of pre and post processing in the chain of execution associated to each and every Web request.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://4.bp.blogspot.com/_Cy4Xw0LoxNc/SslnNPyc-uI/AAAAAAAAAF4/BU_Z8O55rG4/s1600-h/Interceptor.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5388951906399615714" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 320px; CURSOR: hand; HEIGHT: 233px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_Cy4Xw0LoxNc/SslnNPyc-uI/AAAAAAAAAF4/BU_Z8O55rG4/s320/Interceptor.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Here is a simple implementation of the HandlerInterceptor.&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/p&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-size:85%;"&gt;package com.intertech.controllers;&lt;br /&gt;import javax.servlet.http.HttpServletRequest;&lt;br /&gt;import javax.servlet.http.HttpServletResponse;&lt;br /&gt;import org.springframework.web.servlet.ModelAndView;&lt;br /&gt;import org.springframework.web.servlet.HandlerInterceptor;&lt;br /&gt;public class&lt;br /&gt;TestInterceptor implements HandlerInterceptor {&lt;br /&gt;  @Override&lt;br /&gt;  public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {&lt;br /&gt;    System.out.println("In pre-processing/n");&lt;br /&gt;    return true;&lt;br /&gt;  }&lt;br /&gt;  @Override&lt;br /&gt;  public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {&lt;br /&gt;    System.out.println("done with request/n");&lt;br /&gt;  }&lt;br /&gt;  @Override&lt;br /&gt;  public void postHandle(HttpServletRequest request, HtpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {&lt;br /&gt;    System.out.println("In post-processing/n");&lt;br /&gt;  }&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;span style="font-size:85%;"&gt;&lt;p&gt;&lt;/span&gt;&lt;/p&gt;Note that the preHandle method returns a boolean. If false is returned, the interceptor indicates the normal execution chain should be aborted. The result is to send an HTTP error or other custom response to the user. The postHandle method is provided a copy of the ModelAndView object. This allows the interceptor to modify the model information or view displayed as normally determined by the Spring MVC controller. Finally, the afterCompletion method serves as a kind of callback after processing the request and rendering the view. This method can and should clean up any resources used by the interceptor.&lt;br /&gt;&lt;br /&gt;In Spring 2, interceptors are woven into the Web request execution chain through XML configuration of the handler mapping (note the interceptors property for the SimpleUrlHandlerMapping example below).&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-size:85%;"&gt;&amp;lt;bean id="testInterceptor" class="com.intertech.controllers.TestInterceptor" /&amp;gt;&lt;br /&gt;&amp;lt;bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"&amp;gt;&lt;br /&gt;  &amp;lt;property name="interceptors"&amp;gt;&lt;br /&gt;    &amp;lt;list&amp;gt;&lt;br /&gt;      &amp;lt;ref bean="testInterceptor"/&amp;gt;&lt;br /&gt;    &amp;lt;/list&amp;gt;&lt;br /&gt;  &amp;lt;/property&amp;gt;&lt;br /&gt;  &amp;lt;property name="mappings"&amp;gt;&lt;br /&gt;    &amp;lt;props&amp;gt;&lt;br /&gt;      &amp;lt;prop key="/addcontact.request"&amp;gt;addContactController&lt;br /&gt;      &amp;lt;/prop&amp;gt;&lt;br /&gt;      &amp;lt;prop key="/displayContacts.request"&amp;gt;manageContactsController&lt;br /&gt;      &amp;lt;/prop&amp;gt;&lt;br /&gt;      &amp;lt;prop key="/deleteContact.request"&amp;gt;manageContactsController&lt;br /&gt;      &amp;lt;/prop&amp;gt;&lt;br /&gt;    &amp;lt;/props&amp;gt;&lt;br /&gt;  &amp;lt;/property&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/blockquote&gt;In Spring 2.5 and better, since handler mapping is handled via @RequestMapping annotations, the interceptor must be added to the DefaultAnnotationHandlerMapping. In Spring 2.5 and beyond, the DispatcherServlet enables the DefaultAnnotationHandlerMapping by default, which looks for @RequestMapping annotations on @Controllers. However, the DefaultAnnotationHandlerMapping can still be added to the Spring configuration file and the interceptors added to this handler mapping as shown below.&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&amp;lt;bean id="testInterceptor" class="com.intertech.controllers.TestInterceptor" /&amp;gt;&lt;br /&gt;&amp;lt;bean id="handlerMapping" class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"&amp;gt;&lt;br /&gt;  &amp;lt;property name="interceptors"&amp;gt;&lt;br /&gt;    &amp;lt;list&amp;gt;&amp;lt;ref bean="testInterceptor"/&amp;gt;&amp;lt;/list&amp;gt;&lt;br /&gt;  &amp;lt;/property&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/blockquote&gt;Spring already comes with several interceptor adapters (HandlerInterceptorAdapter, LocaleChangeInterceptor, ThemeChangeInterceptor, UserRoleAuthorizationInterceptor, WebContentInterceptor, WebRequestHandlerInterceptorAdapter) so that developers don't have to implement common Web application cross cutting concerns. For example, the UserRoleAuthorizationInterceptor checks the authorization of the current user against the Java EE security roles, as evaluated by HttpServletRequest's isUserInRole method.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;To learn more about the Spring Framework or Spring Web MVC, please consider joining me for Intertech's &lt;a href="http://www.intertech.com/Courses/Course.aspx?CourseID=99367"&gt;Complete Spring Core&lt;/a&gt; or &lt;a href="http://www.intertech.com/Courses/Course.aspx?CourseID=99468"&gt;Complete Spring Web&lt;/a&gt; class. We offer training at our facility as well as virtually right to your desktop wherever you are.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-9198105043189089593?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/9198105043189089593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/10/handlerinterceptors-in-spring-web-mvc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/9198105043189089593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/9198105043189089593'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/10/handlerinterceptors-in-spring-web-mvc.html' title='HandlerInterceptors in Spring Web MVC Framework'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_Cy4Xw0LoxNc/SslnNPyc-uI/AAAAAAAAAF4/BU_Z8O55rG4/s72-c/Interceptor.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-686530611253588652</id><published>2009-09-02T18:33:00.001-07:00</published><updated>2009-09-02T18:39:26.523-07:00</updated><title type='text'>Oracle-Sun Acquisition Near Approval</title><content type='html'>Oracle's acquisition of Sun was approved by the US Department of Justice August 20&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;th&lt;/span&gt; (see details &lt;a href="http://www.informationweek.com/news/government/policy/showArticle.jhtml?articleID=219400953"&gt;here&lt;/a&gt; ) and according to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Bloomberg&lt;/span&gt; (see &lt;a href="http://www.bloomberg.com/apps/news?pid=20601103&amp;amp;sid=ajjM4sQiVYZg"&gt;here&lt;/a&gt;) European regulators are expected to approve the deal Sept 3rd. European approval is the last hurdle before the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;acquisition&lt;/span&gt; can be finalized.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-686530611253588652?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/686530611253588652/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/09/oracle-sun-acquisition-near.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/686530611253588652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/686530611253588652'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/09/oracle-sun-acquisition-near.html' title='Oracle-Sun Acquisition Near Approval'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-9210208465675226182</id><published>2009-08-27T11:36:00.001-07:00</published><updated>2009-08-27T12:11:39.574-07:00</updated><title type='text'>Simplifying the Hibernate Inverse Attribute on Associations</title><content type='html'>&lt;p&gt;Hibernate is a framework to make storing and retrieving persistent objects and their association to one another simpler. While this is generally true, there are aspects of Hibernate configuration and mapping that can be challenging to learn and understand. Perhaps, one of the toughest to teach people is that of the &lt;strong&gt;&lt;em&gt;inverse&lt;/em&gt;&lt;/strong&gt; setting on a bi-directional relationship mapping in a one-to-many or many-to-many association. Without an understanding of the objects, the association, &lt;span style="TEXT-DECORATION: underline"&gt;&lt;em&gt;and&lt;/em&gt;&lt;/span&gt; SQL needed to save them, people new to Hibernate often struggle with this setting.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;In fact, the inverse attribute on an association mapping can be easily understood with a simple example. So to start, assume there are two entities: BallPlayer and Team. As anyone who has played team sports knows, a team has many players, but a player can be on only one team at anytime. Therefore, the relationship between BallPlayer and Team is a one-to-many relationship, and in this example it is bi-directional. That is, a BallPlayer knows the team he plays for, and the Team knows the players on it. The UML showing the BallPlayer and Team attributes and the ERD diagrams for Player and Team are shown below.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_Cy4Xw0LoxNc/SpbT372_mTI/AAAAAAAAAFg/uNa8pf-RMWM/s1600-h/BallPlayertoTeam1.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5374716163227883826" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 182px; CURSOR: hand; HEIGHT: 200px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_Cy4Xw0LoxNc/SpbT372_mTI/AAAAAAAAAFg/uNa8pf-RMWM/s200/BallPlayertoTeam1.bmp" border="0" /&gt;&lt;/a&gt; &lt;p&gt;The Hibernate mapping files for both BallPlayer and Team are straightforward.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt; &lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" &lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"&amp;gt; &lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;hibernate-mapping package="com.intertech.domain"&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;class name="BallPlayer" table="Player" abstract="true"&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;id name="id" access="field"&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;generator class="sequence"&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;param name="sequence"&amp;gt;common_seq&amp;lt;/param&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;/generator&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;/id&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;property name="name" /&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;property name="dob" column="date_of_birth" /&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;property name="uniformNumber" column="uniform_number" /&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;many-to-one name="team" column="team_id" cascade="all"&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;class="com.intertech.domain.Team" not-null="true" /&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;/class&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;/hibernate-mapping&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;hibernate-mapping package="com.intertech.domain"&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;class name="Team"&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;id name="id" access="field"&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;generator class="sequence"&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;param name="sequence"&amp;gt;common_seq&amp;lt;/param&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;/generator&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;/id&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;property name="nickname" /&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;property name="founded" /&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;set name="players" &lt;strong&gt;inverse="true"&lt;/strong&gt; cascade="all"&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;key column="team_id" /&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;one-to-many class="com.intertech.domain.BallPlayer" /&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;/set&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;/class&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;font-size:85%;color:#000099;"&gt;&amp;lt;/hibernate-mapping&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Note the &lt;strong&gt;inverse="true"&lt;/strong&gt; on the &amp;lt;set&amp;gt; element in the Team mapping. When used, the inverse attribute must be set on the collection (in this case the &amp;lt;set&amp;gt; on Team) side of the association rather than the side containing the &amp;lt;many-to-one&amp;gt; element (the BallPlayer in this case). In a many-to-many relationship, the inverse attribute can be placed on the collection element on either side.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;OK, but what is this inverse attribute all about? Well, to understand it, examine some test code that exercises the BallPlayer to Team relationship.&lt;br /&gt;&lt;span style="font-size:85%;color:#000099;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#000099;"&gt;Calendar dob = Calendar.getInstance();&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#000099;"&gt;dob.set(1942, Calendar.DECEMBER, 13);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#000099;"&gt;BallPlayer fergie = new BallPlayer();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#000099;"&gt;fergie.setName("Ferguson Jenkins");&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#000099;"&gt;fergie.setDob(dob);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#000099;"&gt;fergie.setUniformNumber((short) 31); &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#000099;"&gt;SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#000099;"&gt;Session session = sessionFactory.openSession();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#000099;"&gt;Transaction transaction = session.beginTransaction();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#000099;"&gt;Team cubs = (Team) session.get(Team.class, 1L);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#000099;"&gt;cubs.addPlayer(fergie);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#000099;"&gt;fergie.setTeam(cubs);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#000099;"&gt;transaction.commit();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#000099;"&gt;session.close();&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;In this Hibernate code, a new BallPlayer (fergie) is created and associated to an already persistent Team (cubs) object. Once the BallPlayer and Team are associated to one another and since Team is already persistent, cascading persistence causes the BallPlayer (fergie) and relationship to the Team (cubs) to be saved.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The SQL issued to the database (shown with show_sql and use_sql_comments all set to true in the Hibernate configuration) when the test code above executes is shown below.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#000099;"&gt;Hibernate: /* load com.intertech.domain.Team */ select team0_.id as id1_0_, team0_.nickname as nickname1_0_, team0_.founded as founded1_0_ from Team team0_ where team0_.id=?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#000099;"&gt;Hibernate: /* load one-to-many com.intertech.domain.Team.players */ select players0_.team_id as team5_1_, players0_.id as id1_, players0_.id as id0_0_, players0_.name as name0_0_, players0_.date_of_birth as date3_0_0_, players0_.uniform_number as uniform4_0_0_, players0_.team_id as team5_0_0_ from Player players0_ where players0_.team_id=?&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#000099;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#000099;"&gt;Hibernate: call next value for common_seq&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#000099;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#000099;"&gt;Hibernate: /* insert com.intertech.domain.BallPlayer */ insert into Player (name, date_of_birth, uniform_number, team_id, id) values (?, ?, ?, ?, ?)&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;However, when the inverse="true" is removed from the Team mapping file, look how the SQL changes. &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#000099;"&gt;Hibernate: /* load com.intertech.domain.Team */ select team0_.id as id1_0_, team0_.nickname as nickname1_0_, team0_.founded as founded1_0_ from Team team0_ where team0_.id=? &lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#000099;"&gt;&lt;p&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#000099;"&gt;Hibernate: /* load one-to-many com.intertech.domain.Team.players */ select players0_.team_id as team5_1_, players0_.id as id1_, players0_.id as id0_0_, players0_.name as name0_0_, players0_.date_of_birth as date3_0_0_, players0_.uniform_number as uniform4_0_0_, players0_.team_id as team5_0_0_ from Player players0_ where players0_.team_id=?&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#000099;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#000099;"&gt;Hibernate: call next value for common_seq&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#000099;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#000099;"&gt;Hibernate: /* insert com.intertech.domain.BallPlayer */ insert into Player (name, date_of_birth, uniform_number, team_id, id) values (?, ?, ?, ?, ?)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#000099;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#000099;"&gt;Hibernate: /* create one-to-many row com.intertech.domain.Team.players */ &lt;em&gt;update Player set team_id=? where id=?&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;It might be hard to see at first, but one extra SQL statement got executed. Notice the extra SQL update statement that is called (the last line in italics)? What gives? Why the extra SQL? This is a result of the absences of the inverse attribute on the relationship mapping.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;From a database perspective, since only the Player table holds the reference (foreign key) to the Team, only one insert is needed for the relationship to be persisted – an insert into the Player table. However, Hibernate does not detect this fact by default. In the persistence context, all Hibernate knows is that both persistent objects (the BallPlayer called fergie and the Team called cubs) have been created or modified and need to be persisted. Therefore, at the next point of synchronization (transaction commit in this case) with the database, Hibernate attempts to persist both. If inverse attribute is not set to true, Hibernate looks at Team and notices the new BallPlayer.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://4.bp.blogspot.com/_Cy4Xw0LoxNc/SpbT4QGONxI/AAAAAAAAAFo/zF1UP3Imyyc/s1600-h/BallPlayertoTeam2.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5374716168660465426" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 200px; CURSOR: hand; HEIGHT: 119px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_Cy4Xw0LoxNc/SpbT4QGONxI/AAAAAAAAAFo/zF1UP3Imyyc/s200/BallPlayertoTeam2.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;It inserts the new BallPlayer, and association from cubs-to-fergie. However, it then looks at the new BallPlayer and sees the relationship fergie-to-cubs. Not told that the relationship is the inverse of one it has already taken care of, it thinks an update might be necessary to save this new relationship. Thus the extra "update Player set team_id=? where id=?" SQL is issued.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;So, the inverse=true attribute informs Hibernate of the existence of a bidirectional relationship which allows it to ignore the relationship from the Team to BallPlayer direction.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SpbT4wSR2iI/AAAAAAAAAFw/eDSvLqzus3o/s1600-h/TeamtoBallPlayer3.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5374716177300970018" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 200px; CURSOR: hand; HEIGHT: 147px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SpbT4wSR2iI/AAAAAAAAAFw/eDSvLqzus3o/s200/TeamtoBallPlayer3.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This raises an important issue in your management of Java objects and their association to each other. With inverse="true", Hibernate essentially ignores the association of Team to BallPlayer. Therefore, if you add a BallPlayer to Team, but do not handle the reverse association in your coding, the association is ignored!&lt;br /&gt;&lt;span style="font-size:85%;color:#000099;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#000099;"&gt;// - forget to do this - aPlayer.setTeam(aTeam);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#000099;"&gt;aTeam.addPlayer(aPlayer);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#000099;"&gt;session.save(aTeam);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#000099;"&gt;session.save(aPlayer);&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Hibernate manages the persistence of Java objects and their associations to each other into the database, but only if they are physically there! For this reason, good Hibernate developers write methods to update both sides of an entity relationship when either side is updated.&lt;br /&gt;&lt;span style="font-size:85%;color:#000099;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#000099;"&gt;public void addPlayer(BallPlayer aPlayer){&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#000099;"&gt;players.add(aPlayer);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#000099;"&gt;aPlayer.setTeam(this);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;color:#000099;"&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;If you still find the invert attribute and associations confusing, I encourage you to download the code for this blog post &lt;a href="http://www.intertech.com/downloads/InverseTest.jar"&gt;here &lt;/a&gt;and see if it makes more sense after you play with the setting in this simple example.&lt;/p&gt;&lt;p&gt;To learn more about Hibernate, consider taking Intertech's &lt;a href="http://www.intertech.com/Courses/Course.aspx?CourseID=99267"&gt;Complete Hibernate&lt;/a&gt; class.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-9210208465675226182?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/9210208465675226182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/08/simplifying-hibernate-inverse-attribute.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/9210208465675226182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/9210208465675226182'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/08/simplifying-hibernate-inverse-attribute.html' title='Simplifying the Hibernate Inverse Attribute on Associations'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_Cy4Xw0LoxNc/SpbT372_mTI/AAAAAAAAAFg/uNa8pf-RMWM/s72-c/BallPlayertoTeam1.bmp' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-2405335103504102389</id><published>2009-08-27T08:32:00.000-07:00</published><updated>2009-08-27T08:40:25.525-07:00</updated><title type='text'>Free Learning Event - Globalizing your Java App</title><content type='html'>My fellow Java Intertech instructor , Jason Shapiro, is providing a talk on Globalizing your Java Application September 11th (one at 9am central time, the other - virtual classroom - at 1pm central time).  In this free 2 hour talk, Jason discusses the basic considerations and processes one must follow to create a globalized application; that is how to move text and images into resource bundles, dealing with numbers, dates, and currency, character encoding issues, and localization/internationalization patterns and best practices.  Jason is a phenomenal classroom presenter.  This talk is well worth your time.  Sign up on Intertech's web site for either the in-person or virtual class &lt;a href="http://www.intertech.com/Feature/Feature.aspx?FID=81"&gt;here. &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-2405335103504102389?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/2405335103504102389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/08/free-learning-event-globalizing-your.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/2405335103504102389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/2405335103504102389'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/08/free-learning-event-globalizing-your.html' title='Free Learning Event - Globalizing your Java App'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-4742938990854958944</id><published>2009-08-04T14:13:00.000-07:00</published><updated>2009-08-04T14:25:43.627-07:00</updated><title type='text'>Java 7 - good, bad or somewhere in between</title><content type='html'>&lt;p&gt;Not sure about the new Java 7 JDK? It seems you would not be alone if you are still wavering on the new JDK (anticipated to be released in early 2010 - see my blog posting on Java 7 and Java EE 6 &lt;a href="http://whitesboard.blogspot.com/2009/06/java-se-7-and-java-ee-6.html"&gt;here&lt;/a&gt;). A recent poll on java.net (“The Source for Java Technology Collaboration” as deemed by Sun) indicates that almost half of 488 surveyed in the Java community (203 – 41% to be exact) don’t think it addresses “significant” problems. See the poll results and comments left by others &lt;a href="http://today.java.net/pub/pq/268"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;It is not a scientific survey, but the number seemed to capture some attention. In fact, the ServerSide.com noted the survey and mentioned the “Diversity of opinions on JDK 7” in its weekly email newsletter.  Have you tried out the new JDK?  If so, what are your thoughts?  Will your organization move to Java 7 quickly or slowly.  Provide your answer to my Java 7 questions at right.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-4742938990854958944?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/4742938990854958944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/08/java-7-good-bad-or-somewhere-in-between.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/4742938990854958944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/4742938990854958944'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/08/java-7-good-bad-or-somewhere-in-between.html' title='Java 7 - good, bad or somewhere in between'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-7563505042760892041</id><published>2009-07-17T11:29:00.000-07:00</published><updated>2009-07-17T11:31:38.260-07:00</updated><title type='text'>Complete Hibernate – Beta Class at Reduced Price</title><content type='html'>Intertech has updated its &lt;a href="http://www.intertech.com/Courses/Course.aspx?CourseID=99267"&gt;Complete Hibernate &lt;/a&gt;class (more material – more days of training) and it is being run for the first time in August.  Sign up now to get a 25% reduction in price by participating in the beta run of the class.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-7563505042760892041?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/7563505042760892041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/07/complete-hibernate-beta-class-at.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/7563505042760892041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/7563505042760892041'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/07/complete-hibernate-beta-class-at.html' title='Complete Hibernate – Beta Class at Reduced Price'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-6930110580604392929</id><published>2009-07-17T10:53:00.000-07:00</published><updated>2009-07-17T11:29:17.209-07:00</updated><title type='text'>JAX-WS and Operation Overloading</title><content type='html'>Another great group of people this week in my classroom. The topic was Java Web Services with a little JMS thrown in. During the class this week, in the discussion of Java to XML (and back) mapping as provided by JAX-WS and JAXB, I indicated to students that while Java as a programming language supports method (or operation) overloading, it is prohitited in Web services by specification (WSDL) and the WS-I Basic Profile.&lt;br /&gt;&lt;br /&gt;During class, we explored the JAX-WS annotations for defining Java Web services.  Specifically, we looked at the @WebService annotation on the service endpoint interface (SEI) and implementation bean (SIB) as shown below.&lt;br /&gt;&lt;div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;package example;&lt;br /&gt;import&lt;br /&gt;javax.jws.WebService;&lt;br /&gt;@WebService(endpointInterface ="example.SomeService")&lt;br /&gt;public class SomeServiceImpl implements SomeService&lt;br /&gt;{&lt;br /&gt;public int doIt(String str) {&lt;br /&gt;return 0;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;package example;&lt;br /&gt;import&lt;br /&gt;javax.jws.WebService;&lt;br /&gt;@WebService&lt;br /&gt;public interface SomeService {&lt;br /&gt;public&lt;br /&gt;int doIt(String str);&lt;br /&gt;}&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;When looking at JAX-WS, we also explored the operationName attribute on the @WebMethod annotation for Web service methods.  A perceptive and imaginative student (&lt;strong&gt;&lt;em&gt;thanks Pat&lt;/em&gt;&lt;/strong&gt;) asked “if you could use the operationName to allow for method overloading at the Java level while preserving unique operation names in the WSDL and SOAP level?”  I’ve extended the example to demonstrate below.&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;package example;&lt;br /&gt;&lt;br /&gt;import javax.jws.WebMethod;&lt;br /&gt;import javax.jws.WebService;&lt;br /&gt;&lt;br /&gt;@WebService&lt;br /&gt;public interface SomeService {&lt;br /&gt;&lt;br /&gt;public int doIt(String str);&lt;br /&gt;&lt;strong&gt;@WebMethod(operationName = "doItNow")&lt;/strong&gt;&lt;br /&gt;public int doIt(int i);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;package example;&lt;br /&gt;import javax.jws.WebService;&lt;br /&gt;@WebService(endpointInterface = "example.SomeService")&lt;br /&gt;public class SomeServiceImpl implements SomeService {&lt;br /&gt;public int doIt(String str) {&lt;br /&gt;return 0;&lt;br /&gt;}&lt;br /&gt;public int doIt(int i) {&lt;br /&gt;return 0;&lt;br /&gt;}&lt;br /&gt;}&lt;/blockquote&gt;&lt;div&gt;What a great question and one that sent me scrambling to my browser and text books looking for an answer.&lt;br /&gt;&lt;br /&gt;The answer is – no, not easily. This will be somewhat dependent on the JAX-WS implementation (for example, take a look at &lt;a href="http://blog.ebmwebsourcing.com/home/chamerling/tag/jaxws/"&gt;Christophe Hamerling’s example &lt;/a&gt;in Apache CXF where overloaded operations and use of the @operationName works) and work-arounds could probably be negotiated (for example, don’t use document/literal wrapped style). However, when using the JAX-WS reference implementation mapping tools there is still going to be problems despite the @WebMethods operationName attribute provides a unique operation name as far as SOAP and WSDL are concerned. &lt;/div&gt;&lt;br /&gt;&lt;div&gt;The reason? The wsgen tool has problems creating the default SOAP wrapper classes for the operation inputs and outputs. When you run wsgen with the code above, you get an exception (com.sun.tools.internal.ws.processor.modeler.ModelerException: [failed to localize] Request wrapper bean names must be unique and must not clash with other generated classes.)as shown below.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_Cy4Xw0LoxNc/SmC_3n41ScI/AAAAAAAAAFY/5UnA-OwUmJU/s1600-h/wrapperbeans.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5359494518891956674" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 603px; CURSOR: hand; HEIGHT: 465px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_Cy4Xw0LoxNc/SmC_3n41ScI/AAAAAAAAAFY/5UnA-OwUmJU/s320/wrapperbeans.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;So thanks again for the great question Pat. Contact Intertech if you would like to sign up for our next &lt;a href="http://www.intertech.com/Courses/Course.aspx?CourseID=99162"&gt;Complete Java Web Services&lt;/a&gt; class. &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-6930110580604392929?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/6930110580604392929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/07/jax-ws-and-operation-overloading.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/6930110580604392929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/6930110580604392929'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/07/jax-ws-and-operation-overloading.html' title='JAX-WS and Operation Overloading'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_Cy4Xw0LoxNc/SmC_3n41ScI/AAAAAAAAAFY/5UnA-OwUmJU/s72-c/wrapperbeans.bmp' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-9144609109698278092</id><published>2009-07-05T19:16:00.000-07:00</published><updated>2009-07-05T19:36:16.480-07:00</updated><title type='text'>JAX-RS:  A new Java Web service API</title><content type='html'>&lt;p&gt;JAX-RS will be part of Java EE 6 which is due out in final form in September ’09. What is JAX-RS? JAX-RS is the Java API for RESTful Web Services. OK, so what is a RESTful Web service? The term REST (Representation State Transfer) dates to a 2000 doctoral dissertation by Roy Fielding – cofounder of the Apache HTTP server and coauthor of the HTTP and URI standards. REST is the software architecture (or architectural style) for distributed hypermedia (text, graphics, audio, video, etc.) systems. REST is the foundation of the World Wide Web. RESTful Web services, is the application of the REST architectural style to provide information to other systems, process, etc.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;At the heart of a RESTful system is a resource. A resource is anything that has an identifier in the form of a URI. Any informational item that can be named can be a resource: stock price, customer, purchase order, calendar of events, etc. The concept of a resource is broad. Here are some examples.&lt;/p&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;http://www.intertech.com/studentDirectory/students&lt;br /&gt;http://www.intertech.com/studentDirectory/students/jamesBond&lt;br /&gt;http://www.intertech.com/studentDirectory/students/missMoneypenny&lt;/span&gt;&lt;/blockquote&gt;&lt;p&gt;Resources have state and it is that state that the requester of the resource is interested. A RESTful Web service requestor or client may request to read the resource’s state. A client may request to update a resource’s state. Behind REST systems is a set of client-invoked operations on resources. While not absolutely required, most have come to accept the set of HTTP methods as the general API for REST operations on resources.&lt;/p&gt;&lt;span style="font-size:85%;"&gt;GET - Read a resource&lt;br /&gt;POST - Create/add a new resource from the&lt;br /&gt;HTTP request body&lt;br /&gt;PUT - Update a resource from the HTTP request body&lt;br /&gt;DELETE - Delete a resource&lt;/span&gt;&lt;br /&gt;&lt;p&gt;The URI query string might provide amplifying information about the operation.&lt;/p&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;http://www.intertech.com/studentDirectory/students?lastName=Bond&lt;/span&gt;&lt;/blockquote&gt;&lt;p&gt;In a RESTful system, URIs act as nouns (identifying resources) and the HTTP method acts as a verb that specifies the operations on the resources. URIs and HTTP methods provide, while more convention than standard, a terse and uniform style for information exchange.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;So Back to JAX-RS. JAX-RS allows for the construction of RESTful services in Java. Using JAX-RS, REST resources are Plain Old Java Objects. The POJOs are annotated with @Path. @Path takes one argument. The argument identifies the relative URI path to which the resource responds.&lt;/p&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;@Path("/helloworld")&lt;br /&gt;public class HelloWorldResource {&lt;br /&gt;...&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;p&gt;The URI path is relative to the base URI of the server the resource is deployed, the context root of the WAR, and the URL pattern for an adapter servlet that routes traffic to the resources.&lt;/p&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;http://&lt;server&gt;:&lt;port&gt;/&lt;context&gt;/&lt;jersey&gt;/&lt;path&gt;&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;p&gt;So, assuming the resource above was in a MyWebApp WAR, a URL request to this HelloWorldResource might look like the following:&lt;/p&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;http://localhost:8080/MyWebApp/resources/helloworld&lt;/span&gt;&lt;/blockquote&gt;&lt;p&gt;The @Path annotation merely dictates what request traffic is sent to the resource.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Add annotations (@GET, @POST, @PUT, @DELETE, @HEAD) to the resource methods to indicate what should be invoked for each type of HTTP request.&lt;/p&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;@Path("/helloworld")&lt;br /&gt;public class HelloWorldResource {&lt;br /&gt;&lt;br /&gt;@GET&lt;br /&gt;public String sayHello() {&lt;br /&gt;return "Hello&lt;br /&gt;World";&lt;br /&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;/blockquote&gt;&lt;p&gt;Methods that are annotated with @GET, @POST, @PUT, @DELETE and @HEAD are called resource methods and allow for the RESTful service clients to retrieve, update, remove, and create new resources.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;By default, the resource returns text/plain. However, the @Produces annotation can be used to specify the MIME type of response. The @Produces can annotate the resource to provide the default return type for all resource methods.&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;@Path("/helloworld")&lt;br /&gt;@Produces("text/html")&lt;br /&gt;public class&lt;br /&gt;HelloWorldResource {&lt;br /&gt;...&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;Resources may offer multiple MIME types for any given request.&lt;br /&gt;Resources may also be sent information (as part of the HTTP request body) by the client. The @Consumes annotation works in a fashion similar to @Produces but for incoming rather than outgoing MIME types. @Consumes specifies which MIME types can be accepted or consumed by the resource.&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;@POST&lt;br /&gt;@Consumes("text/plain")&lt;br /&gt;public void respondToMessage(String message)&lt;br /&gt;{&lt;br /&gt;...&lt;br /&gt;}&lt;/span&gt;&lt;/blockquote&gt;As with all Java specifications, JAX-RS must be implemented. The Jersey project is Sun’s reference implementation of JAX-RS 1.0. You can get Jersey today at https://jersey.dev.java.net. To learn more about JAX-RS and the other APIs of Java Web Services, sign up to take Intertech’s updated &lt;a href="http://www.intertech.com/Courses/Course.aspx?CourseID=99162"&gt;Complete Java Web Services class&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-9144609109698278092?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/9144609109698278092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/07/jax-rs-new-java-web-service-api.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/9144609109698278092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/9144609109698278092'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/07/jax-rs-new-java-web-service-api.html' title='JAX-RS:  A new Java Web service API'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-5451635684138414337</id><published>2009-06-15T07:02:00.000-07:00</published><updated>2009-06-15T07:12:20.282-07:00</updated><title type='text'>Spring Dependency Injection Questions</title><content type='html'>This past week, we had our “Beta” run of Intertech’s new &lt;a href="http://www.intertech.com/Courses/Course.aspx?CourseID=99367"&gt;Complete Spring Core&lt;/a&gt; and &lt;a href="http://www.intertech.com/Courses/Course.aspx?CourseID=99468"&gt;Complete Spring Web &lt;/a&gt;classes. The latest Spring (2.5.6 with mentions of Spring 3) and Spring MVC/Web Flow are taught in these classes.&lt;br /&gt;&lt;br /&gt;I had a great group of students to help give this new class its inaugural flight. While a little on the quiet side, they had wonderful questions and some great insight at the conclusion of our class for how to improve it. I thought I would share two questions that came out this week’s class.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Question #1 (thanks Sharon)&lt;/strong&gt; - What happens when you use &lt;set&gt;for dependency injecting a property but the property is a List in the actual class? For example, what if the bean definition looked something like this…&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://3.bp.blogspot.com/_Cy4Xw0LoxNc/SjZU1NKCIPI/AAAAAAAAAEo/sH8Po3oyKjg/s1600-h/beandef.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5347554880590586098" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 320px; CURSOR: hand; HEIGHT: 176px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_Cy4Xw0LoxNc/SjZU1NKCIPI/AAAAAAAAAEo/sH8Po3oyKjg/s320/beandef.bmp" border="0" /&gt;&lt;/a&gt;And the class looked like this… &lt;span&gt;&lt;span style="font-family:arial;color:#3333ff;"&gt;&lt;strong&gt;&lt;/p&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span&gt;&lt;span style="font-family:arial;color:#3333ff;"&gt;&lt;strong&gt;public class Player&lt;br /&gt;{&lt;br /&gt;private List teams;&lt;br /&gt;public void setTeams(List teams) {&lt;br /&gt;this.teams = teams;&lt;br /&gt;}&lt;br /&gt;} &lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;p&gt;The implementation class of the collection bean property does not have to match &lt;list&gt;or &lt;set&gt;property definition in the Spring configuration. Both can be used interchangeably with any type of java.util.Collection. The &lt;set&gt;element wires a collection to the bean and ensures that there are no duplicates. But, as in this case, the underlying collection is still a list. So in this example, the Player bean will have a List of team Strings, but the duplicate “Yankees” will be removed.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Question #2 (thanks Kurt)&lt;/strong&gt; - Another great question came when we looked at the @Autowire annotation that was added in Spring 2.5. This annotation can be used on any method in the class to conduct dependency injection. The question was what if the @Autowire is used on multiple methods to dependency inject the same property? For example…&lt;br /&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;strong&gt;&lt;span style="font-family:arial;color:#3333ff;"&gt;public class Player {&lt;br /&gt;private String name;&lt;br /&gt;private Team team;&lt;br /&gt;@Autowired&lt;br /&gt;public void initializePlayer(Team team){&lt;br /&gt;this.team =&lt;br /&gt;team;&lt;br /&gt;}&lt;br /&gt;@Autowired&lt;br /&gt;public void initializePlayerAgain(Team team){&lt;br /&gt;this.team = team;&lt;br /&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;/strong&gt; &lt;/blockquote&gt;&lt;p&gt;In fact, both methods will get called and a Team will get passed to both methods. While this works, we could not think of a good reason for its use.If you have interest in exploring Spring, please contact our office (651-994-8558) and ask for Dan McCabe. I think our Spring training is the most complete (pun absolutely intended!). &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-5451635684138414337?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/5451635684138414337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/06/spring-dependency-injection-questions.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/5451635684138414337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/5451635684138414337'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/06/spring-dependency-injection-questions.html' title='Spring Dependency Injection Questions'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_Cy4Xw0LoxNc/SjZU1NKCIPI/AAAAAAAAAEo/sH8Po3oyKjg/s72-c/beandef.bmp' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-4617190828266588152</id><published>2009-06-05T22:47:00.001-07:00</published><updated>2009-06-05T22:53:37.968-07:00</updated><title type='text'>Java SE 7 and Java EE 6</title><content type='html'>I just returned from JavaOne.  Details on Java 7 and Java EE 6 were big topics during the conference.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;Java 7 is expected to be released Feb 2010&lt;/span&gt;&lt;/strong&gt;.  Based on last year's conference notes and milestones released this year already, many thought (including myself) that Java 7  would be released sooner.  The last &lt;span style="color:#ff0000;"&gt;feature-complete milestone is scheduled for Oct 2009&lt;/span&gt;.  I attended a few sessions that discussed what will be in Java 7.  Everyone was careful to say that the final decisions hadn't been made yet, indicating there is still work being done on Java 7.  Some of the things likely to be in Java 7...&lt;br /&gt;1. modules (allowing you to customize the features of Java you need for your app and finally killing the classpath)&lt;br /&gt;2. null check operator/conditional - "?:"&lt;br /&gt;3. Strings in switches&lt;br /&gt;4. multiple exception catches in the catch block (using "")&lt;br /&gt;5. diamond operator to allow the generics to be more easily used. &lt;br /&gt;//For example...&lt;br /&gt;HashMap&lt;string,&gt;&gt; map = new HashMap&lt;string,&gt;&gt;();&lt;br /&gt;//becomes&lt;br /&gt;HashMap&lt;string,&gt;&gt; map = new HashMap&lt;&gt;();&lt;br /&gt;&lt;br /&gt;Things not likely to make Java 7 but at one time rumored to have a chance...&lt;br /&gt;1. closures&lt;br /&gt;2. SQL expression checking&lt;br /&gt;&lt;br /&gt;Java EE 6 will actually come out sooner.  &lt;strong&gt;&lt;span style="color:#ff0000;"&gt;Java EE 6 is due on in final form in Sept 2009&lt;/span&gt;&lt;/strong&gt;.  In this release, the big new features are:&lt;br /&gt;1.  JAX-RS (support for RESTful web services)&lt;br /&gt;2.  JSF 2.0&lt;br /&gt;3.  Asynch servlets&lt;br /&gt;4.  Bean validation (adding validation to JavaBeans that can be used to validate property data anytime they are used).&lt;br /&gt;5.  Web.xml is gone (at least it can be gone) with the use of annotations and/or web.xml fragments.&lt;br /&gt;6.  Web beans - essentially session beans in the WAR file.&lt;br /&gt;&lt;br /&gt;A few other notes from the conference...&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;Eclipse Galileo is the next train release of Eclipse&lt;/strong&gt;&lt;/span&gt; (following the previous year releases of Calisto, Europa, and Ganymede) and &lt;span style="color:#ff0000;"&gt;&lt;strong&gt;it will come out on June 24th&lt;/strong&gt;&lt;/span&gt;.  This release now includes 33-48 Eclipse projects (Ganymede included 24 projects).  On Jun 26, there will be a live Webinar to learn about new features.  From the talk, I wouldn't say there is any real big thing in this release that most of us would  use on a regular  basis.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;Spring has a new project called Spring Roo&lt;/strong&gt;&lt;/span&gt; (yes for kangaroo).  Essentially, this is Rails or Grails but all in Java and Spring.  Meta programming is here to stay folks.  I hope to have more on that in a later blog posting.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-4617190828266588152?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/4617190828266588152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/06/java-se-7-and-java-ee-6.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/4617190828266588152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/4617190828266588152'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/06/java-se-7-and-java-ee-6.html' title='Java SE 7 and Java EE 6'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-1508181512256174913</id><published>2009-05-31T20:39:00.000-07:00</published><updated>2009-05-31T20:46:36.191-07:00</updated><title type='text'>Groovy and Grails at JavaOne</title><content type='html'>Hello from San Francisco! I am at JavaOne this week. Catching up on what is new, important and at issue with Java. The conference is not cheap and travel is usually one of the first things that go in reduced budgets, but if you can somehow manage it, this is the conference that all Java developers need to attend whenever possible.&lt;br /&gt;&lt;br /&gt;The conference’s Java University started today. I attended a wonder class by Graeme Rocher on Groovy and Grails. Graeme is the project lead for Grails and head of Grails development at Spring Source.&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SiNOUAHbu6I/AAAAAAAAAEQ/EzUERcbBh4o/s1600-h/groovy.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5342199688527068066" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 200px; CURSOR: hand; HEIGHT: 100px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SiNOUAHbu6I/AAAAAAAAAEQ/EzUERcbBh4o/s200/groovy.bmp" border="0" /&gt;&lt;/a&gt;Groovy is a programming language that has been attracting a lot of attention lately. And base on what I learned and saw today, it rightfully should. Groovy is a dynamic language inspired by a number of other such languages (most notably like Ruby, Smalltalk and Python) written specifically for the Java Virtual Machine. Its aim is to bring the “power of Ruby and Python and the elegance of the Java syntax to a JVM.” Because it is written specifically for the JVM, it is an extension to Java. Groovy provides all the power of metaprogramming but with all the benefits of Java and the JVM underneath. Although other dynamic languages like JRuby or Jython run on the JVM, they have had to be modified in order to run on the JVM. Some concessions were made in the port of Ruby and Python to the JVM. Most of the environments are an extension but a replacement of the Java API (having their own I/O and collection API for example). The goal of Groovy is simple – less code meaning faster development and hopefully easier/faster maintenance.&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_Cy4Xw0LoxNc/SiNOh--K0rI/AAAAAAAAAEY/3HCbTBWeCo4/s1600-h/grails.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5342199928737944242" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 200px; CURSOR: hand; HEIGHT: 105px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_Cy4Xw0LoxNc/SiNOh--K0rI/AAAAAAAAAEY/3HCbTBWeCo4/s200/grails.bmp" border="0" /&gt;&lt;/a&gt;Grails is an MVC++ action-based web framework. Grails is to Groovy what Rails is to Ruby (more precisely Ruby on Rails). I say Grails is an MVC “plus plus” framework because it is more, way more, than just a web application framework. It also provides the entire platform for building applications from the UI to the data layer. In fact, Grails is built on Groovy (of course) as well as Spring, Spring MVC, Hibernate, Quartz (for job scheduling), SiteMesh (layout framework), Jetty and HSQLDB. Like Rails, building a CRUD (create, read, update, delete) interface can be done in minutes. But because it is also built on top of the best-of-breed Java technologies, it can also do so much more, and because it is done with Groovy, it can be done quickly with very little code.&lt;br /&gt;&lt;br /&gt;A couple of things to consider before you start singing Kumbaya with the Grails/Groovy crowd. Grails requires a relatively up to date platform. Grails comes with its own container and even database, but most shops are going to want to run Grails on their own container. Grails requires a Web container that is at the 2.5 level (Java Servlet 2.5). Secondly, Grails is slower than Java. According to Graeme, he has seen a Java application that did ~1000 transactions a minute only perform ~750 when using Grails. The good news is that the same app using Rails did only ~150. Rails performance issues are starting to attract some attention and Grails offers the same kind of development convenience with a much better performance outlook (see &lt;a href="http://www.infoq.com/articles/Rails-Performance"&gt;http://www.infoq.com/articles/Rails-Performance&lt;/a&gt; or &lt;a href="http://www.techcrunch.com/2008/05/01/twitter-said-to-be-abandoning-ruby-on-rails/"&gt;http://www.techcrunch.com/2008/05/01/twitter-said-to-be-abandoning-ruby-on-rails/&lt;/a&gt; for some of the Rails issues). Lastly, Grails, while offering the promise of less code and faster development, is not a tool for novices. Under the covers of Grails and Groovy, there is a lot of Java and Java technologies. While Groovy and Grails helps abstract away many of the details and common drudgery of modern Java application development, it does not protect the developer from having to fine tune and tweak application to do the business’s bidding, especially in large scale, high performance environments. I asked Graeme if he felt developers of Grails applications needed to know Spring, Hibernate and all the underlying technologies well to be able to build a large scale performing enterprise application. He indicated that in some cases, for example Spring, developers were isolated from having to know the framework to get things to work and work well. But developers are going to have to know and understand the inner workings of other frameworks like Hibernate in order to make parts of Grails like GORM (Grail’s ORM capability) perform well. Given that Grails is built on top of Java, on top of many Java technologies like Hibernate and Spring, and on top of Groovy, this is a lot to learn and know.&lt;br /&gt;&lt;br /&gt;Still, when you see the simplicity and speed of Groovy and Grails development, you can’t help but believe there indeed &lt;strong&gt;&lt;em&gt;&lt;span style="font-size:130%;"&gt;IS&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt; a better way to build Web applications. “Power to the people” with Groovy. I encourage you to take a look. More information on Groovy can be found at &lt;a href="http://groovy.codehaus.org/"&gt;http://groovy.codehaus.org/&lt;/a&gt;. Information on Grails can be found at &lt;a href="http://www.grails.org/"&gt;http://www.grails.org/&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-1508181512256174913?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/1508181512256174913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/05/groovy-and-grails-at-javaone.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/1508181512256174913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/1508181512256174913'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/05/groovy-and-grails-at-javaone.html' title='Groovy and Grails at JavaOne'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SiNOUAHbu6I/AAAAAAAAAEQ/EzUERcbBh4o/s72-c/groovy.bmp' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-550459791556566428</id><published>2009-05-27T09:07:00.000-07:00</published><updated>2009-05-27T09:12:53.850-07:00</updated><title type='text'>New Spring Classes and a Special One-time Discount</title><content type='html'>For those interested in learning Spring, I have just completed two new Spring classes at Intertech:  Complete Spring Core and Complete Spring Web. These two classes will be offered back-to-back in June.&lt;br /&gt;&lt;br /&gt;In fact, we (Intertech) has a special offer. For the Beta (first public offering) of these two Intertech courses, we’re offering a 25% discount on the standard course rate. In exchange for the discount, you agree to give detailed course feedback. The courses and dates are:&lt;br /&gt;&lt;a href="http://www.intertech.com/Courses/Course.aspx?CourseID=99367"&gt;Complete Spring Core Training&lt;/a&gt;, June 8-10&lt;br /&gt;&lt;a href="http://www.intertech.com/Courses/Course.aspx?CourseID=99468"&gt;Complete Spring Web Training&lt;/a&gt;, June 11-12&lt;br /&gt;&lt;br /&gt;To get this special pricing, you must register over the phone (651-994-8558 +23) and mention “BETA-RUN.” This is a onetime offer so sign up now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-550459791556566428?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/550459791556566428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/05/new-spring-classes-and-special-one-time.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/550459791556566428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/550459791556566428'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/05/new-spring-classes-and-special-one-time.html' title='New Spring Classes and a Special One-time Discount'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-313902310299519107</id><published>2009-05-15T17:05:00.000-07:00</published><updated>2009-05-15T17:19:06.883-07:00</updated><title type='text'>Questions from Java "newbies"</title><content type='html'>I enjoyed being in a class with a wonderful group of students this week. The class was Intertech’s &lt;a href="http://www.intertech.com/Courses/Course.aspx?CourseID=99098"&gt;Complete Java&lt;/a&gt;. The group was not new to programming and they had a variety of software development backgrounds (some .NET developers, some mainframe developers, some Javascripters, some QA testers, and even a Python developer). This made for a lively class, full of great questions and plenty of prior experiences they (and I) could use to explore Java syntax and object-oriented programming concepts. A few of their questions required me to do a bit of research and therefore have earned their way as topics for discussion and learning in this blog.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. In Eclipse, is there a way to run the Javadoc tool against my code?&lt;/strong&gt; &lt;em&gt;[Thanks Pradeep]&lt;/em&gt;&lt;br /&gt;The answer is yes! While I knew this was possible, I wasn’t exactly sure of how this is done. It turns out using Javadoc from within Eclipse is a piece of cake. Given your Eclipse IDE is already configured to use the tools from a JDK, chances are good that it is already setup to generate Javadocs for your code with a simple menu selection. In Eclipse, look for the Project menu option on the Eclipse menu bar. Select Generate Javadoc… from the Project pull-down menu.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_Cy4Xw0LoxNc/Sg4EhnX9UMI/AAAAAAAAAD4/pwvunQzGlVE/s1600-h/eclipse1.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5336207584032280770" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 369px; CURSOR: hand; HEIGHT: 215px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_Cy4Xw0LoxNc/Sg4EhnX9UMI/AAAAAAAAAD4/pwvunQzGlVE/s400/eclipse1.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;This should cause the Generate Javadoc window to open where you can specify what members should be included (private up to public) and where the documents generated should be put. If the JDK’s bin folder and/or the javadoc.exe tool can’t be found, the same window allows you to point Eclipse to a valid Javadoc generating tool and configure it per your needs. &lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://3.bp.blogspot.com/_Cy4Xw0LoxNc/Sg4E6Oja2gI/AAAAAAAAAEA/dxffGOB6Tw0/s1600-h/eclipse2.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5336208006866196994" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 393px; CURSOR: hand; HEIGHT: 393px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_Cy4Xw0LoxNc/Sg4E6Oja2gI/AAAAAAAAAEA/dxffGOB6Tw0/s400/eclipse2.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;Once the Javadocs are created, the documents are used by Eclipse to produce hovers over the classes, methods, variables, etc.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://4.bp.blogspot.com/_Cy4Xw0LoxNc/Sg4FIATvfLI/AAAAAAAAAEI/9pZ9a0Ecea8/s1600-h/eclipse3.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5336208243560512690" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 346px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_Cy4Xw0LoxNc/Sg4FIATvfLI/AAAAAAAAAEI/9pZ9a0Ecea8/s400/eclipse3.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;2. Can a list of stored procedures in a database be obtained from JDBC’s DatabaseMetaData class?&lt;/strong&gt; &lt;em&gt;[Thanks Bill] &lt;/em&gt;&lt;br /&gt;Again the answer is yes! A DatabaseMetaData object provides all sorts of information about the database and database driver. The DatabaseMetaData interface defines 40+ fields and 100+ methods. The DatabaseMetaData object includes data about what schemas and tables are defined in the database. It allows developers to determine database capabilities programmatically, such as whether the database supports column aliasing. It also includes information such as the database name and version. To get a DatabaseMetaData object, request it from the JDBC Connection object.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;blockquote&gt;&lt;span style="font-family:arial;"&gt;Connection conn =&lt;br /&gt;DriverManager.getConnection("jdbc:mysql://localhost:3306/mydb","root","root");&lt;br /&gt;DatabaseMetaData md = conn.getMetaData();&lt;/span&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;With a DatabaseMetaData object, you can get the list of stored procedures from the database (provided your database supports stored procedures) by calling ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) on the DatabaseMetaData object. The ResultSet that is returned contains columns of data (listed below per the JDBC documentation) that describe the stored procedures.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;· PROCEDURE_CAT String =&gt; procedure catalog (may be null)&lt;br /&gt;· PROCEDURE_SCHEM String =&gt; procedure schema (may be null)&lt;br /&gt;· PROCEDURE_NAME String =&gt; procedure name&lt;br /&gt;· reserved for future use&lt;br /&gt;· reserved for future use&lt;br /&gt;· reserved for future use&lt;br /&gt;· REMARKS String =&gt; explanatory comment on the procedure&lt;br /&gt;· PROCEDURE_TYPE short =&gt; kind of procedure:&lt;br /&gt;· procedureResultUnknown - Cannot determine if a return value will be returned&lt;br /&gt;· procedureNoResult - Does not return a return value&lt;br /&gt;· procedureReturnsResult - Returns a return value&lt;br /&gt;· SPECIFIC_NAME String =&gt; The name which uniquely identifies this procedure within its schema.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;Thanks to my students. If you have a "newbie" Java question, please, send it to me at &lt;a href="mailto:jwhite@intertech.com"&gt;jwhite@intertech.com&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-313902310299519107?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/313902310299519107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/05/questions-from-java-newbies.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/313902310299519107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/313902310299519107'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/05/questions-from-java-newbies.html' title='Questions from Java &quot;newbies&quot;'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_Cy4Xw0LoxNc/Sg4EhnX9UMI/AAAAAAAAAD4/pwvunQzGlVE/s72-c/eclipse1.bmp' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-3134741934140946319</id><published>2009-05-06T21:53:00.000-07:00</published><updated>2009-05-06T21:57:14.987-07:00</updated><title type='text'>Free Expression Blend Presentation</title><content type='html'>My fellow Intertech instructor and award winning author Andrew Troelsen will be presenting at Intertech's next Oxygen Blast on on May 26th.  The topic is on Expression Blend. &lt;br /&gt;&lt;br /&gt;We’ll cap the registrations for the event at Microsoft at 120 and over the web at 250.  Both will fill.  If you’re interested, beat the pack and register today:&lt;br /&gt;Live At Microsoft:  &lt;a href="https://www.clicktoattend.com/invitation.aspx?code=135487"&gt;click here&lt;/a&gt;&lt;br /&gt;Live Over the Web:  &lt;a href="https://www.clicktoattend.com/invitation.aspx?code=135590"&gt;click here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-3134741934140946319?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/3134741934140946319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/05/free-expression-blend-presentation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/3134741934140946319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/3134741934140946319'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/05/free-expression-blend-presentation.html' title='Free Expression Blend Presentation'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-8946386988076274537</id><published>2009-05-06T21:43:00.000-07:00</published><updated>2009-05-06T21:52:10.230-07:00</updated><title type='text'>Spring Stereotype Components</title><content type='html'>As a Java coder, have you started to familiarize yourself with the "@"? That is, have you started applying annotations to your code to reduce XML configuration? Annotations are big and getting bigger in Java.  Spring Framework too has embraced annotations; especially as of Spring 2.5. In my latest article on DevX.com I provide an overview and tutorial (download the code!) of the Spring stereotype components and annotations. Of particular importance are the annotations used to develop Spring controllers. As of Spring 3.0, the old Spring MVC controller hierarchy is &lt;strong&gt;deprecated!&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://www.devx.com/Java/Article/41629"&gt;http://www.devx.com/Java/Article/41629&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Haven't had a chance to learn Spring yet? Come take our Intertech classes on Spring: &lt;a href="http://www.intertech.com/Courses/Course.aspx?CourseID=99367"&gt;Complete Spring Core &lt;/a&gt;and &lt;a href="http://www.intertech.com/Courses/Course.aspx?CourseID=99468"&gt;Complete Spring Web&lt;/a&gt;.  We offer classes on-site as well as virtually.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-8946386988076274537?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/8946386988076274537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/05/spring-stereotype-components.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/8946386988076274537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/8946386988076274537'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/05/spring-stereotype-components.html' title='Spring Stereotype Components'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-7002126541858574886</id><published>2009-04-21T19:10:00.000-07:00</published><updated>2009-04-21T19:12:13.456-07:00</updated><title type='text'>Intertech Podcasts</title><content type='html'>If you're a software developer (Java and .NET in particular) person, my company (Intertech, Inc.) has a free series of &lt;a href="http://mail2.intertech.com/owa/redir.aspx?C=80a0e14a7518455b924efaefbbe3ee91&amp;amp;URL=http%3a%2f%2fphobos.apple.com%2fWebObjects%2fMZStore.woa%2fwa%2fviewPodcast%3fid%3d273792874" target="_blank"&gt;Intertech Oxygen Blast Podcasts&lt;/a&gt;. These presentations cover .NET, Java, and Open Source technologies. Check 'em out!&lt;br /&gt;&lt;br /&gt;Look for Podcasts and Youtube presentations on my JavaFX talk soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-7002126541858574886?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/7002126541858574886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/04/intertech-podcasts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/7002126541858574886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/7002126541858574886'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/04/intertech-podcasts.html' title='Intertech Podcasts'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-3203004004808236665</id><published>2009-04-21T19:07:00.001-07:00</published><updated>2009-04-21T19:09:59.047-07:00</updated><title type='text'>DevX articles</title><content type='html'>Check out my two April articles on &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;DevX&lt;/span&gt;.com.&lt;br /&gt;&lt;br /&gt;The first on the introduction of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;JavaFX&lt;/span&gt; Mobile: &lt;a href="http://www.devx.com/Java/Article/41395"&gt;http://www.devx.com/Java/Article/41395&lt;/a&gt;&lt;br /&gt;The second is on the new (and consolidated) &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;JavaME&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;SDK&lt;/span&gt; 3.0: &lt;a href="http://www.devx.com/Java/Article/41505"&gt;http://www.devx.com/Java/Article/41505&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-3203004004808236665?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/3203004004808236665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/04/devx-articles.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/3203004004808236665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/3203004004808236665'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/04/devx-articles.html' title='DevX articles'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-6876303063115929299</id><published>2009-04-21T18:57:00.000-07:00</published><updated>2009-04-21T19:02:59.869-07:00</updated><title type='text'>Oracle buys Sun</title><content type='html'>While IBM was in the news, Oracle made the news with regard to a merger with Sun. Oracle announced April 20&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;th&lt;/span&gt; that they have entered into an agreement to purchase Sun &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Microsystems&lt;/span&gt; (see &lt;a href="http://www.oracle.com/us/corporate/press/018363"&gt;Oracle Press Release&lt;/a&gt;) . If all goes well, the acquisition is expected to be accomplished by this summer (2009).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-6876303063115929299?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/6876303063115929299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/04/oracle-buys-sun.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/6876303063115929299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/6876303063115929299'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/04/oracle-buys-sun.html' title='Oracle buys Sun'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-6683993378200655638</id><published>2009-04-15T20:07:00.001-07:00</published><updated>2009-04-15T20:12:21.027-07:00</updated><title type='text'>IBM and Sun - NOT</title><content type='html'>For now, it appears that the IBM/Sun merger is dead. Read all about the reasons why the deal - at least for now- has failed at &lt;a href="http://www.bloomberg.com/apps/news?pid=20601087&amp;amp;sid=aDivhuNbXRsM&amp;amp;refer=home"&gt;Bloomberg.com&lt;/a&gt;. So what's next for Sun? Jack Schofield offers up some opinions at&lt;br /&gt;&lt;a href="http://www.guardian.co.uk/technology/2009/apr/16/sun-microsystems-computing"&gt;the Guardian UK&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-6683993378200655638?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/6683993378200655638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/04/ibm-and-sun-not.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/6683993378200655638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/6683993378200655638'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/04/ibm-and-sun-not.html' title='IBM and Sun - NOT'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-9021442592501336204</id><published>2009-04-15T19:53:00.000-07:00</published><updated>2009-04-15T19:57:05.006-07:00</updated><title type='text'>Free Training Event</title><content type='html'>If you live in Minneapolis/St. Paul and are looking for some great free learning, consider attending &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Intertech's&lt;/span&gt; Oxygen Blast event at Microsoft. This free two seminar is titled “A Programmer's Introduction to Expression Blend” and is delivered by fellow &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Intertech&lt;/span&gt; instructor and best-selling .NET author .NET author Andrew &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Troelsen&lt;/span&gt;.&lt;br /&gt;Here’s more info:&lt;br /&gt;&lt;br /&gt;Date: 5/26/2009&lt;br /&gt;Time: 9:00 AM - 11:00 PM&lt;br /&gt;Location: Held at Microsoft Corporation, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;Bloomington&lt;/span&gt;, MN&lt;br /&gt;&lt;br /&gt;Description: If you are creating &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;WPF&lt;/span&gt; or &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;Silverlight&lt;/span&gt; applications, you have most certainly wondered about Expression Blend. While it is true that this tool is geared towards graphical artists, software engineers can also use this tool to simplify their &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;XAML&lt;/span&gt; creation efforts. In this talk, attendees learn the mechanics of working with Blend to author a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;UI&lt;/span&gt;, create animations, generate application resources, and establish data binding operations. During the process, numerous bits of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;XAML&lt;/span&gt; are clarified. No artistic experience required.&lt;br /&gt;&lt;br /&gt;To register: &lt;a href="https://www.clicktoattend.com/invitation.aspx?code=135487"&gt;https://www.clicktoattend.com/invitation.aspx?code=135487&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-9021442592501336204?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/9021442592501336204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/04/free-training-event.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/9021442592501336204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/9021442592501336204'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/04/free-training-event.html' title='Free Training Event'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-8012765569372440692</id><published>2009-03-31T10:16:00.000-07:00</published><updated>2009-03-31T10:35:10.145-07:00</updated><title type='text'>IBM and Sun Merger?</title><content type='html'>If you are afraid to open any business section of the newspaper or look at a financial web site for fear of seeing what has happened to your 401K, I certainly understand (and feel) your pain.  However, let me give you a reason to take look... IBM has been in discussion with Sun about a possible merger!&lt;br /&gt;&lt;br /&gt;While this may or may not impact your financial portfolio, it could definitely start to impact the technological landscape - especially as it relates to Java developers.  Since the news broke back on March 19 (&lt;a href="http://online.wsj.com/article/SB123735124997967063.html?mod=sphere_ts&amp;amp;mod=sphere_wd"&gt;http://online.wsj.com/article/SB123735124997967063.html?mod=sphere_ts&amp;amp;mod=sphere_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;wd&lt;/span&gt;&lt;/a&gt;) there has been little new information.  Heidi Moore from the Wall Street Journal has blogged about this and its possible meaning (see &lt;a href="http://blogs.wsj.com/digits/2009/03/31/ibm-sun-do-they-have-a-deal-does-it-matter/"&gt;http://blogs.wsj.com/digits/2009/03/31/ibm-sun-do-they-have-a-deal-does-it-matter/&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;I am not a financial expert nor enough of a business analyst to know long term how such a merger will impact our Java community.  But there are a long list of questions we should keep in mind should such an event happen.  I've noted some below.  Perhaps you have others...&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;em&gt;What happens to the Java platform and the Java Community Process which helps guide its direction?&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;em&gt;What happens to the more recent open source efforts that have &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;occurred&lt;/span&gt; with Java?  Would IBM maintain that direction?&lt;/em&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;em&gt;What does IBM control of Java mean for all the container providers (BEA, Oracle, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;JBoss&lt;/span&gt;, etc.), tool and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;API&lt;/span&gt; vendors?&lt;/em&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;&lt;em&gt;How does an IBM-led application platform compete with Microsoft?&lt;/em&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;em&gt;&lt;span style="font-family:Arial;"&gt;Many have suggested Sun is a company on the ropes.  Initial indications are that IBM is willing to pay a bit of a premium for Sun.  So what's the purpose of an IBM takeover - to avoid having Java and other Sun technology fall into the wrong hands or to take Java someplace it hasn't been before?  If so, where is that?&lt;/span&gt;&lt;/em&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span &gt;At this point, many more questions than answers, but we should all stay tuned and on alert.  The impact could be big for all of us.&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-8012765569372440692?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/8012765569372440692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/03/ibm-and-sun-merger.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/8012765569372440692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/8012765569372440692'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/03/ibm-and-sun-merger.html' title='IBM and Sun Merger?'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-8028692626194901158</id><published>2009-03-25T14:55:00.000-07:00</published><updated>2009-03-25T15:05:29.013-07:00</updated><title type='text'>JavaFX - the Java UI of the future?</title><content type='html'>If you haven’t downloaded and started playing around with JavaFX, it might be time to do so. Sun release JavaFX 1.1 in late February 2009. With this release, JavaFX Mobile is also released.&lt;br /&gt;&lt;br /&gt;What is JavaFX? It is a rich Internet application (RIA) technology that runs on any JVM. It is meant to provide “all the screens of your life” as Sun likes to say; from desktop to mobile handheld to consumer device. Take a look at the sample application I wrote for an upcoming talk… as seen on the desktop, via Web Start, on a browser and in a mobile emulator.&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_Cy4Xw0LoxNc/ScqqBnRUPEI/AAAAAAAAADg/atDX8HShy0U/s1600-h/desktop.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5317249254762495042" style="WIDTH: 221px; CURSOR: hand; HEIGHT: 320px" alt="" src="http://3.bp.blogspot.com/_Cy4Xw0LoxNc/ScqqBnRUPEI/AAAAAAAAADg/atDX8HShy0U/s320/desktop.bmp" border="0" /&gt;&lt;/a&gt; &lt;a href="http://2.bp.blogspot.com/_Cy4Xw0LoxNc/ScqqMq570vI/AAAAAAAAADo/_8E1WQdFZlQ/s1600-h/browser.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5317249444716729074" style="WIDTH: 162px; CURSOR: hand; HEIGHT: 320px" alt="" src="http://2.bp.blogspot.com/_Cy4Xw0LoxNc/ScqqMq570vI/AAAAAAAAADo/_8E1WQdFZlQ/s320/browser.bmp" border="0" /&gt;&lt;/a&gt; &lt;a href="http://4.bp.blogspot.com/_Cy4Xw0LoxNc/ScqqUgPhYAI/AAAAAAAAADw/wnTy44uLCEA/s1600-h/mobile.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5317249579293433858" style="WIDTH: 130px; CURSOR: hand; HEIGHT: 320px" alt="" src="http://4.bp.blogspot.com/_Cy4Xw0LoxNc/ScqqUgPhYAI/AAAAAAAAADw/wnTy44uLCEA/s320/mobile.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;JavaFX is a new scripting language based on Java, JavaScript, scalar vector graphics among other languages. JavaFX is and will continue to compete with Ajax, Adobe Flex, Microsoft Silverlight and other RIA technologies. It is a late comer to the RIA game. Some question if it might be too late to the game. Time will tell.&lt;br /&gt;&lt;br /&gt;So why should you examine it? Unlike many of the other RIA technologies, JavaFX is not just for desktops. It again is designed for all the user interfaces/device screens that users encounter. While Java has always espoused to WORA, JavaFX has a chance to really bring WORA to the thousands of screens/UIs that Java supports. It also leverages the entire Java API. While JavaFX is its own scripting language, a JavaFX script can call on other Java classes and vice versa. Also, JavaFX apps run on the JVM. Finally, because it is like Java and JavaScript, it should be easy to learn and use. JavaFX is a declarative, expression, full object-oriented language.&lt;br /&gt;&lt;br /&gt;Below are a few links to help you get going. Also, I will be presenting a free talk on JavaFX at Intertech on April 14th. You can sign up on our web site at &lt;a href="http://www.intertech.com/resource/briefings.aspx"&gt;http://www.intertech.com/resource/briefings.aspx&lt;/a&gt;. For those not located in the Twin Cities (Minnesota) area, the talk will also be offered from the virtual classroom so come join in the fun.&lt;br /&gt;&lt;br /&gt;Lastly, look for my upcoming paper on JavaFX Mobile at DevX.com (&lt;a href="http://www.devx.com/"&gt;http://www.devx.com/&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;em&gt;Some links you can use to explore JavaFX&lt;/em&gt;&lt;/u&gt;&lt;br /&gt;JavaFX Website (Overview, FAQ, download): &lt;a href="http://javafx.com/"&gt;http://javafx.com/&lt;/a&gt;&lt;br /&gt;JavaFX SDK version 1.1: &lt;a href="http://javafx.com/downloads"&gt;http://javafx.com/downloads&lt;/a&gt;&lt;br /&gt;Sun's JavaFX tutorial site: &lt;a href="http://java.sun.com/javafx/1/tutorials/core/index.html"&gt;http://java.sun.com/javafx/1/tutorials/core/index.html&lt;/a&gt;&lt;br /&gt;Free JavaFX tutorial offered online: &lt;a href="http://www.javapassion.com/javafx/"&gt;http://www.javapassion.com/javafx/&lt;/a&gt;&lt;br /&gt;Sun JavaFX building GUI tutorial: &lt;a href="http://java.sun.com/javafx/1/tutorials/ui/index.html"&gt;http://java.sun.com/javafx/1/tutorials/ui/index.html&lt;/a&gt;&lt;br /&gt;JavaFX API Javadocs: &lt;a href="http://java.sun.com/javafx/1.1/docs/api/"&gt;http://java.sun.com/javafx/1.1/docs/api/&lt;/a&gt;&lt;br /&gt;JavaFX language reference: &lt;a href="http://openjfx.java.sun.com/current-build/doc/reference/JavaFXReference.html"&gt;http://openjfx.java.sun.com/current-build/doc/reference/JavaFXReference.html&lt;/a&gt;&lt;br /&gt;JavaFX Blog: &lt;a href="http://learnjavafx.typepad.com/weblog/2008/02/getting-plutoed.html"&gt;http://learnjavafx.typepad.com/weblog/2008/02/getting-plutoed.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-8028692626194901158?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/8028692626194901158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/03/javafx-java-ui-of-future.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/8028692626194901158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/8028692626194901158'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/03/javafx-java-ui-of-future.html' title='JavaFX - the Java UI of the future?'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_Cy4Xw0LoxNc/ScqqBnRUPEI/AAAAAAAAADg/atDX8HShy0U/s72-c/desktop.bmp' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-5617861433706850738</id><published>2009-02-23T17:36:00.000-08:00</published><updated>2009-02-23T17:51:19.277-08:00</updated><title type='text'>A new and united Java ME SDK</title><content type='html'>In October, Sun released an early access of the new Java ME SDK 3.0.  This SDK promises to unite all the Java ME SDKs to include what is the Sun Wireless Toolkit (WTK) for CLDC/MIDP development, the Sun Java Toolkit for CDC as well as integrated tools and libraries for BD-J and the Lightweight User Interface Toolkit (LWUIT).  In addition to the uniting the Java ME SDK's, this new SDK provides some very useful tools to include profiling, a device database and search tool, and on-device debugging.  The underlying virtual machine also uses the CLDC Hotspot Implementation Virtual Machine (in place of the KVM used with the WTK).&lt;br /&gt;&lt;br /&gt;Based on an email from Radko Najman, the final release of the product should be available by JavaOne 2009.  In fact, he indicated they hope to have a final release out by March or April.&lt;br /&gt;&lt;br /&gt;Find out more about this new SDK at &lt;a href="http://java.sun.com/javame/downloads/sdk30ea.jsp"&gt;http://java.sun.com/javame/downloads/sdk30ea.jsp&lt;/a&gt;.  Also, look for my upcoming article on the SDK on &lt;a href="http://www.devx.com/"&gt;http://www.DevX.com&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-5617861433706850738?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/5617861433706850738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/02/new-and-united-java-me-sdk.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/5617861433706850738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/5617861433706850738'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/02/new-and-united-java-me-sdk.html' title='A new and united Java ME SDK'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-3653868266724681581</id><published>2009-02-04T10:15:00.000-08:00</published><updated>2009-02-04T10:41:47.390-08:00</updated><title type='text'>The Eclipse Classpath</title><content type='html'>Tools can be a funny thing. They are meant to help shorten the time it takes to complete a task. But when you are unfamiliar with how the tool works, it can sometimes take longer than if the tool didn’t exist.&lt;br /&gt;Eclipse, and most integrated development environments (IDEs), are that way. It is an extremely powerful tool in the right hands. In the hands of a novice, sometimes it can be overwhelming.&lt;br /&gt;&lt;br /&gt;Novice Java developers are taught about the classpath in their first days or hours of learning the Java programming language. When using java.exe and javac.exe command line tools, the classpath is usually transparent or can be made transparent with a simple call to setenv. When developers step up to an IDE, what the classpath is and what it points to isn’t so clear anymore. So, if you are just learning Java and need some help on the where to set and get information on the classpath, this posting is for you!&lt;br /&gt;&lt;br /&gt;By the way, take heart. The reason I make this post is because so many of my students have had questions about the classpath or wrestled with problems due to the classpath setting in the IDE that I felt compelled to write this post in hopes of alleviating some future student’s pain. So you are not alone.&lt;br /&gt;&lt;br /&gt;Maybe one of the largest issues with classpath and Eclipse is that there are so many places to set and affect the classpath. So, let’s address them one at a time.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;The Project Properties&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;First, start Eclipse and right click on a project folder in the Package Explorer view. Select Properties from the menu that results.&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYnb78B2xAI/AAAAAAAAABo/EXIVPW-YsIQ/s1600-h/classpath1.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5299008259350774786" style="WIDTH: 100px; CURSOR: hand; HEIGHT: 200px" alt="" src="http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYnb78B2xAI/AAAAAAAAABo/EXIVPW-YsIQ/s200/classpath1.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;A Properties window like that shown below will appear.&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYneAkEr-dI/AAAAAAAAABw/OjI08BK5xz8/s1600-h/classpath2.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5299010537842801106" style="WIDTH: 200px; CURSOR: hand; HEIGHT: 165px" alt="" src="http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYneAkEr-dI/AAAAAAAAABw/OjI08BK5xz8/s200/classpath2.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Select Java Build Path from the menu on the left hand side. A series of tabs (Source, Projects, Libraries, Order and Export) appear. It is on these tabs that you can set the “build” classpath. That is, you can set where Java will find class files, Jar files and other resources when it is compiling (building) your application. The Source tab allows you to specify folders of source code (typically folders containing the packages and .java files for your project). The Projects tab allows you to include the code from other Eclipse projects into the building. Finally, the Libraries tab allows you to specify libraries of classes to add to your build – either external or internal to Eclipse.&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_Cy4Xw0LoxNc/SYneXwELkrI/AAAAAAAAAB4/fpBvPudlU-8/s1600-h/classpath3.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5299010936198894258" style="WIDTH: 200px; CURSOR: hand; HEIGHT: 194px" alt="" src="http://2.bp.blogspot.com/_Cy4Xw0LoxNc/SYneXwELkrI/AAAAAAAAAB4/fpBvPudlU-8/s200/classpath3.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Selecting the Add JARs button on this tab allows you to add a Java library (JAR or ZIP file of classes) that is known to Eclipse (that is part of an open Eclipse project). The Add External JARs button allows you to add a Java library that is available via your computer’s file system or network (essentially any library reachable by your machine). The Add Library button allows you to add the classes (via Java library) of a Java/Eclipse plug-in, tool (like JUnit), or framework (like Struts or JSF) that is known and installed with Eclipse.&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_Cy4Xw0LoxNc/SYneq3MU4uI/AAAAAAAAACA/b_AmKoekDoo/s1600-h/classpath4.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5299011264529621730" style="WIDTH: 187px; CURSOR: hand; HEIGHT: 200px" alt="" src="http://3.bp.blogspot.com/_Cy4Xw0LoxNc/SYneq3MU4uI/AAAAAAAAACA/b_AmKoekDoo/s200/classpath4.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The Add Class Folder button allows you to add the classes from any folder of any project that is open in Eclipse.&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_Cy4Xw0LoxNc/SYne57kHKVI/AAAAAAAAACI/Q286xhOLpfU/s1600-h/classpath5.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5299011523401165138" style="WIDTH: 152px; CURSOR: hand; HEIGHT: 200px" alt="" src="http://2.bp.blogspot.com/_Cy4Xw0LoxNc/SYne57kHKVI/AAAAAAAAACI/Q286xhOLpfU/s200/classpath5.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;And of course the Add External Class Folder button allows you to add classes from any folder on your computer’s file system or network to your build. I skipped one button; the Add Variable button. That’s covered in the next section.&lt;br /&gt;&lt;br /&gt;By the way, as a short cut, you can also adjust the build path by right clicking on a project in the Package Explorer view and selecting Build Path from the menu.&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_Cy4Xw0LoxNc/SYnfQaKPhwI/AAAAAAAAACQ/yUxEWGODtBY/s1600-h/classpath6.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5299011909571282690" style="WIDTH: 200px; CURSOR: hand; HEIGHT: 120px" alt="" src="http://4.bp.blogspot.com/_Cy4Xw0LoxNc/SYnfQaKPhwI/AAAAAAAAACQ/yUxEWGODtBY/s200/classpath6.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;Variables &lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;So what does the variable button do? If you click on it, you’ll see you can add a variable to the build path but what does that mean?&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_Cy4Xw0LoxNc/SYnfgyaD_yI/AAAAAAAAACY/p98LC3ctav4/s1600-h/classpath7.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5299012190957993762" style="WIDTH: 200px; CURSOR: hand; HEIGHT: 156px" alt="" src="http://2.bp.blogspot.com/_Cy4Xw0LoxNc/SYnfgyaD_yI/AAAAAAAAACY/p98LC3ctav4/s200/classpath7.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Close the project properties window and return to the Eclipse window. In Eclipse, select the Window &gt; Preferences menu option on the menu bar.&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_Cy4Xw0LoxNc/SYnfvNy8noI/AAAAAAAAACg/CxEtFhSpQaM/s1600-h/classpath8.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5299012438828293762" style="WIDTH: 200px; CURSOR: hand; HEIGHT: 109px" alt="" src="http://4.bp.blogspot.com/_Cy4Xw0LoxNc/SYnfvNy8noI/AAAAAAAAACg/CxEtFhSpQaM/s200/classpath8.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;In the Preferences window that appears, locate the Java &gt; Build Path &gt; Classpath Variable option in the menu on the left (see the image below, it can be a little tricky to find in this large menu.&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_Cy4Xw0LoxNc/SYnf9Fuk56I/AAAAAAAAACo/EW4-65Dm-R4/s1600-h/classpath9.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5299012677180647330" style="WIDTH: 200px; CURSOR: hand; HEIGHT: 73px" alt="" src="http://4.bp.blogspot.com/_Cy4Xw0LoxNc/SYnf9Fuk56I/AAAAAAAAACo/EW4-65Dm-R4/s200/classpath9.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;A classpath variable allows you to define a variable or alias to a folder with class files or a specific JAR file. Then, the variable can simply be added to the classpath of either the build or runtime configuration (see below). A variable helps you easily refer to a particular library without having to remember where it is. Also, it allows the location to change without having to change the project – just change the variable’s path. This can be particularly useful if the library is shared by several projects.&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_Cy4Xw0LoxNc/SYngM3RTd9I/AAAAAAAAACw/KnpIaCLJNr4/s1600-h/classpath10.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5299012948177680338" style="WIDTH: 200px; CURSOR: hand; HEIGHT: 165px" alt="" src="http://2.bp.blogspot.com/_Cy4Xw0LoxNc/SYngM3RTd9I/AAAAAAAAACw/KnpIaCLJNr4/s200/classpath10.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;The Runtime Configuration&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;The classes that are available to build the application are not always the same as the classes available to run the application. When you are ready to run your application, most people just click on the Run As or Debug As icons in the Eclipse toolbar; unaware that Eclipse is setting up an environment complete with a classpath to execute your code. When you run or debug your application, Eclipse sets up what is called a runtime configuration. That configuration includes a classpath telling the Java VM where it should locate classes, libraries, etc. needed as the application is executed. You can modify this execution or runtime classpath as well.&lt;br /&gt;&lt;br /&gt;Right click on one of your executable classes or projects in the Package Explorer view. Select either the Run As… or Debug As… option from the menu that appears. From the sub-menu that appears, notice the Run Configurations… or Debug Configurations… option that is presented.&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_Cy4Xw0LoxNc/SYnghUSVUiI/AAAAAAAAADA/M3rvlsReF1s/s1600-h/classpath11.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5299013299564007970" style="WIDTH: 200px; CURSOR: hand; HEIGHT: 48px" alt="" src="http://2.bp.blogspot.com/_Cy4Xw0LoxNc/SYnghUSVUiI/AAAAAAAAADA/M3rvlsReF1s/s200/classpath11.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Select the Run Configurations… option and a Run Configurations window like the one shown below should appear.&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYng1OW1ecI/AAAAAAAAADI/LVjF5ZcNoRg/s1600-h/classpath12.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5299013641569663426" style="WIDTH: 200px; CURSOR: hand; HEIGHT: 164px" alt="" src="http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYng1OW1ecI/AAAAAAAAADI/LVjF5ZcNoRg/s200/classpath12.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;In the menu on the left hand side, find the Java Application listing. These are your runtime configurations. By default, the name of the configuration usually matches the name of your executing class. In the Main tab to the right, notice the “Main class” field. This is the class that is going to be executed when you request your project or class “Run As…” Click on the Classpath tab and you see a display similar to that below.&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYnhCafs8lI/AAAAAAAAADQ/4mdNvz-t0NE/s1600-h/classpath13.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5299013868166378066" style="WIDTH: 200px; CURSOR: hand; HEIGHT: 146px" alt="" src="http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYnhCafs8lI/AAAAAAAAADQ/4mdNvz-t0NE/s200/classpath13.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;By expanding the entry trees, you can see all the file folders and libraries that are part of the runtime classpath and are accessible to your application as it is execute. Again, with the buttons on this window, you can choose to add or remove file folders and libraries (internal or external JAR or ZIP files) to the classpath. By default, the runtime classpath should contain the same file folders and libraries as your build path.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;A classpath checker&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;For those that find they have some issues with duplicate classes or classes not found, you may want to take a look at the Classpath Checker Eclipse plug-in (available &lt;a href="http://classpathchecker.free.fr/"&gt;here&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;This tool will detect missing JAR files and help detect if you have classes coming from more than one location (duplicate classes).&lt;br /&gt;Hope this helps developers trying to untangle the mystery of classpath in Eclipse. If you need help learning Java or other open source technology, come join me in class (www.intertech.com).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-3653868266724681581?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/3653868266724681581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/02/eclipse-classpath.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/3653868266724681581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/3653868266724681581'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/02/eclipse-classpath.html' title='The Eclipse Classpath'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYnb78B2xAI/AAAAAAAAABo/EXIVPW-YsIQ/s72-c/classpath1.JPG' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3629115681334104374.post-3157135529580144429</id><published>2009-02-03T21:20:00.001-08:00</published><updated>2009-02-03T21:35:56.516-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Annotations'/><category scheme='http://www.blogger.com/atom/ns#' term='Spring 3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Spring MVC'/><title type='text'>Spring is on its way!</title><content type='html'>&lt;div&gt;In Minnesota, winter is a long hard season. We usually don’t start thinking about spring until the lakes unfreeze and fishing season begins – that’s May those unfamiliar with the territory.&lt;br /&gt;&lt;br /&gt;But this year, Spring of a different nature arrives early. The Spring I am speaking of is the Spring Framework. Spring Framework 3.0 Milestone 1 is out (download it &lt;a href="http://www.springsource.com/download/community?project=Spring%20Framework"&gt;here&lt;/a&gt;), arriving in December ’08 with the final release expected… no pun intended… this spring. Major additions and changes include: requiring Java 5 and J2EE 1.4, support for RESTful Web Services, the introduction of Spring expression language (EL). To learn more about Spring 3.0, I point you to the &lt;a href="http://blog.springsource.com/2008/12/05/spring-framework-30-m1-released/"&gt;blog&lt;/a&gt; and &lt;a href="http://www.springsource.org/"&gt;web site&lt;/a&gt; of the experts.&lt;br /&gt;&lt;br /&gt;However, what I found very interesting about Spring 3.0 can be found in the Spring MVC module. In Spring 2.5, the Spring MVC framework adopted annotation-based controllers as an alternative to the large hierarchy of Spring MVC controller classes (see diagram below).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_Cy4Xw0LoxNc/SYkofrGZTtI/AAAAAAAAABY/wwxRanLEGMM/s1600-h/mvchier.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5298810961188703954" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 238px" alt="" src="http://3.bp.blogspot.com/_Cy4Xw0LoxNc/SYkofrGZTtI/AAAAAAAAABY/wwxRanLEGMM/s320/mvchier.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In fact, these annotation-based controllers were just one of many “stereotype” annotations. Components with stereotype annotations (let’s call the stereotypical components) are meant to clearly identify the components serving in each role of the application – especially as it relates to the model-view-controller rolled environment. The drive behind stereotypical components is that these classes do not have to extend any base class or reference a Spring, Servlet, or other API. One thing about the Spring Framework – it has always embraced loose coupling!&lt;br /&gt;&lt;br /&gt;With the Spring Framework 3.0, I was surprised to find that the intent of the Spring project team is to take this shift in design to the next level – and to do it NOW. The MVC controller hierarchy that many in the Spring development community have become familiar with (and embraced over Struts or JSF in many cases) is being deprecated in favor of the new annotation/stereotypical model. Read the following quote from Rod Johnson (Spring founder, project lead and CEO of Spring Source) from an interview with &lt;a href="http://www.infoq.com/interviews/Spring-3.0-Rod-Johnson"&gt;InfoQ&lt;/a&gt; on Jan 22nd.&lt;br /&gt;&lt;br /&gt;&lt;font color="#000099" size="2"&gt;&lt;em&gt;In Spring framework 3.0 there will be a number of deprecations, for example, the old MVC controller hierarchy. We view the Annotation based Spring MVC usage model that we introduced in Spring 2.5 is being a far superior replacement. That will be deprecated in Spring framework 3.0 and in the next version, whether it's 3.1 or 4.0, those classes will be removed. We don't approach deprecation the way some seem to approach deprecation, which is "Let's put a message into it" that will take years when they compile a code. Our view on deprecation is that it is a serious statement of intent. If we deprecate something we are saying "Hey, guys, it's time to think getting off this because we don't think it's a good usage model anymore." There will certainly be a bit of - if you like - Spring cleaning in the next release after Spring 3.0. Probably the most obvious part will be the Spring MVC controller hierarchy.&lt;/em&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;I applaud the Spring team for its position on deprecation. On every project I have been on, it seems there is at least one consultation with a novice developer about why using many of the java.util.Date methods is a bad idea. While Sun deals with a different extent of concerns and legacy support, I often wonder when, if ever, we’ll see Java deprecated classes and methods leave the JDK.&lt;br /&gt;&lt;br /&gt;However, I am anxious to see how the Spring community embraces this large change. A lot of applications have been built with Spring MVC. In large enterprise applications that have embraced Spring MVC, the “spring cleaning” may not be easily accomplished. Many of us have seen development shops stop upgrading a framework environment because of backward compatibility issues. In corporate environments, there is usually little appetite (read money) for upgrading frameworks and addressing backward compatibility issues. It can push an application under the label “legacy” too quickly.&lt;br /&gt;&lt;br /&gt;And while the entire Java community is embracing annotations as a gift from above, I often wonder if application architects and lead developers have stopped to examine potential hazards of them as well. &lt;a href="http://www.oracle.com/technology/pub/columns/annotations_opinion.html"&gt;Mike Keith&lt;/a&gt; posted an excellent exploration of some of the general pros/cons regarding annotations that all should take a look at. Dave Minter and Jeff Linwood have also addressed some of the pros and cons as they relate to Hibernate’s use of annotations in their book &lt;a href="http://www.infibeam.com/Books/info/Dave-Minter/Beginning-Hibernate-From-Novice-to-Professional/1590596935.html"&gt;Beginning Hibernate&lt;/a&gt;. Although these articles may be somewhat dated and not commenting on Spring annotations, architects and developers would benefit from a quick glance to see if some arguments (and potential issues) apply to their Spring world?&lt;br /&gt;&lt;br /&gt;Before someone takes this posting as a diatribe against Spring, Spring MVC or annotations, allow me to caveat. As a 20 year veteran of software development and as educator of those entering our ranks, I have taken the view that it is the responsibility of any developer to inspect all sides of a software problem and solution. As I tell my students, there is no free lunch in software engineering. There are always pros and cons (I joke that those that do not believe or understand that are called sales people or consultants). An understanding of those sides is critical to success in our business. In the case of Spring MVC annotations, there is a lot on the pro side as well; ...did I mention the loose coupling?&lt;br /&gt;&lt;br /&gt;So, what’s your take? Will the Spring stereotype model and MVC annotations help your world? If so why? If not, again why? I welcome your thoughts and comments.&lt;br /&gt;&lt;br /&gt;If you are looking at Spring and want to learn more, I encourage you to join me in the classroom for our &lt;a href="http://www.intertech.com/Courses/Course.aspx?CourseID=99367"&gt;Complete Spring&lt;/a&gt; class. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3629115681334104374-3157135529580144429?l=whitesboard.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whitesboard.blogspot.com/feeds/3157135529580144429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whitesboard.blogspot.com/2009/02/spring-is-on-its-way.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/3157135529580144429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3629115681334104374/posts/default/3157135529580144429'/><link rel='alternate' type='text/html' href='http://whitesboard.blogspot.com/2009/02/spring-is-on-its-way.html' title='Spring is on its way!'/><author><name>JDub</name><uri>http://www.blogger.com/profile/14808273424875181014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_Cy4Xw0LoxNc/SYd-tZSmp_I/AAAAAAAAAAM/MQaId-DhYAw/S220/JimWhite.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_Cy4Xw0LoxNc/SYkofrGZTtI/AAAAAAAAABY/wwxRanLEGMM/s72-c/mvchier.jpg' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
