<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Walter Hardy's Blog</title>
	<atom:link href="http://blogs.whardy.com/walter/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.whardy.com/walter</link>
	<description>W. Hardy Interactive, Inc. Blogs</description>
	<pubDate>Wed, 11 Nov 2009 00:44:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>The operating system that keeps on ticking</title>
		<link>http://blogs.whardy.com/walter/2009/11/10/the-operating-system-that-keeps-on-ticking/</link>
		<comments>http://blogs.whardy.com/walter/2009/11/10/the-operating-system-that-keeps-on-ticking/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 00:22:55 +0000</pubDate>
		<dc:creator>Walter</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Sun Java Technology]]></category>

		<category><![CDATA[Direcotry Server]]></category>

		<category><![CDATA[glassfish]]></category>

		<category><![CDATA[Instant Messaging]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[liferay]]></category>

		<category><![CDATA[moodle]]></category>

		<category><![CDATA[MySQL]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[solaris]]></category>

		<category><![CDATA[Sun]]></category>

		<guid isPermaLink="false">http://blogs.whardy.com/walter/?p=18</guid>
		<description><![CDATA[I am constantly amazed at how stable Sun Solaris is. Since many of our company websites run on Windows 2003 with IIS, I’m very accustomed to having to reboot servers weekly, and getting early morning wake-up calls from our server watchdogs.
But Solaris&#8211;it just doesn’t quit. I had left one production Solaris 10 server running for [...]]]></description>
			<content:encoded><![CDATA[<p>I am constantly amazed at how stable Sun Solaris is. Since many of our company websites run on Windows 2003 with IIS, I’m very accustomed to having to reboot servers weekly, and getting early morning wake-up calls from our server watchdogs.</p>
<p>But Solaris&#8211;it just doesn’t quit. I had left one production Solaris 10 server running for over 360 days to the point where I was really scared to reboot it. Not because the operating system wouldn’t handle the reboot, but because the hardware just might not come back to life after a momentary loss of power. So I went down to our hosting facility to be in person during a hard reboot, and I was pleased to see it come back on-line without a hitch.  </p>
<p>My firm hosts and maintains the student on-line training website for Sun Microsystems: <a href="http://www.SunStudentCourses.com">www.SunStudentCourses.com</a>. We built it on the open-source Course Management System, <a href="http://www.Moodle.org">Moodle</a> (moodle.org) and it runs on Solaris 10 with PHP, <a href="https://glassfish.dev.java.net/">Glassfish </a>application server and MySQL.</p>
<p>I have also hosted a collaboration system for Sun Microsystems with <a href="http://www.sun.com/software/products/instant_messaging/index.xml">Sun Java Systems Instant Messaging</a> and <a href="http://www.sun.com/software/products/directory_srvr_ee/index.jsp">Directory Server</a>, as well as a portal system with <a href="http://www.liferay.com/web/guest/home">Liferay</a>—all on Solaris. These systems rarely, if ever crash. </p>
<p>Solaris really is a great choice for a firm who hosts their own websites. Just the fact that operating system instances can be divided into zones on a single machine is a wonderful benefit!</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.whardy.com/walter/2009/11/10/the-operating-system-that-keeps-on-ticking/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Our New Hosting Environment</title>
		<link>http://blogs.whardy.com/walter/2008/10/29/our-new-hosting/</link>
		<comments>http://blogs.whardy.com/walter/2008/10/29/our-new-hosting/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 21:41:22 +0000</pubDate>
		<dc:creator>Walter</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[cold fusion]]></category>

		<category><![CDATA[glassfish]]></category>

		<category><![CDATA[hosting]]></category>

		<category><![CDATA[liferay]]></category>

		<category><![CDATA[moodle]]></category>

		<category><![CDATA[plug and play]]></category>

		<category><![CDATA[solaris]]></category>

		<category><![CDATA[Sun]]></category>

		<category><![CDATA[sun microsystems]]></category>

		<guid isPermaLink="false">http://blogs.whardy.com/walter/?p=17</guid>
		<description><![CDATA[I am excited to announce that we have completed the move of our hosting environment to the Plug and Play Technology center in Sunnyvale, CA.]]></description>
			<content:encoded><![CDATA[<p>I am excited to announce that we have completed the move of our hosting environment to the <a href="http://www.plugandplaytechcenter.com/">Plug and Play Tech Center</a> in Sunnyvale, CA. This high-tech hosting environment provides us with ample room for growth with additional bandwidth, services and space.  </p>
<p>The Plug and Play Tech Center provides both office and hosting space to over 100 startups in Silicon Valley.  It provides for an environment where companies can grow, seek venture capitalists and network with each other. The collocation hosting space is first-rate and new, with multi-homed bandwidth, backup power systems and more.</p>
<p>In addition, we have upgraded our ColdFusion hosting environment from several single-server instances to an enterprise system where we are more easily able to launch instances and load-balance our clients’ popular, high-traffic websites. </p>
<p>We continue to also administer and host on Solaris, including Sun Microsystems&#8217; student learning site, <a href="http://www.SunStudentCourses.com">SunStudentCourses.com</a> and their collaboration service, <a href="http://share.java.net">share.java.net</a>. To support and host these two key web presences, we run Sun Access Manager, Directory Server, Web Server, Instant Messaging Server, the open-source application server, <a href="http://glassfish.dev.java.net/">Glassfish</a>, and the open-source on-line training system <a href="http://www.Moodle.org">Moodle</a>.  We are also assisting Sun in the development of new technology for its expansive developer community using the open-source portal server, <a href="http://www.Liferay.com">Liferay</a>.</p>
<p>Relocating our servers to The Plug and Play Tech Center has been a great move for us. Not only are we able to better control costs, we are also provided with abundant high-speed bandwidth and the latest in uninterrupted hosting services. The Center allows us to more easily engage with other growing businesses in the San Francisco Bay area and Silicon Valley. The center is well networked with high-bandwidth pipes to both Yahoo and Google, allowing our Search-Engine Optimization technology to function even more efficiently.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.whardy.com/walter/2008/10/29/our-new-hosting/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The New Generation of Search Engine Optimization</title>
		<link>http://blogs.whardy.com/walter/2008/05/07/the-new-generation-of-search-engine-optimization/</link>
		<comments>http://blogs.whardy.com/walter/2008/05/07/the-new-generation-of-search-engine-optimization/#comments</comments>
		<pubDate>Wed, 07 May 2008 19:00:56 +0000</pubDate>
		<dc:creator>Walter</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blogs.whardy.com/walter/?p=12</guid>
		<description><![CDATA[Not too many years&#8212;or even months&#8212;ago, there was a concept to &#8220;optimize&#8221; a website for search-engine positioning. Companies existed for the sake of providing Search Engine Optimization services. For a thousand dollars or more, a firm would perform a comprehensive evaluation of a website and offer a set of recommendations on how to better optimize [...]]]></description>
			<content:encoded><![CDATA[<p>Not too many years&mdash;or even months&mdash;ago, there was a concept to &#8220;optimize&#8221; a website for search-engine positioning. Companies existed for the sake of providing Search Engine Optimization services. For a thousand dollars or more, a firm would perform a comprehensive evaluation of a website and offer a set of recommendations on how to better optimize it for best possible search engine ranking. These recommendations may include installing a comprehensive set of Meta tags in pages, writing content to include more repetitive key words, extending the domain expiration and much more. </p>
<p><span id="more-12"></span></p>
<p>Today things are quite different. To truly &#8220;optimize&#8221; a website for search-engine positioning, the website must be designed from the ground-up for this purpose. In addition, it&#8217;s not enough to remain passive and expect your visitors to come to you, but rather content must be &#8220;distributed&#8221; in various forms out to the Internet.
</p>
<p>My firm recently had an opportunity to do exactly this. I was inspired after having attended Google Developers Day Conference 2007 to approach Search Engine Optimization in a new way. Following this conference last May, we set out on a large-scale development process for a major real estate firm: Vermont Country Properties Sotheby&#8217;s International Realty. The end result can be viewed now at: <A HREF="http://www.VermontCountryProperties.com" target="_blank" class="entry">www.VermontCountryProperties.com</A> (see screen capture below).
</p>
<p>We found that to successfully achieve optimal Search Engine Positioning, we had to reinvent the website. Since this website&#8217;s key user experience is about searching for real estate properties (over 10,000 of them), we needed to do away with the old form-submission process and replace it with a set of actively-built links. Search engines don&#8217;t make form submissions, but they do follow links!
</p>
<p>We engineered this new website so that thousands of links permeate from the home page. In fact, the software intelligently generates these unique content pages with pertinent Meta, Title and descriptive content. We achieved this by building a system that classifies real estate properties into major regions, towns, resorts, prices, property types and lifestyle choices. The software then builds a link for each and every combination of these. In addition, a back-end administration allows the client to further populate content by entering town and region textual descriptions and photographs. This staff-entered content intelligently builds into pages based on the user&#8217;s search.
</p>
<p>The end result is that Google (and other search engines) will index a tremendous amount of content that is very specific in nature. An example would be a potential home buyer searching for &#8220;Lake-access homes over $300,000 in Southern Vermont&#8221;. The search engine will have already indexed a page fitting this description with content that exactly meets the user&#8217;s interest and need. There is a very good possibility that our page will appear first in a search, because our content so precisely matches the user&#8217;s search.
</p>
<p>Another issue is that our client required a Flash-branded home page to match the Sotheby&#8217;s International corporate website. We initially experimented with displaying this link-based navigation system outside of the Flash, but it only served to complicate the user experience. We obviously didn&#8217;t want to build the navigation into the Flash, as search-engines stop dead at Flash, completely unable to read or index content!
</p>
<p>The solutions we choose was to develop a CSS/JavaScript menu system that resides on-top of the Flash. We even added technology to provide a simplified link system for non-JavaScript enabled browsers in the event that some search engine refused to execute the JavaScript. We wrote code so that the Flash and CSS/JavaScript menu communicate with each other. One reason for this is that we wanted to stop the Flash movie (or complete a transition) when the JavaScript menus are opened.
</p>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="grey3"><img src="http://www.whardy.com/images/SEO/1.gif" alt="Ready to Install" border="0" /></td>
</tr>
<tr>
<td height="10">
</td>
</tr>
<tr>
<td class="grey3" bgcolor="#dadada">
<div class="pad6">
<div align="center"><span class="dkcaption1">VermontCountryProperties.com&mdash;Flash with CSS/JavaScript Navigation Open</span></div>
</div>
</td>
</tr>
</table>
<p>The next step to further integrate content access the Web is to distribute content via XML. This is our next phase in building the site. It will allow real estate linings to appear in Google map directories and more. I&#8217;ll write more about this soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.whardy.com/walter/2008/05/07/the-new-generation-of-search-engine-optimization/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New Development with the Liferay Open Source Portal Server</title>
		<link>http://blogs.whardy.com/walter/2008/05/07/new-development-with-the-liferay-open-source-portal-server/</link>
		<comments>http://blogs.whardy.com/walter/2008/05/07/new-development-with-the-liferay-open-source-portal-server/#comments</comments>
		<pubDate>Wed, 07 May 2008 19:00:30 +0000</pubDate>
		<dc:creator>Walter</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Sun Java Technology]]></category>

		<guid isPermaLink="false">http://blogs.whardy.com/walter/?p=11</guid>
		<description><![CDATA[Today at the huge technology conference in San Francisco, JavaOne, Sun Microsystems announced an open source initiative with Liferay, Inc. I am also glad to announce that my firm has been working with Sun this year to create a Social Networking application based on the Liferay Portal Server.

I have written on this project in earlier [...]]]></description>
			<content:encoded><![CDATA[<p>Today at the huge technology conference in San Francisco, JavaOne, Sun Microsystems announced an open source initiative with Liferay, Inc. I am also glad to announce that my firm has been working with Sun this year to create a Social Networking application based on the Liferay Portal Server.</p>
<p><span id="more-11"></span></p>
<p>I have written on this project in earlier “Learning Curve” blog entries when we were developing with the Sun Java System Portal Server. But in knowing that Sun would soon adopt Liferay as one of its offerings (while continuing to offer the Java System Portal Server as well), we choose to change course and start development with Liferay. It’s been a lot of fun so far, and this is an exciting project for us as we have opportunity to invent things in new ways.</p>
<p>I will continue the Learning Curve series on creating a Social Networking application with Liferay soon, and also post more details about this application!</p>
<p>See also:</p>
<ul>
<li><a href="http://www.sun.com" target="_blank">Sun’s Website</A>
<li><a href="http://www.sun.com/aboutsun/pr/2008-05/sunflash.20080507.2.xml" target="_blank">Sun’s Press Release on Joining with Liferay</A>
<li><a href="http://www.liferay.com" target="_blank">Liferay’s Website</A>
<li><a href="http://www.liferay.com/web/guest/about_us/news/sun" target="_blank">Liferay’s Press Release on Joining with Sun Microsystems</A>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blogs.whardy.com/walter/2008/05/07/new-development-with-the-liferay-open-source-portal-server/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Our New Travel Planner at www.GoVermont.com</title>
		<link>http://blogs.whardy.com/walter/2008/04/30/our-new-travel-planner-at-wwwgovermontcom/</link>
		<comments>http://blogs.whardy.com/walter/2008/04/30/our-new-travel-planner-at-wwwgovermontcom/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 19:00:40 +0000</pubDate>
		<dc:creator>Walter</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blogs.whardy.com/walter/?p=13</guid>
		<description><![CDATA[
We launched a new edition of www.GoVermont.com last week. This is a reinvention of the Vermont Travel Planner that I originally created in 1995. It has been very popular in the past and also provided lodging content to the State of Vermont through their skiing websites for many years (on www.SkiVermont.com).

This new edition of GoVermont [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript" src="http://yui.yahooapis.com/2.5.1/build/yahoo-dom-event/yahoo-dom-event.js"></script><script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAALfiWd5bSZl9KPqc7wNYaABQBNSR-zSewpsGYZeWtzOA4eoSVBRQEjKtLGdP9dWITLrFWsUqthpWXsg"></script>
<p>We launched a new edition of <A HREF="http://www.GoVermont.com" target="_blank">www.GoVermont.com</A> last week. This is a reinvention of the Vermont Travel Planner that I originally created in 1995. It has been very popular in the past and also provided lodging content to the State of Vermont through their skiing websites for many years (on www.SkiVermont.com).</p>
<p><span id="more-13"></span></p>
<p>This new edition of GoVermont receives its lodging listings from Travelocity via their Web Service, so data is passed to us in XML where we integrate into our look and feel. We also obtain events from the State of Vermont and integrate our own database of golf courses, ski and resort information, attractions, town information and more. This allows us to provide a true travel planning experience for the visitor—with value-add over the same listings a visitor would see on Travelocity, as an example.  Yet the lodging rates are the same, and we receive a nice commission on any lodging bookings made on our site.</p>
<p>We developed a number of new features that are worthy of mentioning. For one, a lot of the site is driven by Ajax, so menus and data fields build on the fly based on user input. Lodging listings also build via Ajax, so the user can page forward through listings without having to wait for page redraws.</p>
<p>Here is one neat feature, which we call <b>MapIt!</b>, developed by John Peloquin, a programmer on staff here. Click on the following links which interact with Google Maps:</p>
<p><a name="map_top"></a></p>
<ul>
<li><a id="maplink_vt" href="#map_top">Our Manchester, Vermont Office</a>
<li><a id="maplink_mv" href="#map_top">Our Mill Valley, California Office</a>
</ul>
<div id="map"></div>
<p><script type="text/javascript" src="http://www.whardy.com/b/map1.js"></script></p>
<p>John wrote about this feature and shares the code in his blog at <A HREF="http://blogs.whardy.com/john" target="_blank">blogs.whardy.com/john</A>.</p>
<p>There is a lot more in the works for this site. So stay tuned for enhanced features that will make travel planning even better soon.  We’re also porting this technology into our sister site, <A HREF="http://www.GoNewYork.com" target="_blank">www.GoNewYork.com</A>!</p>
<p>To read more, please see our press release: <A HREF="http://whardy.com/news.cfm?id=45">W. Hardy Interactive Launches Innovative Vermont Vacation Travel Planner</A>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.whardy.com/walter/2008/04/30/our-new-travel-planner-at-wwwgovermontcom/feed/</wfw:commentRss>
		</item>
		<item>
		<title>TLC1: Introducing the Sun Java System Portal Server</title>
		<link>http://blogs.whardy.com/walter/2007/12/11/tlc1-introducing-the-sun-java-system-portal-server/</link>
		<comments>http://blogs.whardy.com/walter/2007/12/11/tlc1-introducing-the-sun-java-system-portal-server/#comments</comments>
		<pubDate>Tue, 11 Dec 2007 19:00:03 +0000</pubDate>
		<dc:creator>Walter</dc:creator>
		
		<category><![CDATA[Sun Java Technology]]></category>

		<guid isPermaLink="false">http://blogs.whardy.com/walter/?p=14</guid>
		<description><![CDATA[This is the first of a series of Learning Curve articles that will describe my experience of building a sample portal application. This first article is about my research. It describes my project requirements and the products I&#8217;ll use, and have used: Sun Java System Portal Server, along with related products like Java CAPS and [...]]]></description>
			<content:encoded><![CDATA[<p>This is the first of a series of Learning Curve articles that will describe my experience of building a sample portal application. This first article is about my research. It describes my project requirements and the products I&#8217;ll use, and have used: Sun Java System Portal Server, along with related products like Java CAPS and OpenPortal. In the next article I&#8217;ll describe in detail how I installed the Sun Java System Portal Server on Solaris.</p>
<p><span id="more-14"></span></p>
<h4>Project Requirements</h4>
<p>I was invited to work on a team at Sun Microsystems to help build a sample portal application that would provide community members with tools, allow them to experiment with sample applications, and also provide them with quicker access to the information they are most interested in. This portal, ideally, will provide the best features of the configurable portals you already see on the web, including drag-and-drop portlets and tabular organization of data. These, plus the following, will be featured in the sample application I&#8217;ll be building:</p>
<ul>
<li>File Sharing</li>
<li>Wikis</li>
<li>Task management</li>
<li>Community Calendaring</li>
<li>Survey and Polls</li>
<li>Discussion Groups</li>
<li>Blogs (with the installation of the open source blogger Roller which I will write about later).</li>
</ul>
<h4>Why Sun Java System Portal Server?</h4>
<p>Sun Java System Portal Server is a powerful server application that can provide millions of users with custom desktops tools. It works in conjunction with other Sun software: Directory Server to handle the user database, Access Manager to handle user rights and authentication, and an Application Server such as Sun Web Server or Sun Application Server to contain the portal.
</p>
<p>The Sun Java System Portal Server (and its open source counterpart which I&#8217;ll explain a little later, OpenPortal) are great tools for connecting employees on Intranet and serves to increase productivity  by allowing firms to deploy a wide variety of applications for use by their staff.
</p>
<p>Sun Java System Portal Server is considered one of the best on the market. It is ranked as one of the top five portal server offerings, alongside products by Oracle, BEA, IBM and Microsoft. Sun&#8217;s portal server is a technically savvy offering with a simpler installation that automatically integrates all the required components (this can be a daunting tasks with other products). As the Sun java System Portal Server is built from its foundation up on Java, it provides for powerful deployment usage, and integrates with latest Web 2.0 and Java technologies including Ajax. The Portal Server is used today by a broad range of clients in such industries as healthcare, telecom and entertainment.</p>
<p>When you install Sun Java System Portal Server  you don&#8217;t have to separately install a lot of individual components such as identity servers, databases, application servers and then configure them to all work together. The Sun installation program integrates all required components seamlessly and makes it easy to get up-and-running. My next Learning Curve article will include a tutorial on this process.</p>
<h4>OpenPortal</h4>
<p>You should also know that Sun participates in standards committees at many levels to drive new technologies. Portal technology is no exception, and Sun contributes an open source version of their portal server for community development. This version is called <A HREF="https://portal.dev.java.net/" target="_blank">OpenPortal</A>. Both the Sun Java System Portal Server and OpenPortal run on Sun&#8217;s operating system, Solaris, as well as Linux and Windows. OpenPortal also runs on the community-driven open-source Java application server, <A HREF="http://glassfish.java.net" target="_blank">GlassFish</A>. GlassFish is the open source version of the Sun Java System Application Server.</p>
<p>By exposing  the  Portal  Server  code to the entire  industry, Sun enables community  involvement, contribution  and  support.  For example, the community enhanced Portal Server to accommodate Microsoft FrontPage extensions.</p>
<h4>Sun Java Composite Application Suite</h4>
<p>Sun also bundles its Portal Server product in the <A HREF="http://developers.sun.com/javacaps/" target="_blank">Sun Java Composite Application Suite</A> (Java CAPS). This is a popular product with large corporations that integrates Portal Server along with web services and additional components to allow business to easily setup a Service Oriented Architecture (SOA).</p>
<h4>OpenPortal versus Sun Java System Portal Server</h4>
<p>I was curious how OpenPortal and the Sun Java System Portal Server differ. I discovered that they are not each developed independently of the other. Rather, Sun takes code from OpenPortal and standardizes it to produce a new release of Sun Java System Portal Server. This allows each system to benefit from the other. The procedure goes like this: At a given point in time, Sun takes the latest open portal code and produces a comprehensive product by integrating it with other Sun products: Directory Server, Access Manager, Application Server, etc. Sun then produces a fully tested product and provides comprehensive engineering support. This value-add then makes it an excellent offering for clients who need to rely on the latest code that has been functionality tested, and support is only a phone call away. In addition, Sun provides reference, architecture and deployment guides, and configuration support.</p>
<p>Developers who want the latest code can install the OpenPortal portal server (which is free). Those clients that need a fully tested and stable product that is backed by Sun with paid engineering support can download Sun Java System Portal Server.</p>
<p>As a developer who runs a comprehensive hosting service, I&#8217;ll have an opportunity to install and experiment with these two portal servers. I have had some experience with Solaris since 2003, as my firm hosts Sun&#8217;s collaboration service (share.java.net) which operates on <A HREF="http://www.sun.com/software/communications_suite/index.xml" target="_blank">Sun Java Communication Suite</A> software. We host and manage this system on a load-balanced network of Sun servers at our hosting facility in San Francisco.</p>
<p>It&#8217;s an exciting opportunity to now bridge my knowledge of the Sun Communication Suite with the Sun Java System Portal Server. I will use this Learning Curve series to share the process of building a powerful application using the Sun Java System Portal Server.</p>
<p>Portal Server requires a number of applications to work side-by-side within it. But Sun makes it very easy to get up-and-running by including them all packaged together with a single installation program  that greatly simplifies the process. I will also gain additional experience with these programs as I work with Directory Server, Access Manager and a couple of Application Servers. In addition, I&#8217;ll explore advanced load-balanced deployment and discuss integration with the Java DB (Sun&#8217;s version of the Apache open-source project, Derby), and MySQL.</p>
<p>Stay tuned for the next article as I install Sun Java System Portal Server on a Solaris system.</p>
<h4>References:</h4>
<ul>
<li><A HREF="http://www.sun.com/software/products/portal_srvr/index.xml" target="_blank">Sun Java System Portal Server Product Information</A>
<li><A HREF="http://portal.dev.java.net/" target="_blank">Open Portal</A>
<li><A HREF="http://www.sun.com/software/communications_suite/index.xml" target="_blank">Sun Communication Suite</A>
<li><A HREF="http://www.sun.com/software/javaenterprisesystem/javacaps/" target="_blank">Sun Java Application Suite (Java CAPS)</A>
<li><A HREF="http://Developers.sun.com/portalserver" target="_blank">Sun Developer&#8217;s Network, Portal Server</A>
<li><A HREF="http://glassfish.java.net" target="_blank">GlassFish Application Server</A>
<li><A HREF="http://www.roller.org" target="_blank">Roller Open Source Java Blog Software</A>
<li><A HREF="http://mediaproducts.gartner.com/reprints/oracle/150038.html" target="_blank">Gartner Magic Quadrant for Horizontal Portal Products, 2007</A>
<li><A HREF="http://db.apache.org/" target="_blank">Apache Derby</A>
<li><A HREF="http://www.iGoogle.com" target="_blank">iGoogle</A>
</ul>
<h4>Acknowledgements</h4>
<p>I want to give special thanks to Bill Green at Sun Microsystems who provided valuable information about the Sun portal product line. Bill is Sun&#8217;s U.S. Product Lead between sales and engineering on the Portal Server as well as Java Ambassador.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.whardy.com/walter/2007/12/11/tlc1-introducing-the-sun-java-system-portal-server/feed/</wfw:commentRss>
		</item>
		<item>
		<title>TLC3: Installing the Sun Java System Portal Server</title>
		<link>http://blogs.whardy.com/walter/2007/11/26/tlc3-installing-the-sun-java-system-portal-server/</link>
		<comments>http://blogs.whardy.com/walter/2007/11/26/tlc3-installing-the-sun-java-system-portal-server/#comments</comments>
		<pubDate>Mon, 26 Nov 2007 19:00:30 +0000</pubDate>
		<dc:creator>Walter</dc:creator>
		
		<category><![CDATA[Sun Java Technology]]></category>

		<guid isPermaLink="false">http://blogs.whardy.com/walter/?p=16</guid>
		<description><![CDATA[In this article I detail how I install the Sun Java System Portal Server, Version 7.1, Update 1, on a Solaris 10 x86 Sun server. Although I run into a couple of snags, I&#8217;d like to point out how simple this process is. One of the advantages of Sun&#8217;s portal server over competitive products is [...]]]></description>
			<content:encoded><![CDATA[<p><P>In this article I detail how I install the Sun Java System Portal Server, Version 7.1, Update 1, on a Solaris 10 x86 Sun server. Although I run into a couple of snags, I&#8217;d like to point out how simple this process is. One of the advantages of Sun&#8217;s portal server over competitive products is that the installation process completely automates the integration of the Portal Server, Application Server, Directory Server, Access Manager and other required components.  Additional information can be found in the Sun Developers Network (SDN) article: <A HREF="http://docs.sun.com/app/docs/doc/819-5025/" target="_blank">Installing Sun Java Portal Server 7.1</A>. My article details some issues in following the above-referenced article, as it does not describe the latest release. The article above does cover the installation of Application Server 8.1 (which I do not cover here) and is a good reference for any additional information you may need during your installation process.</P></p>
<p><span id="more-16"></span></p>
<h4>Contents</h4>
<ul>
<li>Minimal Installation
<li>Install on a Clean System!
<li>Download the Software and Start the Installation
<li>The Installation Process
<li>Start the Portal Server
<li>Confirm that the System is Running
<li>Access the Sample Portal
<li>In the Next Article
<li>References
</ul>
<h4>Minimal Installation</h4>
<p>The minimal installation of the Portal Server requires the following:</p>
<ul>
<li>Operating System-Solaris 10. Other operating systems are supported including Solaris 9, Windows (for development only) and Red Hat Enterprise Linux.
<li>Application Server-Portal Server runs inside of an application server container. Both the Sun Java System Web Server 7 and Sun Java System Application Server 8.2 are supported. I will install Portal Server on the Sun Web Server 7.
<li>Sun Java System Directory Server 6. Directory Server provides for the user database.
<li>Sun Java System Access Manager 7. Access Manager handles authentication and user privileges.
<li>Java DB-Java DB is built on the opens-source Apache Derby database.
</ul>
<p>All of these components are include with the install package, including both application server options.</p>
<h4>Install on a Clean System!</h4>
<p>I first attempted to install the portal server on a system on which I had already installed collaboration software, including Sun&#8217;s Directory Server and Access Manager. I ran into difficulty integrating Portal Server with the existing software and finally had to contact a Sun engineer for assistance. Although doable he said, he strongly suggested that I install Portal Server on a clean (new) Solaris 10 installation. That way the portal server installation program would also install the other components needed and automate the configuration necessary for them to work together. I will take his advice and start with a clean Solaris 10 installation, as I will demonstrate below. Note that it is important to fully patch the operating system before installation. I suggest downloading the latest patch cluster for Solaris 10 at Sun&#8217;s <A HREF="http://www.sun.com/bigadmin" target="_blank">BigAdmin</A> website.</p>
<h4>Download the Software and Start the Installation</h4>
<p>It is a big plus to be able to go to developers.sun.com, log in with my SDN (Sun Developers Network) credentials and be able to download the complete portal installation with all required components in ONE download. That&#8217;s just what I did.</p>
<p>I find the easiest place to obtain the latest Portal Server downloads is to visit the <A HREF="http://developers.sun.com/portalserver" target="_blank">SDN Portal Server</A> website and click on the Downloads tab. I then clicked on the Portal Server 7.1, Update 1 link which then allows me to download one or more of the various options. Note a free Sun Developers Network (SDN) username and password is required to launch the download.</p>
<p>I downloaded the Sun Java System Portal Serve R 7.1 Update 1 for Solaris 10 and the x86 Platform. The file is 583MB and in zip format.</p>
<p>Now that I have downloaded the installation package to my server, I need to first log in as root on my system. I then create a directory for the installation program and then unzip it. A subdirectory is created: <strong>Solaris_x86</strong> (<strong>Solaris_sparc </strong>or <strong>Linux_x86</strong> for Sparc and Linux systems, respectively). I move into this directory and run this command from my Solaris terminal: <em>./installer</em></p>
<p>Then in a few moments, the Portal Server installer opens on my Solaris desktop.</p>
<h4>Choose Software Component</h4>
<p>First I click on Next to the Welcome screen, and accept the Server License Agreement. I then come to the &#8220;Choose Software Components&#8221; menu.</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
			<img src="http://www.whardy.com/images/PortalServer/1.gif" alt="Figure 1: Software Installation Choices" border="0"></p>
<p><b>Figure 1</b>: Software Installation Choices</p>
</td>
</tr>
</table>
<p>This menu displays a lengthy list of the components included in the installation program, including the Portal Server itself, two Application Servers, Directory Server and Access manager. I select the following three items:</p>
<ul>
<li>Portal Server 7.1
<li>Web Server 7.0
<li>All Shared Components
</ul>
<p>This causes a number of items to automatically select, and I leave all of them selected. See Figure 1 for all the selections I make based on my three choices.</p>
<p>Note that I could have also chosen to install the Portal Server along with Sun&#8217;s Application Server Enterprise Edition 8.2 instead of the Sun Web server 7. I chose Web Server 7 because I don&#8217;t need all the additional functionality that Application Server EE 8.2 provides, such as the ability to deploy enterprise JavaBeans. The server I want to configure is a dedicated Portal Server machine, so either application server will work fine. Information about the installation screens that are associated with the Application Server EE 8.2 are located in this article: <A HREF="http://docs.sun.com/app/docs/doc/819-5025/gdxcg?a=view" target="_blank">Installing Sun Java Portal Server 7.1</A>.</p>
<h3>Java SE SDK Upgrade</h3>
<p>When I click on Next I am provided with an option to upgrade the Java SE SDK and I chose to allow the  installation program to automatically upgrade it as suggested (Figure 2).</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
			<img src="http://www.whardy.com/images/PortalServer/2.gif" alt="Figure 2: Java SE SDK Upgrade" border="0"></p>
<p><b>Figure 2:</b> Java SE SDK Upgrade</p>
</td>
</tr>
</table>
<h4>Shared Component Upgrade</h4>
<p>Since I earlier choose to install shared components (a good idea), I am now presented with a summary of the components to be upgraded (Figure 3). It is good to see that JavaMail, Ant and more will also be upgraded without having to go through the manual process later. There are no options for me to change here.</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
			<img src="http://www.whardy.com/images/PortalServer/3.gif" alt="Figure 3: Shared Component Upgrade" border="0"></p>
<p><b>Figure 3:</b> Shared Component Upgrade</p>
</td>
</tr>
</table>
<h4>Specify Installation Directories</h4>
<p>I click on Next and move on to Specify Installation Directories as shown in Figure 4. I chose all of the defaults here.</p>
<p>Note: it&#8217;s a good idea to write down the directory choices made as I&#8217;ll come back to them often in starting and stopping various components. It is important to leave the installation directories as &#8220;/opt&#8221; for Access Manager, Web Server, Service Registry and Portal Server (unless you want to change them to /var/opt/ as an example). The installation program will create the required directories underneath the &#8220;/opt&#8221; directory, such as /opt/SUNWam, /opt/SUNwbsvr7, /opt/SUNWsr and /opt/SUNWps respectively.</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
			<img src="http://www.whardy.com/images/PortalServer/4.gif" alt="Figure 4: Specify Installation Directories" border="0"></p>
<p><b>Figure 4:</b>Specify Installation Directories</p>
</td>
</tr>
</table>
<h3>System Requirements</h3>
<p>Next, the program verifies that my system as ready for the installation, including disk space, memory, swap space, patches and resources (Figure 5). If Solaris 10 wasn&#8217;t fully patched, I wouldn&#8217;t be able to continue on. As I suggested in the beginning of this article, download the latest patch cluster from the BigAdmin site and install it before installing Portal Server. The patch cluster makes it easy to upgrade all required patches in one step (see the section: Install On a Clean System!, above).</p>
<p>Note that if my system had not met the system requirements, buttons to View Report and Check Again would have appeared on this screen.</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
			<img src="http://www.whardy.com/images/PortalServer/5.gif" alt="Figure 5: Verify System Requirements" border="0"></p>
<p><b>Figure 5:</b> Verify System Requirements</p>
</td>
</tr>
</table>
<h4>Choose a Configuration Type</h4>
<p>The next dialog box allows me to choose to configure the bulk of components now, or do so latter. I again chose the default option that will let me configure now (figure 6).</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
			<img src="http://www.whardy.com/images/PortalServer/6.gif" alt="Figure 6: Choose a Configuration Type" border="0"></p>
<p><b>Figure 6:</b> Choose a Configuration Type</p>
</td>
</tr>
</table>
<h4>Custom Configuration Required</h4>
<p>After Clicking on Next, I am told that the Java DB and Service Registry will need to be configured after installation (Figure 7).</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
			<img src="http://www.whardy.com/images/PortalServer/7.gif" alt="Figure 7: Custom Configuration Required" border="0"></p>
<p><b>Figure 7:</b> Custom Configuration Required</p>
</td>
</tr>
</table>
<h4>Specify Administrator Account Preferences</h4>
<p>The next 14 screens are all about configuring the Portal Server and the various components that work with it. For most screens, I will choose default options, with one important exception that I will explain later. You can follow along.</p>
<p>I click on Next, and I am then allowed to choose the Administration User ID and Password that will be used for &#8220;all administrative accounts&#8221;. However, I find that the credentials I enter here only have an effect on the Web Server administrative account. If I choose &#8220;configure each software component separately&#8221; I will be allowed to enter this same information in the screen shown in Figure 11: Specify Administration Server Settings.</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
			<img src="http://www.whardy.com/images/PortalServer/8.gif" alt="Figure 8: Specify Administrator Account Preferences" border="0"></p>
<p><b>Figure 8:</b> Specify Administrator Account Preferences</p>
</td>
</tr>
</table>
<h4>Specify Common Server Settings</h4>
<p>After clicking on Next, I need to enter DNS and IP information for this server. Note that the installation program will query DNS servers to verify correct settings before allowing me to continue on. I&#8217;ll leave system user and system group as &#8220;root&#8221; (for Solaris 9, other is the default group ID).</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
			<img src="http://www.whardy.com/images/PortalServer/9.gif" alt="Figure 9: Specify Common Server Settings" border="0"></p>
<p><b>Figure 9:</b> Specify Common Server Settings</p>
</td>
</tr>
</table>
<h4>Web Server: Choose Configuration Type</h4>
<p>The next set of screens allow me to further configure the Web Server. As shown in Figure 10, I choose the default to configure administration instance as a server. I find it easier to work with the Web Server 7 with the Portal Server configured as a server instance.</p>
<p>Although I&#8217;m leaving <em>Start servers after system startup</em> checked, I find that I do need to restart the Web Server in a particular sequence as I&#8217;ll explain later under Starting Portal Server.</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
			<img src="http://www.whardy.com/images/PortalServer/10.gif" alt="Figure 10: Web Server: Choose Configuration Type" border="0"></p>
<p><b>Figure 10:</b> Web Server: Choose Configuration Type</p>
</td>
</tr>
</table>
<h4>Web Server: Specify Administration Server Settings </h4>
<p>I click on Next to specify the Web Server administration server settings, and choose the defaults provided (Figure 11). The port 8800 is where I will be able to log into my Web Server Administrator later, in my case portal.whardy.com:8800.</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
			<img src="http://www.whardy.com/images/PortalServer/11.gif" alt="Figure 11: Web Server: Specify Administration Server Settings" border="0"></p>
<p><b>Figure 11:</b> Web Server: Specify Administration Server Settings</p>
</td>
</tr>
</table>
<h4>Web Server: Specify Instance Settings</h4>
<p>The next screen allows me to specify details for the Web Server instance settings. This is where I ran into problems during my initial installation. The default Runtime UNIX User ID provided is <strong>webservd</strong>, however this must be changed to <strong>root</strong>. Otherwise the Portal Server will not start.</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
			<img src="http://www.whardy.com/images/PortalServer/12.gif" alt="Figure 12: Web Server: Specify Instance Settings" border="0"></p>
<p><b>Figure 12:</b> Web Server: Specify Instance Settings</p>
</td>
</tr>
</table>
<h4>Directory Server: Specify Instance Creation Information</h4>
<p>As shown in Figure 13, I am now provided with options to configure Directory Server. The default values I&#8217;m provided work fine, so I will leave them as is, and enter the Directory Manager password. Be sure to save this in the event you need to query the database manually!</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
			<img src="http://www.whardy.com/images/PortalServer/13.gif" alt="Figure 13: Directory Server: Specify Instance Creation Information" border="0"></p>
<p><b>Figure 13:</b> Directory Server: Specify Instance Creation Information</p>
</td>
</tr>
</table>
<h4>Access Manager: Specify Configuration Information</h4>
<p>Portal Server requires that Access Manager be installed in Legacy Mode, so it is important to leave this option as provided by default, as shown in Figure 14. The amAdmin password will allow me to log into the Access Manager administration program which will be located at portal.whardy.com/amconsole under my configuration. Save this password as well!</p>
<p>Note that the amAdmin and LDAP passwords cannot be the same. However, for simplicity, the Directory Manager password I entered in the previous screen can be the same as the amAdmin password. These two passwords, and the Web Server administration password are the three I will encounter later.</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
			<img src="http://www.whardy.com/images/PortalServer/14.gif" alt="Figure 14: Access Manager: Specify Configuration Information" border="0"></p>
<p><b>Figure 14:</b> Access Manager: Specify Configuration Information</p>
</td>
</tr>
</table>
<h4>Access Manager: Choose Deployment Container</h4>
<p>As shown in Figure 15, I will choose the default Web Server container for the Portal Server.</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
			<img src="http://www.whardy.com/images/PortalServer/15.gif" alt="Figure 15: Access Manager: Choose Deployment Container" border="0"></p>
<p><b>Figure 15:</b> Access Manager: Choose Deployment Container</p>
</td>
</tr>
</table>
<h4>Access Manager: Specify Web Container for Running Access Manager Services</h4>
<p>In configuring Access Manager, I will choose all the defaults provided as show in Figure 16.</p>
<p>For more information on these values see the Access Manager documentation, or the <A HREF="http://docs.sun.com/app/docs/doc/819-5025/" target="_blank">Installing Sun Java System Portal 7.1</A> documentation which provides a brief summary on each item.</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
			<img src="http://www.whardy.com/images/PortalServer/16.gif" alt="Figure 16: Access Manager: Specify Web Container for Running Access Manager Services" border="0"></p>
<p><b>Figure 16:</b> Access Manager: Specify Web Container for Running Access Manager Services</p>
</td>
</tr>
</table>
<h4>Access Manager: Choose Access Manager Console</h4>
<p>At some point in the future, I will probably want to log into the Access Manager administrator. This program allows me to search for users, change passwords, user rights and policies. The options I choose in Figure 17 specify where this console is located. I&#8217;ll accept the defaults, which means that access manager will be located at http://portal.whardy.com/amconsole under my configuration.</p>
<p>Note that I will accept the default deploy on a new console as this is an initial installation of Access Manager.</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
			<img src="http://www.whardy.com/images/PortalServer/17.gif" alt="Figure 17: Access Manager, Choose Access Manager Console" border="0"></p>
<p><b>Figure 17:</b> Access Manager, Choose Access Manager Console</p>
</td>
</tr>
</table>
<h4>Access Manager: Choose Directory Server Instance</h4>
<p>Since I am installing a new edition of Directory Server, I will also choose to use the directory server instance I just created, as shown in Figure 18.</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
			<img src="http://www.whardy.com/images/PortalServer/18.gif" alt="Figure 18: Access Manager, Choose Directory Server Instance" border="0"></p>
<p><b>Figure 18:</b> Access Manager, Choose Directory Server Instance</p>
</td>
</tr>
</table>
<h4>Access Manager: Specify Directory Server Data</h4>
<p>The new instance of directory server is not provisioned yet with user data, so I will choose the default as shown in Figure 19.</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
			<img src="http://www.whardy.com/images/PortalServer/19.gif" alt="Figure 19: Access Manager, Specify Directory Server Data" border="0"></p>
<p><b>Figure 19:</b> Access Manager, Specify Directory Server Data</p>
</td>
</tr>
</table>
<h4>Portal Server: Specify Web Container Deployment Information </h4>
<p>The next screen (Figure 20) allows me to configure the Web container for Portal Server. I will also choose defaults here. In a latter article, I will be creating a new instance of Portal Server so that I have two instances running on my system. For the instance I am creating here, I do want the samples included as those provide me with powerful community tools that I will put to use later.</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
			<img src="http://www.whardy.com/images/PortalServer/20.gif" alt="Figure 20: Portal Server, Specify Web Container Deployment Information" border="0"></p>
<p><b>Figure 20:</b> Portal Server, Specify Web Container Deployment Information</p>
</td>
</tr>
</table>
<h4>Ready to Install</h4>
<p>I click on next, and finally, I am provided with an installation summary as shown in Figure 21.</p>
<p>Clicking on Install begins the installation process. The next screen warned me that the installation could take up to one hour; it actually took significantly less time. After the installation completes, I am able to view a summary of the installation, and an install log before exiting the installation program.</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
			<img src="http://www.whardy.com/images/PortalServer/21.gif" alt="Figure 21: Ready to Install" border="0"></p>
<p><b>Figure 21:</b> Ready to Install</p>
</td>
</tr>
</table>
<h4>Starting Portal Server</h4>
<p>Now that Portal Server, Access Manager, Directory Server and Web Server are all installed on my system, I am ready to start it up. First I will reboot my system.</p>
<p>As I reboot my Solaris system, I find that several components required by Portal Server are not running. I need to manually start Directory Server, the Java DB and cacao. In addition, the Web Server is running, but it needs to be restarted in a particular sequence to get the whole system working together. So after a reboot, here is the sequence I run to get my Portal Server operating (in this order):</p>
<ol>
<li>Start Directory Server<br />
Run:  /opt/SUNWdsee/ds6/bin/dsadm start /var/opt/SUNWdsee/dsins1</p>
<li>Start the JavaDB<br />
Run: /usr/sfw/bin/ant -DPS_CONFIG=/etc/opt/SUNWportal/PSConfig.properties -buildfile /opt/SUNWportal/lib/derby.xml start-instance</p>
<li>Restart the Web Server (since it already starts with a reboot, I need to restart it)<br />
Run: /var/opt/SUNWwbsvr7/https-portal.whardy.com/bin/stopserv<br />
         /var/opt/SUNWwbsvr7/https-portal.whardy.com/bin/startserv</p>
<li>Restart the Cacao Process<br />
Run: /usr/lib/cacao/bin/cacaoadm restart
</ol>
<p>Note: I used the default installation directories during my install.</p>
<h4>Confirm that the System is Running</h4>
<p>There are several steps to confirm that the system is running as it is comprised of several components:</p>
<ul>
<li>Verify that JavaDB is running on port 1527: <br />
netstat -an |grep 1527<br />
(note the JavaDB is not required to run the Portal Server)</p>
<li>Verify that Directory Server is running on port 389: <br />
netstat -an | grep 389</p>
<li>Verify that the Web Server is running on port 80: <br />
netstat -an | grep 80
</ul>
<h4>Access the Sample Portal</h4>
<p>Now that I know that Directory Server and the Web Server are running, I can access the sample portal Website at this address: <b>Host-Name:port/portal-URI</b></p>
<p>For the installation that I just ran, it is at http://portal.whardy.com/portal</p>
<p>From there I can click on the links to the three samples to try out various community tools and the Portal Server itself.</p>
<p>There are three other administrative areas that I can access as well:</p>
<ul>
<li>Web Server Administrator at: <strong>Host-Name:Web-Server-Port/</strong>
<li>Access Manager Administration at: <strong>Host-Name:port/amserver/</strong>
<li>Portal Server Administration at: <strong>Host-Name:port/psconsole/</strong>
</ul>
<p>For the configuration that I established in this article, they are located at:</p>
<p>Web Server Administrator: http://portal.whardy.com:8800/<br />
Access Manager Administrator: http://portal.whardy.com/amserver/<br />
Portal Server Administrator: http://portal.whardy.com/psconsole/
</p>
<p>Note that to log into the Web Server Administrator, I use the admin user ID and password that I created as shown in Figure 8. To log into the Access Manager and Portal Server Administrator, I use the amAdmin userID and password I created as shown in Figure 14.</p>
<h4>In the Next Article</h4>
<p>In the next article I will explore using the community samples and configuring a new portal instance.</p>
<h4>References</h4>
<p>&raquo; <A HREF="http://docs.sun.com/app/docs/doc/819-5025/" target="_blank">Installing Sun Java Portal Server 7.1 </A><br />
&raquo; <A HREF="http://www.sun.com/bigadmin" target="_blank">Sun System Administrator Resources and Community</A><br />
&raquo; <A HREF="http://developers.sun.com" target="_blank">Sun Developer Network</A><br />
&raquo; <A HREF="http://developers.sun.com/portalserver" target="_blank">Sun Developer Network-Portal Server</A></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.whardy.com/walter/2007/11/26/tlc3-installing-the-sun-java-system-portal-server/feed/</wfw:commentRss>
		</item>
		<item>
		<title>TLC2: Why Portals?</title>
		<link>http://blogs.whardy.com/walter/2007/11/26/tlc2-why-portals/</link>
		<comments>http://blogs.whardy.com/walter/2007/11/26/tlc2-why-portals/#comments</comments>
		<pubDate>Mon, 26 Nov 2007 19:00:28 +0000</pubDate>
		<dc:creator>Walter</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Sun Java Technology]]></category>

		<guid isPermaLink="false">http://blogs.whardy.com/walter/?p=15</guid>
		<description><![CDATA[Portals provide new levels of functionality and productivity for the enterprise. They allow users and groups to work together easily and securely. Why? They provide members with powerful desktop tools that ease collaboration on many levels, help manage workflow, and give developers the tools they need to build new applications.

Portals are flooding the web, becoming [...]]]></description>
			<content:encoded><![CDATA[<p>Portals provide new levels of functionality and productivity for the enterprise. They allow users and groups to work together easily and securely. Why? They provide members with powerful desktop tools that ease collaboration on many levels, help manage workflow, and give developers the tools they need to build new applications.</p>
<p><span id="more-15"></span></p>
<p>Portals are flooding the web, becoming mainstream technology for a wide array of social networking and corporate websites. Most users only know they can integrate “widgets” and “gadgets” onto their web pages: tens of thousands of these widgets and gadgets, each with its own function and personality. They are easy to create and are being created by thousands of developers at astonishing speeds as sites compete for popularity with social networking sites, especially.</p>
<p>For example, visit <A HREF="http://www.iGoogle.com" target="_blank" class="entry">iGoogle</A>. Even without creating an account and logging in, I get a default portal with a bunch of portlets on it (google calls them “gadgets”) that I can reposition on my screen by dragging and dropping. I can add new portlets and remove them. If I register and log in, I can do even more: select from thousands of these gadgets and even create new themes and desktops. Many are quite cool: daily cartoons, web cams, news, weather forecasts, stock quotes and more. MyYahoo! is another example. At MyYahoo! I don’t have the same drag–and-drop functionality, but I can create my desktop just the way I want it by choosing the options I want.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.whardy.com/walter/2007/11/26/tlc2-why-portals/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Learning Curve Series Journal 9</title>
		<link>http://blogs.whardy.com/walter/2007/03/12/learning-curve-series-journal-9/</link>
		<comments>http://blogs.whardy.com/walter/2007/03/12/learning-curve-series-journal-9/#comments</comments>
		<pubDate>Mon, 12 Mar 2007 19:00:08 +0000</pubDate>
		<dc:creator>Walter</dc:creator>
		
		<category><![CDATA[Sun Java Technology]]></category>

		<category><![CDATA[Creator]]></category>

		<category><![CDATA[IDE]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[Sun]]></category>

		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blogs.whardy.com/walter/?p=10</guid>
		<description><![CDATA[Accessing Production Databases and Managing Databases with the Bundled Java DB
In the last journal I explored working with the Sun Java Studio Creator bundled database. I found that the Java DB was included with the Java Studio Creator IDE and available for building my applications. The Java DB is Sun&#8217;s supported distribution of the open [...]]]></description>
			<content:encoded><![CDATA[<h3>Accessing Production Databases and Managing Databases with the Bundled Java DB</h3>
<p>In the last journal I explored working with the Sun Java Studio Creator bundled database. I found that the Java DB was included with the Java Studio Creator IDE and available for building my applications. The Java DB is Sun&#8217;s supported distribution of the open source Apache Derby database.</p>
<p><span id="more-10"></span></p>
<p>Because I&#8217;m building Java applications, I might wish to install the Java DB into my production environment. I could then maintain all the great features that Java has to offer – security being one of them – throughout my deployment. Plus the Java DB is available at no cost under the <a href="http://db.apache.org/" target="_blank">Apache project</a>.</p>
<p>But because I run a number of projects under various databases, I also need to consider using existing databases with my new Java applications – at least for now. Plus it&#8217;s cool to know that I can quite easily connect those applications I build with Java Studio Creator – with minimal effort – to my database infrastructure.</p>
<p>In this journal, I explore connecting to and working with Microsoft SQL Server 2000 and MySQL in the Java Studio Creator IDE. I also explore working with the Java DB by creating new databases and tables and populating them with data.</p>
<p><strong>Contents</strong></p>
<ul>
<li><a href="#1">Supported Databases</a></li>
<li><a href="#2">Connecting to Microsoft SQL Server 2000</a></li>
<li><a href="#3">Connecting to MySQL</a></li>
<li><a href="#4">Next Time</a></li>
</ul>
<p><a name="1"></a></p>
<h4>Supported Databases</h4>
<p>Java Studio Creator includes drivers - or connectors - to a variety of databases. These are:</p>
<ul>
<li>DB2</li>
<li>Oracle</li>
<li>Microsoft SQL Server 2000</li>
<li>Java DB</li>
<li>Sybase</li>
</ul>
<p>Note that the <code>DataDirect</code> driver bundled with Java Studio Creator that allows for these connections is free to use with a local installation of the IDE.  To connect to third-party databases in a production environment (with the exception of MySQL), I need to purchase a <a href="http://www.datadirect.com/products/jdbc/" target="_blank">license from DataDirect</a>.</p>
<p>Connecting to the databases listed above is intuitive. I demonstrate how easy it is to connect to Microsoft SQL Server 2000 below. I can then easily work with tables and build queries with drag-and-drop functionality.</p>
<p>Don&#8217;t see your favorite database in the list? Worry not! It&#8217;s not difficult to manually import a driver, as I demonstrate in the next section for the MySQL database.</p>
<p><a name="2"></a></p>
<h4>Connecting to Microsoft SQL Server 2000</h4>
<p>Connecting to Microsoft SQL Server 2000 is about as easy as it gets. What&#8217;s great is that I can easily work with my database tables visually in Java Studio Creator once I add a data source to the IDE.</p>
<p><strong>Adding a Data Source to the IDE</strong></p>
<p>First I right-click the Data Sources node in the Servers window and select Add Data Source from the pop-up window. I can also choose Add Data Source from the Data drop-down menu. A new dialog box then opens that lets me add a new data source, as shown in Figure 1.</p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal9_fig01.gif" alt="Adding a new data Source" /></p>
<p><strong>Figure 1</strong>: Adding a new data Source</td>
</tr>
</tbody>
</table>
<p>In this Data Source dialog box, I can define the following:</p>
<ul>
<li>I can give my new data source any name that I want. I then identify my database by this name in the Servers window.</li>
<li>The Server Type refers to the JDBC driver for the new database. I can choose any of the supported server types from the Server Type pull-down list, so I selected SQLServer.</li>
<li>The Database Name is the name of the database you define in the database server.</li>
<li>The Host Name is the name of the server that hosts the database. For example, localhost refers to my machine. Here I enter the IP address of the database server.</li>
<li>I then enter the credentials for my database: User ID and Password.</li>
<li>Because the IDE supports Microsoft SQL Server 2000, there is a JDBC driver for it, which is referenced in the Database URL field. I don&#8217;t need to modify this field, because Java Studio Creator builds it based on the Server Type and Database Name I choose. But I can change the URL if I want. If my database wasn&#8217;t on the default port of 1433, I would need to edit this field.</li>
</ul>
<p>To connect to my Microsoft SQL Server database, I complete the dialog as shown above in Figure 1.</p>
<p>The IDE gives me the option to test the connection to the database, which is a good way to make sure that I can access a new database both within the IDE and outside of my application.</p>
<p>Once I confirm that the connection to the database works, I choose a Validation Table by clicking the Select button. This allows the application server to use a connection pool and validate the database connection by querying the database. This process does not write to the table, and no rows in the table are needed. It is best not to use a table with a large number of rows or a table that is accessed often.</p>
<p>I click Add to complete the process, close the window, and return to the IDE. Note how the database now shows up in my Servers window as shown in Figure 2. I can expand its node to view its tables. I can also right-click a table name and choose View Data to view the content in a table, or double-click a table name. From here I can build my applications with drag-and-drop functionality.</p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal9_fig02.gif" alt="The Microsoft SQL Server 2000 database shows up in my Servers window. I can right-click a table and choose View Data; to view table contents" /></p>
<p><strong>Figure 2</strong>: The Microsoft SQL Server 2000 database shows up in my Servers window.<br />
I can right-click a table and choose View Data to view table contents.</p>
<p>(<a href="http://www.whardy.com/images/creator/journal9_fig02_lg.gif" target="_blank">click to enlarge</a>)</td>
</tr>
</tbody>
</table>
<p>Next, I connect to a MySQL database.</p>
<p><a name="3"></a></p>
<h4>Connecting to MySQL</h4>
<p>MySQL is not one of the preconfigured data source options within Java Studio Creator. To connect to this database, I need to obtain the JDBC driver — or connector as it is also named — and add it. This procedure is outlined in this SDN article: <a href="http://developers.sun.com/jscreator/learning/tutorials/2/dbserversources.html">Creating Database Server Types and Data Sources</a>.</p>
<p>First I download the MySQL JDBC driver from the <a href="http://dev.mysql.com/downloads/connector/j/5.0.html" target="_blank">www.mysql.com</a> website.</p>
<p><strong><em>Note:</em></strong> The article I noted above references an older edition of the driver, version 3.1. At the time of this writing, version 5.0 is the latest, and operates fine within Java Studio Creator. To view the latest driver editions, go to the mySQL.com download page:  <a href="http://dev.mysql.com/downloads/" target="_blank">http://dev.mysql.com/downloads/</a></p>
<p>Then I extract the file on my computer and return to the Add Data Source window, shown in Figure 3. From the Server Type drop-down menu, I choose Add Server Type.</p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal9_fig03.gif" alt="To add the MySQL connector, I add a new data source and choose Add Server Type from the Server Type drop-down menu." /></p>
<p><strong>Figure 3</strong>: To add the MySQL connector, I add a new data source<br />
and choose Add Server Type from the Server Type drop-down menu.</td>
</tr>
</tbody>
</table>
<p>Next I click New and choose the JDBC driver file that I downloaded and uncompressed from mySQL.com:</p>
<pre>mysql-connector-java-5.0.3-bin.jar</pre>
<p>Under Display Name, I type mySQL. I click the Suggest button to have Java Studio Creator fill in the driver class name and the URL template. The defaults that the IDE picks work just fine. Figure 4 displays the information I just added.</p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal9_fig04.gif" alt="Adding a MySQL driver" /></p>
<p><strong>Figure 4</strong>: Adding a MySQL driver</td>
</tr>
</tbody>
</table>
<p>So now I can add a MySQL database to the Servers window for drag-and-drop functionality, just as I did for the Microsoft SQL Server database. I go back and right-click my Data Sources node in the Server window and choose Add Data Source. Figure 5 shows a MySQL database that I connected to.</p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal9_fig05.gif" alt="Connecting to the MySQL database" /></p>
<p><strong>Figure 5</strong>: Connecting to the MySQL database</td>
</tr>
</tbody>
</table>
<p><strong>Working With the Bundled Database</strong></p>
<p>In my <a href="http://developers.sun.com/jscreator/community/2/journals/hardy/journal8.html">last journal</a>, I provided an overview of the bundled database included with Java Studio Creator. This database is named The Java DB and is also known as Derby by the <a href="http://www.apache.com" target="_blank">Apache project</a>. Now I want to explore more fully how I can create databases and manage tables with the Java DB.</p>
<p>Because the Java DB doesn&#8217;t include a graphical user interface that would allow me to create new databases and users, I use features that Java Studio Creator provided to do this. I can also work with most databases in this way, because Java Studio Creator allows me to execute SQL commands directly from the IDE. I could create tables, as an example, in both the Microsoft SQL Server and MySQL databases that I attached to above.</p>
<p><strong>Databases, Data Sources, and Schemas</strong></p>
<p>Java Studio Creator includes a number of data sources, including VIR (Vehicle Incident Reporter), JumpStartCycles, and TravelDB. These are actually database schemas – they all sit within one physical database called <code>sample</code>. This is apparent if I right-click one of the data sources in the Servers window, such as VIR, and choose Modify Data Source. As shown in the left dialog box of Figure 6, the Database URL string is:</p>
<pre>jdbc:derby://localhost:21527/sample</pre>
<p>This URL string tells me that the data source VIR belongs to the <code>sample</code> database. There is another way I can tell too: If I click the Schemas tab in the Modify Data Source dialog box, and then click the Get Schemas button, I see all schemas in the <code>sample</code> database as shown in Figure 6. A number of system schemas are included as well as Travel and JSC (JSC is named JumpStartCycles in the Servers window).</p>
<p><strong><em>Note:</em></strong> Make sure the database server is started by right clicking Bundled Database Server in the Servers window and choosing Start Bundled Database.</p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal9_fig06.gif" alt="The VIR data source belongs to the &lt;code&gt;sample&lt;/code&gt; database. The schemas can be viewed under the Schemas tab in the Modify Data Sources window." /></p>
<p><strong>Figure 6</strong>: The VIR data source belongs to the <code>sample</code> database.<br />
The schemas can be viewed under the Schemas tab in the Modify Data Sources window.</p>
<p>(<a href="http://www.whardy.com/images/creator/journal9_fig06_lg.gif" target="_blank">click to enlarge</a>)</td>
</tr>
</tbody>
</table>
<p><strong>Creating a New Database</strong></p>
<p>I would now like to create a new database named <code>location</code> that contains a list of all the zip codes in the U.S., along with their central longitude and latitude values. I would like to create a new database, rather than create a new schema in the <code>sample</code> database. Because the Java DB doesn&#8217;t offer a stand-alone program that would allow me to create a new database, I use an option in the JDBC URL that the driver understands: by sending <code>create=true</code> as a command to the database.</p>
<p>I do so by first right-clicking the Data Sources node in the Servers window and choosing Add Data Source.</p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal9_fig07.gif" alt="Creating a new database" /></p>
<p><strong>Figure 7</strong>: Creating a new database</td>
</tr>
</tbody>
</table>
<p>In the Add Data Source window that opens, I populate it with data as shown in Figure 7 (I can enter any password in the Password field). I first enter the name that I would like to reference the database by in Java Studio Creator in the Data Source Name field. Note that I can&#8217;t, however, enter a new Database Name as this field is dimmed. But I&#8217;ll get around this shortly. I also choose Derby as the Server Type and enter any value for the User ID and Password. The user ID and password values I enter will get created in the next step along with the database.</p>
<p>I now change the connection string by typing the following into the Database URL field and adding the database name <code>location</code> and <code>create=true</code> string:</p>
<pre>jdbc:derby://localhost:21527/location;create=true</pre>
<p>This is the trick to creating a new database! So how do I execute this URL string? It&#8217;s easy. Just click the Test Connection button and the URL string is passed to the Java DB and the new database — and user — is created.</p>
<p>Note that after a few moments, the window shown in Figure 8 is displayed. The database was created and a connection was made, however I have not yet established a validation table, so I also get the error shown. I&#8217;ll correct that shortly.</p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal9_fig08.gif" alt="The database is created" /></p>
<p><strong>Figure 8</strong>: The database is created</td>
</tr>
</tbody>
</table>
<p>I click OK in the Location Connection Status window, and then revise the connection string by removing <code>create=true</code> as shown in Figure 9. When I click the Add button, my location database appears in my Servers window, however with a red &#8220;x&#8221; next to it because there is no validation table defined yet.</p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal9_fig09.gif" alt="I revise the Database URL field and click the Add button. The location database is added to the server window with a red " /></p>
<p><strong>Figure 9</strong>: I revise the Database URL field and click the Add button.<br />
The location database is added to the server window with a red &#8220;x&#8221; next to<br />
its name because a validation table has not yet been created or selected.</p>
<p>(<a href="http://www.whardy.com/images/creator/journal9_fig09_lg.gif" target="_blank">click to enlarge</a>)</td>
</tr>
</tbody>
</table>
<p>As a side note, I can look at my directory structure to see where the new database physically sits. In a default Windows installation it would sit here</p>
<pre>C:\Program Files\Sun\Creator2_1\SunAppServer8\derby\databases</pre>
<p>I can browse the sub-directories for both the <code>sample</code> and <code>location</code> databases. This is where data sits, along with binary log files and more. It is good to see that by executing the URL string above, a whole directory structure is created for my <code>location</code> database. I can then manually back up files and copy the database into production if needed.</p>
<p><strong>Building Tables</strong></p>
<p>Now that I have created my <code>location</code> database, I wish to create zip code and validation tables, and also populate them with data. To do this, I will use another feature in Java Studio Creator that allows me to execute SQL commands directly from the IDE.</p>
<p>First, I start the Run Query feature by right-clicking my location database in the Servers window under Data Sources, and choosing View Data as shown in Figure 10.</p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal9_fig10.gif" alt="Opening a Query window that allows me to execute SQL commands by right-clicking the location database and choosing View Data." /></p>
<p><strong>Figure 10</strong>: Opening a Query window that allows me to execute SQL commands<br />
by right-clicking the location database and choosing View Data.</p>
<p>(<a href="http://www.whardy.com/images/creator/journal9_fig10_lg.gif" target="_blank">click to enlarge</a>)</td>
</tr>
</tbody>
</table>
<p>The new window that opens allows me to manually type SQL commands or execute a file with a list of SQL commands in it. I wish to manually create the zip codes table by typing the following into the Query window (it&#8217;s best to break it into several lines as shown):</p>
<pre>create table location.ZipCodes ( zipcode varchar(10) NOT NULL,
latitude DOUBLE, longitude DOUBLE, city varchar(50), state varchar(50),
county varchar(50), zipclass varchar(50) );</pre>
<p>I then click the Run Query button which causes this SQL command to execute. The <code>ZipCodes</code> table is created with the various fields that I specified. The results are shown in Figure 11. Note that the database returns <strong>0 row(s) affected</strong>, which is displayed in the results window.</p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal9_fig11.gif" alt="Running the SQL command I typed into the Query field" /></p>
<p><strong>Figure 11</strong>: Running the SQL command I typed into the Query field</td>
</tr>
</tbody>
</table>
<p>Next I create a validation table by entering the following in the Query window and clicking the Run Query button again:</p>
<pre>create table location.validationtable (testcol varchar(1));</pre>
<p><strong>Fixing the Validation Table Error</strong></p>
<p>Now that I have a validation table established, I need to fix the validation table error that is causing a red &#8220;x&#8221; next to my table name. I right-click the <code>location</code> table and choose Modify Data Source.  From here, I click the Select button to open the Select Validation Table window as shown in Figure 12.</p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal9_fig12.gif" alt="Fixing the Validation Table Error" /></p>
<p><strong>Figure 12</strong>: Fixing the Validation Table Error</p>
<p>(<a href="http://www.whardy.com/images/creator/journal9_fig12_lg.gif" target="_blank">click to enlarge</a>)</td>
</tr>
</tbody>
</table>
<p>I choose the <code>validationTable</code> that I created above and close the dialog box by clicking Select. Then I click Test Connection to see my validation table found. Finally, I click Modify to close the remaining dialog box. My <code>location</code> database sits as a node under Data Sources with no error, and I can expand on the node to view the <code>zipcodes</code> and <code>validationtable</code> tables.</p>
<p><strong>Populating the Zip Code Table</strong></p>
<p>Now I populate the <code>zipcodes</code> table with data from a source file by importing the file with a SQL command. I use an internal Derby procedure that reads in a textual comma-delimited set of data.</p>
<p>To populate the <code>zipcodes</code> table:</p>
<ol>
<li>Download the zip code data file. You can obtain it by right-clicking this link and choosing to save the file to your computer: <a href="http://69.59.187.123/LearningCurve/downloads/zip_codes.zip" target="_blank">http://69.59.187.123/LearningCurve/downloads/zip_codes.zip</a></li>
<li>Unzip the file on your computer and note the location. The file <code>zip_codes.txt</code> is produced. You can look at this file and see that it contains a comma-delimited set of zip code records that match the <code>ZipCodes</code> table structure I set up above.</li>
<li>Go back to the Query window. If you closed it, right-click the <code>location</code> database and choose View Data.</li>
<li>Type the following command into the Query window:<code>CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE(‘LOCATION‘,’ZIPCODES‘, ’[directory]ZIP_CODES.txt‘, ‘,’, ‘&#8221;’, null,0);</code>
<p>where [directory] is the location where you saved <code>zip_codes.txt</code> on your computer.</li>
<li>Click the Run Query button and watch as the data is imported into the <code>zipcodes</code> table. When complete, the message &#8220;No results&#8221; is displayed in the results window.</li>
<li>Type: <code>SELECT * FROM LOCATION.ZIPCODES</code> and click Run Query to view the first 25 rows of data. Or, you can go back to the location node in the Servers window and double-click the <code>zipcodes</code> node under it. You should see the results shown in Figure 13.</li>
</ol>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal9_fig13.gif" alt="Viewing the zipcodes table data" /></p>
<p><strong>Figure 13</strong>: Viewing the <code>zipcodes</code> table data</p>
<p>(<a href="http://www.whardy.com/images/creator/journal9_fig13_lg.gif" target="_blank">click to enlarge</a>)</td>
</tr>
</tbody>
</table>
<p><strong>Executing More Complex SQL Commands in a Script File</strong></p>
<p>The Query window (shown in Figure 13) also allows me to execute more complex scripts that contain a sequence of SQL commands.</p>
<p>If I click the <img src="http://www.whardy.com/images/creator/journal9_folder_icon.gif" alt="Folder Icon" width="22" height="20" /> file icon (in the Query window), I can load a command file, as I demonstrate below. These steps drop the tables I just created and then re-create them with just a couple of mouse-clicks.</p>
<p>To load a command file:</p>
<ol>
<li>Download the file <code>create-location-derby.zip</code> by right-clicking this link and saving the file to your computer. Unzip it to produce <code>create-location.sql</code> <a href="http://69.59.187.123/LearningCurve/downloads/create-location-derby.zip" target="_blank">http://69.59.187.123/LearningCurve/downloads/create-location-derby.zip</a><br />
The file is shown in Code Sample 1.</li>
<li>Open <code>create-location-derby.sql</code> and edit the file so that the last SQL command points to the <code>zip_codes.txt</code> file that you saved to your computer in the previous step. If you didn&#8217;t download it, do so by right-clicking this link and saving it to your computer (you need to unzip it as well): <a href="http://69.59.187.123/LearningCurve/downloads/zip_codes.zip" target="_blank">http://69.59.187.123/LearningCurve/downloads/zip_codes.zip</a></li>
<li>Open the Query window by right-clicking the <code>location</code> table and choosing View Data.</li>
<li>Open the <code>create-location-derby.sql</code> command file by clicking the <img src="http://www.whardy.com/images/creator/journal9_folder_icon.gif" alt="Folder Icon" width="22" height="20" /> button in the Query window and locating the file on your computer.</li>
<li>Open the Run Query Options dialog box by clicking the <img src="http://www.whardy.com/images/creator/journal9_icon.gif" alt="Icon" width="22" height="20" /> icon as shown in Figure 14. Confirm that &#8220;semicolon at end of line&#8221; is selected and then click &#8220;Run Query.&#8221; This is the correct option because the create-location-derby.sql file terminates each SQL command with a semicolon</li>
<li>Watch as a series of commands execute that drop all tables in the <code>location</code> database (if they exist) and creates them as we did above.</li>
</ol>
<p>You should now have the location tables created and fully populated.</p>
<p><strong>Code Sample 1</strong></p>
<div class="pre">
<pre>-- drop tables so database is empty
drop table location.ZipCodes;
drop table location.validationtable;

-- Create new tables
create table location.ZipCodes ( zipcode varchar(10) NOT NULL, latitude DOUBLE, longitude DOUBLE, city VARCHAR(50), state varchar(50), county varchar(50), zipclass
varchar(50) ) ;
create table location.validationtable (testcol varchar(1));

-- Load the tables (be sure to replace [directory] with location of ZIP_CODES.txt on your machine.
CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE(‘LOCATION’,‘ZIPCODES’, ‘[directory]ZIP_CODES.txt’, ‘,’, ‘&#8221;’, null,0);</pre>
</div>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal9_fig14.gif" alt="Running the SQL command file" /></p>
<p><strong>Figure 14</strong>: Running the SQL command file</td>
</tr>
</tbody>
</table>
<p>Note that when you initially installed Java Studio Creator, a series of SQL command files were executed that created all of the database schemas in the <code>sample</code> database. You can view these SQL command files in this directory under a typical Windows XP installation:</p>
<pre>C:\Program Files\Sun\Creator2_1\rave2.0\startup\samples</pre>
<p>It is useful to see how these databases were created and populated through SQL commands because you can customize and execute any of these commands yourself to manage your databases.</p>
<p><strong>More Information About Derby</strong></p>
<p>I demonstrated one of the internal procedures above that allowed me to import a comma-delimited file into my <code>ZipCodes</code> table. There are many other procedures available for use, and they can be viewed in the Apache Derby documentation. I had success in running some procedures but not others in the Java DB.</p>
<p>Derby documentation in general is available at this link: <a href="http://db.apache.org/derby/manuals/index.html" target="_blank">http://db.apache.org/derby/manuals/index.html</a></p>
<p><a name="4"></a></p>
<h4>Next Time</h4>
<p>In the next series of articles, I&#8217;ll build further on this code to develop an exciting application that pulls together a lot of the concepts discussed here to plot locations on a map.</p>
<h4>More Developer Resources</h4>
<p>For more tech tips, articles, and expert advice for developers, visit the Java Studio Creator developer resources on the Sun Developer Network (SDN) at <a href="http://developers.sun.com/jscreator/index.jsp">/jscreator/</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.whardy.com/walter/2007/03/12/learning-curve-series-journal-9/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Learning Curve Series Journal 8</title>
		<link>http://blogs.whardy.com/walter/2006/09/13/learning-curve-series-journal-8/</link>
		<comments>http://blogs.whardy.com/walter/2006/09/13/learning-curve-series-journal-8/#comments</comments>
		<pubDate>Wed, 13 Sep 2006 19:00:50 +0000</pubDate>
		<dc:creator>Walter</dc:creator>
		
		<category><![CDATA[Sun Java Technology]]></category>

		<category><![CDATA[Creator]]></category>

		<category><![CDATA[IDE]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[Sun]]></category>

		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blogs.whardy.com/walter/?p=9</guid>
		<description><![CDATA[Database Connectivity, Part 1: Working with Java DB (Derby)
Now that I&#8217;ve worked with components and consumed web services using the Java Studio Creator 2 IDE, I&#8217;m ready to learn what I can do with database integration. Mostly, I work with Microsoft SQL Server and MySQL for production and, on occasion, Microsoft Access for development. But [...]]]></description>
			<content:encoded><![CDATA[<h3>Database Connectivity, Part 1: Working with Java DB (Derby)</h3>
<p>Now that I&#8217;ve <a href="http://developers.sun.com/jscreator/community/2/journals/hardy/journal3.html">worked with components</a> and <a href="http://developers.sun.com/jscreator/community/2/journals/hardy/journal5.html">consumed web services</a> using the Java Studio Creator 2 IDE, I&#8217;m ready to learn what I can do with database integration. Mostly, I work with Microsoft SQL Server and MySQL for production and, on occasion, Microsoft Access for development. But for this first part of a two-part article, I&#8217;ll work with the Java DB (Derby), which is the database bundled with the IDE. In part two I&#8217;ll look at integrating databases for production use, such as Microsoft SQL Server and MySQL.</p>
<p><span id="more-9"></span></p>
<p><strong>Contents</strong></p>
<ul>
<li><a href="#1">About the Bundled Database</a></li>
<li><a href="#2">The JDBC API</a></li>
<li><a href="#3">Getting Started with the Sample Databases</a></li>
<li><a href="#4">Developing a Database Application</a></li>
<li><a href="#5">Using the Query Editor</a></li>
<li><a href="#6">Changing the Table Appearance</a></li>
<li><a href="#7">Running the Application</a></li>
<li><a href="#8">Next Time</a></li>
</ul>
<p><a name="1"></a></p>
<h4>About the Bundled Database</h4>
<p>Java Studio Creator 2 comes with the Sun Java System Application Server, and this application server includes the <a href="http://developers.sun.com/prodtech/javadb/">Java DB</a>, which is Sun&#8217;s supported distribution of the open source <a href="http://db.apache.org/derby/" target="_blank">Apache Derby</a> database. Java DB is a pure Java Relational Database Management System (RDBMS) for client-server networked applications. Built entirely from Java, Java DB contains all the advantages that Java provides—platform independence for one.</p>
<div><strong><em>Note:</em></strong> The PointBase database was bundled with earlier versions of Java Studio Creator. However, PointBase was not licensed for production use. This, along with other limitations, motivated the upgrade to Java DB with Java Studio Creator 2.</p>
<p>Java Studio Creator also supports various editions of Oracle, Microsoft SQL Server 2000, Sybase, IBM DB2 and MySQL. More details in the next article!</p>
<p><a name="2"></a></p>
<h4>The JDBC API</h4>
<p>I have been encountering the acronym JDBC often as I learn about Java. The <a href="https://java.sun.com/javase/technologies/database.jsp" target="_blank">Java Database Connectivity</a> API provides database-independent connectivity among Java applications and a wide range of SQL databases, even access to tabular data sources and flat files. The JDBC API is written in Java and thus allows my database applications to benefit from all the great features of Java. This allows for my applications to maintain security throughout the database transaction, and also for my applications to maintain portability across various platforms (and databases). It&#8217;s write once, run anywhere technology.</p>
<p>My non-Java applications used ODBC. This API is written in C, and is thus not appropriate for use with Java, as my applications would inherit many of the drawbacks C contains in security and portability. The JDBC API is more advanced than the ODBC API, and includes important features such as Microsoft&#8217;s more recent UDA (Universal Data Access) database technology, as an example.</p>
<p>More information on JDBC and how it compares to ODBC can be found in this <a href="http://java.sun.com/j2se/1.5.0/docs/guide/jdbc/getstart/intro.html" target="_blank">article</a>.</p>
<p><a name="3"></a></p>
<h4>Getting Started with the Sample Databases</h4>
<p>Now I&#8217;ll start working with the sample databases included with Java Studio Creator, and then try writing a simple database application using the IDE. First I start a new project. Then, I look at the Servers window for a list of the available data sources. These include Jump Start Cycles, Travel and VIR (Vehicle Incident Reporter), as shown in Figure 1.</p>
<p>A side note: The data sources I mention above are actually all contained within one database called &#8220;Sample.&#8221; The Java DB sample database is located in the <code>SunAppServer8/derby</code> folder. Log files and a few utilities programs are also included there.</p>
<p>If the bundled database server isn&#8217;t already running, I need to start it up and take a look at the tables available in that database. I do this by right-clicking the Bundled Database Server node. (I can also do this from the data pull-down menu). If the database is stopped, the option to stop the database server is grayed out and a red icon appears next to the node, and I start it as described above. Once the bundled database is started, I can see the tables, views, and columns within tables, in the sample databases shown in Figure 1.</p>
<table border="0" cellspacing="0" cellpadding="4" width="100%">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal8_fig01.gif" alt="Starting the Bundled Database Server and Viewing Sample Data Sources" /></p>
<p><strong>Figure 1</strong>: Starting the Bundled Database Server and Viewing Sample Data Sources</td>
</tr>
</tbody>
</table>
<p><a name="4"></a></p>
<h4>Developing a Database Application</h4>
<p>I decided to experiment with an application that would pull in data from several tables and display the results. Start up the IDE and follow along.</p>
<p>Here&#8217;s my goal: I want to produce a report from several database tables—a flight table, a trip table, and an employee table—that displays flights for particular trips and people. I only want to include a certain piece of data in the report, and for the data columns to appear in a particular order, with column headings that will make sense to the user.</p>
<p>First, I create a new application. To do this, I choose <code>New Project</code> from the File menu (or I can click on <code>Create New Project</code> from the Welcome screen that defaults open when Creator starts). Then I choose JSF Web Application from the New Project dialog window that pops open.</p>
<p>Then I go to the Palette window (next to the Servers window by default) and drop a Table component onto the visual designer. This displays a generic table with several columns and rows, as shown in Figure 2.</p>
<table border="0" cellspacing="0" cellpadding="4" width="100%">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal8_fig02.gif" alt="Dropping a Data Table Component onto the visual designer" /></p>
<p><strong>Figure 2</strong>: Dropping a Data Table Component onto the visual designer</p>
<p>(<a href="http://www.whardy.com/images/creator/journal8_fig02_lg.gif">click to enlarge</a>)</td>
</tr>
</tbody>
</table>
<p>Since I want the report to focus on the flight data, I then go to the Servers window and open the table node for the Travel database. I drag the FLIGHT table from the Servers window onto this generic table in the visual designer. I make sure that the entire outline of the generic table is highlighted (the outline actually changes to a blue color) before I drop the FLIGHT table onto it. My flight data is now bound to the page&#8217;s display, and the generic table has changed to show me the columns or fields of the FLIGHT table, as shown in Figure 3.</p>
<table border="0" cellspacing="0" cellpadding="4" width="100%">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal8_fig03.gif" alt="Dropping the Flight Table on a Data Table Component" /></p>
<p><strong>Figure 3</strong>: Dropping the Flight Table on a Data Table Component</p>
<p>(<a href="http://www.whardy.com/images/creator/journal8_fig03_lg.gif">click to enlarge</a>)</td>
</tr>
</tbody>
</table>
<p>Try running the application now. You&#8217;ll see that what you get is the data from this FLIGHT table in a simple HTML table, nicely formatted with shaded rows. But I want to take it further than this?to add the trip and employee data.</p>
<p><a name="5"></a></p>
<h4>Using the Query Editor</h4>
<p>To add trip and employee data, I need to use Java Studio Creator&#8217;s Query Editor.</p>
<table style="margin-left: 21px;margin-bottom: 16px" border="0" cellspacing="0" cellpadding="4" align="right">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal8_fig04.gif" alt="My Flight table row set" /></p>
<p><strong>Figure 4</strong>: My Flight table row set</td>
</tr>
</tbody>
</table>
<p>In the Outline window, I expand on the SessionBean1 node, and notice the flightRowSet entry. (See Figure 4.) This rowset contains the SQL command associated with the table, and was automatically placed into the Session Bean when I dragged the FLIGHT table onto the generic table in the visual designer. This makes it available across my application session. I&#8217;ll now right-click on it and select Edit SQL Statement—or double-click on it—to open it in the Query Editor.</p>
<p>The Query Editor window is divided into four panels. At the top is a graphical display of the table. Below, the table columns are displayed: the table name, sort order, and so on. The IDE also shows me the SQL query itself. I&#8217;ll test this query by running it now, without having to build the rest of the application, by right clicking <code>Run Query</code> in the top panel. As shown in Figure 5, all the flight data is displayed in the table in the bottom panel of the window.</p>
<table border="0" cellspacing="0" cellpadding="4" width="100%">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal8_fig05.gif" alt="Testing a Query in the Query Editor" /></p>
<p><strong>Figure 5</strong>: Testing a Query in the Query Editor</p>
<p>(<a href="http://www.whardy.com/images/creator/journal8_fig05_lg.gif">click to enlarge</a>)</td>
</tr>
</tbody>
</table>
<p>Now, to customize my query I&#8217;ll add the PERSON and TRIP tables to the Query Editor. It&#8217;s easiest to do this by right-clicking in the top panel and choosing <code>Add Table</code>, and then selecting multiple tables in the dialog box that opens. But I can also drag the tables from the Servers window and drop them onto the topmost panel in the Query Editor. The IDE then adds these tables to the visual display, and also adds their fields to its table display and to the SQL query itself. Since the TRIP table includes foreign keys to the PERSON and FLIGHT tables, the Query Editor shows these connections graphically.</p>
<p>As shown in Figure 6, columns that will be displayed in a query have a check mark next to the column name. By default, when I add a table to the query, all the columns in that table are set to display.</p>
<p>I first tried un-checking these columns in the Query Editor so certain data would not display when I run my application. But this exposed a limitation in the table component that has to do with synchronization between the Query Editor and the Table Layout design-time interface. So for now, leave all columns checked so they display. For further information, see the tech tip titled <a href="/jscreator/reference/techart/2/rowset_display_errors.htmll">How to Avoid RowSet Display Synchronization Errors in Java Studio Creator 2</a>.</p>
<table border="0" cellspacing="0" cellpadding="4" width="100%">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal8_fig06.gif" alt="Customized Query" /></p>
<p><strong>Figure 6</strong>: Customized Query</p>
<p>(<a href="http://www.whardy.com/images/creator/journal8_fig06_lg.gif">click to enlarge</a>)</td>
</tr>
</tbody>
</table>
<p><a name="6"></a></p>
<h4>Changing the Table Appearance</h4>
<p>My remaining task is to change the appearance of the data in the application, particularly the column headings and column order, and to specify which data should appear at run-time. To do this, I go back to the visual designer. (I can easily toggle back and forth between the visual designer and the query editor using the tabs at the top.) I then right-click on my table (being sure that the whole table is outlined) and choose <code>Table Layout</code>.</p>
<table border="0" cellspacing="0" cellpadding="4" width="100%">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal8_fig07.gif" alt="Changing Column Headings and Repositioning Columns" /></p>
<p><strong>Figure 7</strong>: Changing Column Headings and Repositioning Columns&lt;/p</p>
<p>(<a href="http://www.whardy.com/images/creator/journal8_fig07_lg.gif">click to enlarge</a>)</td>
</tr>
</tbody>
</table>
<p>Here, the Columns tab in the dialog lets me choose the columns I would like displayed, rename column headings and easily move the position of the columns. I make my changes, and then use the Apply button to view the results. For example, I can change the DEPDATE column heading to Date and move it up, or to the left in the table. It&#8217;s great to be able to see the results as I work.</p>
<p>Then I choose the Options tab, shown in Figure 8, to enable pagination for this application. With paging enabled, the IDE automatically takes care of displaying the specified number of rows of data per page. Some very cool features can be added to my table at run-time. These features include added controls and links that allow me to page through the data, expand the table to include all data, and create complex sorting between various rows by clicking on them. Try experimenting with them in the deployed table.</p>
<table border="0" cellspacing="0" cellpadding="4" width="100%">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal8_fig08.gif" alt="Setting Page Size" /></p>
<p><strong>Figure 8</strong>: Setting Page Size</td>
</tr>
</tbody>
</table>
<p><a name="7"></a></p>
<h4>Running the Application</h4>
<p>Now I&#8217;m ready to run the application. To do this, I simply select Run Main Project from the Run menu, then wait for the IDE to compile, build, and deploy my application. Then the IDE opens a browser window and I can view the data retrieved by the application, formatted the way I wanted it, as shown in Figure 9.</p>
<table border="0" cellspacing="0" cellpadding="4" width="100%">
<tbody>
<tr>
<td align="center"><img src="http://www.whardy.com/images/creator/journal8_fig09.gif" alt="Snippet of Data from Application" /></p>
<p><strong>Figure 9</strong>: Snippet of Data from Application</p>
<p>(<a href="http://www.whardy.com/images/creator/journal8_fig09_lg.gif">click to enlarge</a>)</td>
</tr>
</tbody>
</table>
<p><a name="8"></a></p>
<h4>Next Time</h4>
<p>Now that I&#8217;ve learned how to work with the sample databases included in Java Studio Creator, I&#8217;m ready to take a look at producing production-level applications with the Microsoft SQL Server database and the MySQL database. I&#8217;ll also explore much of the important underlying technology that allows for standardized connections to databases, including how to work with data providers and property bindings.</p>
<h4>More Developer Resources</h4>
<p>For more tech tips, articles, and expert advice for developers, visit the Java Studio Creator developer resources on the Sun Developer Network (SDN) at <a href="/jscreator/index.jsp">/jscreator/</a>.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blogs.whardy.com/walter/2006/09/13/learning-curve-series-journal-8/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
