<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6656477858173203405</id><updated>2011-11-27T19:41:34.474-05:00</updated><category term='sun oracle java glassfish netbeans'/><category term='jax-rpc'/><category term='jsf'/><category term='java iphone ipad'/><category term='personal'/><category term='java'/><category term='windows service'/><category term='jaxb'/><category term='security'/><category term='conspiracy'/><category term='jax-rs'/><category term='glassfish'/><category term='maven'/><category term='sailing'/><category term='vintage computers'/><category term='alien'/><category term='netbeans'/><category term='ufo'/><category term='scrum'/><category term='agile'/><category term='jpa'/><category term='spring'/><category term='java ee'/><category term='jca'/><category term='j2ee'/><category term='solaris'/><category term='jax-ws'/><title type='text'>ryandelaplante.com</title><subtitle type='html'>Discussions on Java, Solaris, Linux and Open Source</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>30</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-1312693183321224230</id><published>2011-10-22T17:43:00.003-04:00</published><updated>2011-10-22T19:37:41.879-04:00</updated><title type='text'>Occupy Toronto</title><content type='html'>I had just finished eating dinner at Urban Herbivore in the Toronto Eatons Center, and was walking home.&amp;nbsp; I passed by Nathan Phillips Square (Toronto City Hall) and saw the Occupy Toronto protesters lining up to parade down Queen Street.&amp;nbsp; I wondered what they were protesting about because this is Canada, not the USA or Europe.&amp;nbsp; Other than the auto workers union, I'm not sure that anyone noticed the recession in 2008 or now.&amp;nbsp; It's like nothing happened here in Canada other than rising food and gas prices.&lt;br /&gt;&lt;br /&gt;The parade began with a pickup truck and loud speakers.&amp;nbsp; A transsexual was expressing "her" frustration about how nobody will accept that he is a she.&lt;br /&gt;&lt;br /&gt;Next there were a ton of people holding up signs about how the rich should be taxed more.&amp;nbsp; Who is rich? Am I rich -- the middle class person making a bit more money than average? Even if you are talking about the hundred millionaires and&amp;nbsp; billionaires, are they the real root of the problem? I don't think so.&lt;br /&gt;&lt;br /&gt;There was also someone holding a sign asking why we pamper cats and dogs, but eat pigs.&amp;nbsp; The sign was telling people to become vegan.&amp;nbsp; I became vegan earlier this year for many reasons, including the point she was making.&amp;nbsp; I just don't think Occupy Toronto is the right platform to make this statement. How about Toronto Rib Fest?&lt;br /&gt;&lt;br /&gt;Also in the parade was a woman dressed up like a clown walking her pet Styrofoam lizard, teenagers dressed up like zombies, people on drums, and a guy wearing a Canadian flag with a marijuana leaf instead of a maple leaf.&amp;nbsp; He was shouting nonsense in a megaphone. &lt;br /&gt;&lt;br /&gt;Up to this point I was completely disappointed in this protest because holding up signs that say "Corporate Greed" or "higher taxes for top 1%" isn't going to have an impact.&amp;nbsp; All they have succeeded in doing is to convince me that they don't understand what's really going on. I can't say that I do either, but I am trickle fed bits every day on &lt;a href="http://www.infowars.com/"&gt;infowars.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There was ONE guy handing out flyers.&amp;nbsp; I looked at his flyer, and it was clear that he was the only person who really understood what the protest is about, or what it SHOULD be about (in my opinion). I've scanned and posted it below:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-kXi4rJ99JNg/TqMyL2M0YKI/AAAAAAAABX0/5Rr3dL--qto/s1600/img-111022211616-0001.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="194" src="http://1.bp.blogspot.com/-kXi4rJ99JNg/TqMyL2M0YKI/AAAAAAAABX0/5Rr3dL--qto/s320/img-111022211616-0001.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-yszQe2cpDao/TqMyPcFDJNI/AAAAAAAABX8/6zreaX8UT3E/s1600/img-111022211601-0001.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="194" src="http://3.bp.blogspot.com/-yszQe2cpDao/TqMyPcFDJNI/AAAAAAAABX8/6zreaX8UT3E/s320/img-111022211601-0001.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-1312693183321224230?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/1312693183321224230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2011/10/occupy-toronto.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/1312693183321224230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/1312693183321224230'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2011/10/occupy-toronto.html' title='Occupy Toronto'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-kXi4rJ99JNg/TqMyL2M0YKI/AAAAAAAABX0/5Rr3dL--qto/s72-c/img-111022211616-0001.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-3537568335262980710</id><published>2011-05-30T22:43:00.005-04:00</published><updated>2011-05-31T08:46:25.933-04:00</updated><title type='text'>Why I Am Vegan</title><content type='html'>This video shows the factory farming norm, not exceptional cases:&lt;br /&gt;&lt;br /&gt;&lt;object width="640" height="390"&gt;&lt;param name="movie" value="http://www.youtube.com/v/THIODWTqx5E&amp;rel=0&amp;hl=en_US&amp;feature=player_embedded&amp;version=3"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/THIODWTqx5E&amp;rel=0&amp;hl=en_US&amp;feature=player_embedded&amp;version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="390"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Farmers &amp; Slaughterhouses:&lt;/b&gt; YOU PEOPLE ARE SICK!!! Nothing you can say justifies this. Period. There are many better ways you can make a living and earn a higher income.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Meat eaters:&lt;/b&gt; Think of the animals when voting with your wallet.  Every time you eat meat or animal products such as dairy, you are justifying what you saw in this video to satisfy your taste buds.&lt;br /&gt;&lt;br /&gt;I've been taking vegetarian cuisine classes one evening a week at George Brown College in Toronto for the last six months. I've learned a lot of recipes and know there are tons more. There is a lot more to being vegan than salad and steamed vegetables. I eat a lot of delicious foods and have a lot of variety in my diet. I've been ALMOST meat and dairy free for months now and feel just as good or better than I did before -- probably because I'm eating a healthier diet now.&lt;br /&gt;&lt;br /&gt;Any time I feel the urge to eat meat or other animal products, all I have to do is watch a video like this one to remind me why I chose to be vegan.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-3537568335262980710?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.chooseveg.com/animal-cruelty.asp' title='Why I Am Vegan'/><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/3537568335262980710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2011/05/why-i-am-vegan.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/3537568335262980710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/3537568335262980710'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2011/05/why-i-am-vegan.html' title='Why I Am Vegan'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-8326105933534418570</id><published>2010-10-17T17:52:00.000-04:00</published><updated>2010-10-17T17:52:35.876-04:00</updated><title type='text'>Java's biggest threat is Microsoft</title><content type='html'>I've never been one to believe that languages like Ruby, Groovy or Scala are going to be a threat to Java the language and platform.&amp;nbsp;&amp;nbsp; I think the real threat is the .NET platform.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;I have a friend who works for the Canadian Federal Government in IT.&amp;nbsp; He says that Microsoft sales people are phoning the decision makers every week or two offering huge incentives to migrate to the Microsoft platform (Windows and .NET).&amp;nbsp; They are offering huge discounts, practically giving the stuff away, and sometimes they do give things away.&amp;nbsp;&amp;nbsp; Microsoft is succeeding because the government is starting to use .NET more.&lt;br /&gt;&lt;br /&gt;Another friend of mine, also in IT, works pretty high up at the corporate headquarters of a major bank. 70% - 80% of their systems are written in Java.&amp;nbsp; Within the last couple of years they brought in consultants to help them decide which current Java technologies to focus on.&amp;nbsp; Initially they chose Hibernate / Spring / Wicket, but later I heard they changed their minds and went with iBatis / Spring / Struts 2.&amp;nbsp; Meanwhile, Microsoft has been calling their decision makers frequently offering deep discounts to switch to the Microsoft platform.&amp;nbsp; Someone at the very top of the bank made a decision to rewrite EVERYTHING in .NET. Legacy systems, recently developed systems, and new systems.&amp;nbsp; All Java programmers had to learn .NET.&amp;nbsp; Why? They looked at the cost of upgrading their WebLogic and WebSphere application servers and doing some maintenance work on one of their applications.&amp;nbsp; The cost was going to be $1M - $2M.&amp;nbsp; They were able to complete the project in .NET for $150K, so they decided that Java is too expensive.&amp;nbsp; I also heard something about a lawsuit that made it impossible for enterprises to use open source application servers like JBoss and Tomcat, which was another major reason they switched.&amp;nbsp; WHAT??&amp;nbsp; Did this information come from Microsoft?&amp;nbsp; I am unaware of this lawsuit.&lt;br /&gt;&lt;br /&gt;Another friend who works in London England said his company had a mixture of Java, PHP and .NET programmers.&amp;nbsp; The company wanted to consolidate onto one platform and they chose .NET. He said the main company HQ was a Microsoft shop, and his satellite office was the only one using Java and PHP. &lt;br /&gt;&lt;br /&gt;The same thing is happening at my company.&amp;nbsp; We currently use five programming languages, and it looks likely that we will consolidate on .NET.&lt;br /&gt;&lt;br /&gt;Here is a list of reasons why I think a company would choose to switch to .NET:&lt;br /&gt;&lt;br /&gt;1) The company has some reason to only buy middleware from companies like IBM, Oracle, and Microsoft.&amp;nbsp; If they want to run on WebLogic or WebSphere then they are going to spend a TON of money which gives them the impression that Java is expensive.&amp;nbsp; This has never been a problem for JBoss, GlassFish, Resin and Tomcat customers.&amp;nbsp; You can use these products for free, or buy support for much less than WebSphere or WebLogic. Upgrades don't cost anything.&amp;nbsp; In my eyes, Java is not expensive. &lt;br /&gt;&lt;br /&gt;2) The Java programming language has stagnated over the last 4 - 5 years. .NET has pulled ahead with closures, lambda expressions, properties, LINQ, WPF, etc.&amp;nbsp; Knowing that these features are coming to Java, this doesn't really bother me.&amp;nbsp; Java FX 2.0 is Java's answers to WPF &amp;amp; Silverlight, and we'll have a production release by JavaOne 2011.&amp;nbsp; Closures and lambdas are coming in Java 8 (2012). At JavaOne 2010 they hinted about the possibility of adding properties to Java 8.&amp;nbsp;&amp;nbsp; I'm not sure if we'll ever see LINQ, but that's not enough to make me abandon the entire Java platform.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_j2rus_Nv1d8/TKErS_2cGdI/AAAAAAAABLs/njx5O9-Hfng/s1600/Photos+-+160.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://3.bp.blogspot.com/_j2rus_Nv1d8/TKErS_2cGdI/AAAAAAAABLs/njx5O9-Hfng/s320/Photos+-+160.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_j2rus_Nv1d8/TKErTHFZbZI/AAAAAAAABLw/QbWg6yuAhXk/s1600/Photos+-+150.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/_j2rus_Nv1d8/TKErTHFZbZI/AAAAAAAABLw/QbWg6yuAhXk/s320/Photos+-+150.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_j2rus_Nv1d8/TKErTYnMPcI/AAAAAAAABL0/ypgV3l7azIU/s1600/Photos+-+151.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://3.bp.blogspot.com/_j2rus_Nv1d8/TKErTYnMPcI/AAAAAAAABL0/ypgV3l7azIU/s320/Photos+-+151.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_j2rus_Nv1d8/TKEr2hzfWUI/AAAAAAAABL8/RnpXsxwJvbw/s1600/Photos+-+152.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://3.bp.blogspot.com/_j2rus_Nv1d8/TKEr2hzfWUI/AAAAAAAABL8/RnpXsxwJvbw/s320/Photos+-+152.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;3) Too much choice.&amp;nbsp; For every decision you have to make there are many choices of libraries and frameworks.&amp;nbsp; You have to spend a lot of time and effort to evaluate all of the options.&amp;nbsp; This has fragmented the Java community into several religions.&amp;nbsp;&amp;nbsp; If you want to hire a Java programmer, you have to make sure they have experience with your choice of technology stack.&amp;nbsp;&amp;nbsp; In .NET land, the King (Microsoft) has made all the decisions for you. Just use it.&amp;nbsp; In Java, there is a King (JCP) who tries to make decision making easy by providing standardized APIs for everything imaginable like in .NET, but the mistakes from the past have tarnished many developers' view and support of the King, so some choose to ignore anything and everything he has to offer. Then they have to wire together a plethora of libraries and frameworks before writing their application which is difficult and time consuming.&amp;nbsp; I choose JCP standard APIs and open source Java EE application servers, so decision making and ease of use is not a problem for me&lt;br /&gt;&lt;br /&gt;4) Politics. There's nothing you can do about this other than being well informed to try and sway the decision.&lt;br /&gt;&lt;br /&gt;I hope Oracle and IBM realize what is happening and do something NOW.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-8326105933534418570?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/8326105933534418570/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2010/10/javas-biggest-threat-is-microsoft.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/8326105933534418570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/8326105933534418570'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2010/10/javas-biggest-threat-is-microsoft.html' title='Java&apos;s biggest threat is Microsoft'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_j2rus_Nv1d8/TKErS_2cGdI/AAAAAAAABLs/njx5O9-Hfng/s72-c/Photos+-+160.jpg' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-6282667356400930270</id><published>2010-09-27T21:06:00.006-04:00</published><updated>2010-10-04T12:59:17.277-04:00</updated><title type='text'>Vacation in San Francisco - Part 1 of 2 : JavaOne 2010</title><content type='html'>I just returned from an incredible one week vacation in San Francisco.  The primary purpose of the trip was to attend the five day JavaOne 2010 conference, but I also spent a couple of days touring the city and Bay area.  I'll cover my after conference activities in a separate blog post.&lt;br /&gt;&lt;br /&gt;This is the first JavaOne since Oracle bought Sun.  It was moved from June to September to coincide with Oracle's existing OpenWorld and Oracle Develop conferences, but managed to keep its identity by being held at a separate venue. It was clear that the conference organizers tried very hard to please us, and I think they did an excellent job.  The conference hotels were all together on a block, upscale, clean, and were well run.  It was a bit disorienting at first but I eventually figured it out.  &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_j2rus_Nv1d8/TKE7dIxnSLI/AAAAAAAABMs/YxgwMgSDCBA/s1600/JavaOne+2010+Map.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="235" src="http://2.bp.blogspot.com/_j2rus_Nv1d8/TKE7dIxnSLI/AAAAAAAABMs/YxgwMgSDCBA/s400/JavaOne+2010+Map.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;New to JavaOne was the Oracle Customer Appreciation Event on Treasure Island.  It's hard to find words to describe it other than WOW.  They bused tens of thousands of people from their hotels, over the Bay Bridge, onto Treasure Island, and then back again.  Police had to control traffic the whole way.  The event was a carnival with rides and two simultaneous concerts.  Unlimited free food, beer, wine, soda/pop, water, etc. On stage #1 (outdoors) there was Berlin, The Black Eyed Peas, and the Steve Miller Band.  On stage #2 (indoors) there was The English Beat, Don Henley, and Montgomery Gentry.   &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_j2rus_Nv1d8/TKE_NrYTPsI/AAAAAAAABMw/N-a71JxRP4A/s1600/Oracle+Concert1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="208" src="http://4.bp.blogspot.com/_j2rus_Nv1d8/TKE_NrYTPsI/AAAAAAAABMw/N-a71JxRP4A/s320/Oracle+Concert1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_j2rus_Nv1d8/TKE_SgyrJpI/AAAAAAAABM0/NhsH9C_M040/s1600/Oracle+Concert2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="211" src="http://1.bp.blogspot.com/_j2rus_Nv1d8/TKE_SgyrJpI/AAAAAAAABM0/NhsH9C_M040/s320/Oracle+Concert2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;While I was waiting in line at the Hilton to catch the bus to the event I made friends with the guys in front of me.  AJ and Levon are from a new startup called &lt;a href="http://www.postup.com/" target="_new"&gt;postup.com&lt;/a&gt;.  Many years ago, the founder of the company (someone else) invented a technique for online advertising which he sold to another company, who sold it to Yahoo, then was "blatantly copied" by Google (Ad Words).  AJ and Levon have previously worked at Yahoo, and AJ worked at Microsoft too. We hung out for the whole night since we didn't really know anyone else.   At one point I saw someone I met on Sunday night, and he seemed to be alone.  It was Jaroslav Tulach, the original creator of the NetBeans IDE and author of &lt;a href="http://www.amazon.com/Practical-API-Design-Confessions-Framework/dp/1430209739" target="_new"&gt;Practical API Design&lt;/a&gt;.  He was happy to see a familiar face and joined us for the rest of the night.  We had some really geeky conversations about modularity and the JDK while The Steve Miller Band was setting up stage.  It was really fun being able to meet any random person and start talking about programming; even at a Black Eyed Peas concert.&lt;br /&gt;&lt;br /&gt;Speaking of free beer, this year I made a point of finding the conference parties and attending them. The first one was the GlassFish Party at &lt;a href="http://www.thirstybear.com/" target="_new"&gt;The Thirsty Bear&lt;/a&gt;.  It seemed like hundreds of people filled two floors, and the beer was free.  There was a real who's who of the Java and GlassFish communities at this party. People such as &lt;a href="http://www.java.net/blogs/pelegri/" target="_new"&gt;Eduardo Pelegri-Llopart&lt;/a&gt;, &lt;a href="http://blogs.sun.com/alexismp/" target="_new"&gt;Alexis Moussine-Pouchkine&lt;/a&gt;, John Clingon, &lt;a href="http://www.java.net/blogs/arungupta" target="_new"&gt;Arun Gupta&lt;/a&gt;, &lt;a href="http://www.java.net/blogs/robc/" target="_new"&gt;Roberto Chinnici&lt;/a&gt;, &lt;a href="http://blogs.sun.com/anilgaur/" target="_new"&gt;Anil Gaur&lt;/a&gt;, etc.  I finally met fellow members of the &lt;a href="http://dreamteam.netbeans.org/" target="_new"&gt;NetBeans Dream Team&lt;/a&gt; such as &lt;a href="http://blogs.sun.com/geertjan/" target="_new"&gt;Geertjan Wielenga&lt;/a&gt;, &lt;a href="http://www.adam-bien.com/roller/abien/" target="_new"&gt;Adam Bien&lt;/a&gt;, &lt;a href="http://netbeans.dzone.com/articles/interview-sven-reimers-winner" target="_new"&gt;Sven Reimers&lt;/a&gt;, &lt;a href="http://eppleton.sharedhost.de/" target="_new"&gt;Tonni Epple&lt;/a&gt;, etc. as well as some superstars such as &lt;a href="http://nighthacks.com/roller/jag/"&gt;James Gosling&lt;/a&gt; (father of Java) and &lt;a href="http://wiki.apidesign.org/wiki/Main_Page" target="_new"&gt;Jaroslav Tulach&lt;/a&gt; (original creator of NetBeans IDE.)&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_j2rus_Nv1d8/TKEqlMxjwBI/AAAAAAAABLM/7SRd5NvXzUU/s1600/Photos+-+144.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/_j2rus_Nv1d8/TKEqlMxjwBI/AAAAAAAABLM/7SRd5NvXzUU/s320/Photos+-+144.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_j2rus_Nv1d8/TKEqlb3E_uI/AAAAAAAABLQ/53BOJ3zBtVM/s1600/Photos+-+145.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://3.bp.blogspot.com/_j2rus_Nv1d8/TKEqlb3E_uI/AAAAAAAABLQ/53BOJ3zBtVM/s320/Photos+-+145.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Surprisingly it was us NetBeans guys who left the bar last.  We ended up at a small bar up the street. What do geeks do in a bar? Whip out laptops and show cool demos of NetBeans, of course. &lt;br /&gt;&lt;br /&gt;Hours before the GlassFish party there was a 2.5 hour GlassFish Community Event. To my surprise, my name was listed on one of the Power Point slides as an important member of the community, and the speaker (Alexis) recognized me in the audience and pointed me out.  After the talk I met many people on the GlassFish team. They all knew who I am and were happy to finally meet me.  They say I ask a lot of good questions on the forums and create good bug reports. I also wrote the tool everyone uses to set up a &lt;a href="http://wikis.sun.com/display/GlassFish/FaqRunAsWindowsService" target="_new"&gt;Windows service for GlassFish V2&lt;/a&gt;, and several tutorials related to web services that still generate most of the traffic to my blog.  I think we were one of the very first paying customers of GlassFish V2 in September 2007. Eduardo thanked me for my contributions and gave me one of ten printed &lt;a href="http://www.facebook.com/photo.php?pid=4895847&amp;amp;fbid=451130709152&amp;amp;id=173885569152" target="_new"&gt;5th anniversary posters&lt;/a&gt; that has the usernames of all bug reporters in the issue tracker. &lt;br /&gt;&lt;br /&gt;I attended the JSF 2.0 Community Discussion led by Ed Burns who is the JSF 2.0 specification lead. It was one of the last sessions of the night so there weren't a lot of people attending, but I would guess around 20. I was surprised to find that I was the only person who had things to discuss other than Kito Mann (jsfcentral.com, book author). The speaker had us write discussion points on large sheets of paper on the wall.  Things I remember writing down were:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;branded screens/skinning in a multi-tenant environment&lt;/li&gt;&lt;li&gt;having to write my own radio button component because the built-in one renders them in a table&lt;/li&gt;&lt;li&gt;sandboxing the EL context of templates for including user submitted templates in screens and emails&lt;/li&gt;&lt;li&gt;multi field validation&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;I have come up with solutions to all of these problems because I needed to solve them in my projects at work. The speaker asked me to come up to the microphone to discuss some of my bullet points. We mainly discussed multi component validation, but he also mentioned that the sandboxed EL context is a really good idea.  Earlier I discussed some of these ideas with him in emails, and he said that he really liked my solution for sandboxing the EL context of templates.  After the session I sat down with him for fifteen minutes to chat about the other items in more detail. When I told him my name he recognized it right away and was happy to finally meet me. We discussed the challenges I have with JSF's radio button component and why I think it is important to fix it in the spec.  He seemed genuinely interested in my issue and apologized that my 2008 ticket had not been addressed yet.  I showed him how IceFaces built a solution that fits in nicely with the existing component and suggested that he standardize that.  He said if I can help by implementing it myself in the Mojarra reference implementation, then he can help with the spec documentation and we can get it into JSF 2.2 (because JSF 2.1 is now feature complete.)  I don't need to implement the change for JSPs, but would.  I think I will do this work and am excited about contributing to the spec.  I have a number of other small spec changes that I think would make a big improvement for developers. &lt;br /&gt;&lt;br /&gt;Ed encouraged me to come to his session on composite components, so I updated my agenda and attended.  He is a very good speaker and gave exactly the kind of technical session that I expect at JavaOne.  His presentation was in the code editor, not Power Point.   After the session I asked him to sign a couple of his books that I own. His publisher was there and took some pictures us: &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_j2rus_Nv1d8/TKoHZTW1vOI/AAAAAAAABNQ/eyVHAVj7hJI/s1600/Ryan+and+Ed+Burns.jpg" imageanchor="1"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/_j2rus_Nv1d8/TKoHZTW1vOI/AAAAAAAABNQ/eyVHAVj7hJI/s1600/Ryan+and+Ed+Burns.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Another really good session was &lt;a href="http://www.rahmannet.net/" target="_new"&gt;Reza Rahman&lt;/a&gt; and Debu Panda's presentation on Java Enterprise Edition 6 Testing. I know Reza from online so it was great getting to meet him in person and attending one of his presentations.  He is an excellent speaker.  He invited me to the &lt;a href="http://www.caucho.com/products/" target="_new"&gt;Caucho Resin&lt;/a&gt; party at a restaurant later that night, so I came.   There was a good size crowd of people, mostly ones who visited the Caucho booth in the exhibitors hall.  I met many people from Caucho and they were all very friendly.  There was free beer and food (lots of food), so thank you!  Reza had to leave early because he had another presentation, and I left shortly after to attend sessions as well.  What I find particularly interesting about Caucho is that their embedded container can be used for automated testing and it run instantly, whereas the GlassFish embedded container seemed slow (10 - 20 seconds to run a Hello World test.)  From speaking with Reza, I also know that they have some great ideas on how to further improve EJB 3.1 and CDI in Java EE 7, and have implemented these changes in Resin so you can try them today.  For example, you should be able to add security or transactions to a CDI managed bean without having to turn it into an full EJB.  In Resin, some or all of the EJB annotations can be used on CDI managed beans.   Unfortunately I didn't get a picture with Reza.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-6282667356400930270?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/6282667356400930270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2010/09/vacation-in-san-francisco-part-1-of-2.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/6282667356400930270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/6282667356400930270'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2010/09/vacation-in-san-francisco-part-1-of-2.html' title='Vacation in San Francisco - Part 1 of 2 : JavaOne 2010'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_j2rus_Nv1d8/TKE7dIxnSLI/AAAAAAAABMs/YxgwMgSDCBA/s72-c/JavaOne+2010+Map.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-7055050367366618271</id><published>2010-08-02T00:57:00.002-04:00</published><updated>2010-08-02T01:10:50.938-04:00</updated><title type='text'>Civic Long Weekend Ends With Freak Accident - Everyone is OK</title><content type='html'>This year, like every year, I went to the summer cottage for the annual regatta.&amp;nbsp; There was alcohol, songs by the campfire, BBQ, etc.&amp;nbsp; Sunday morning I decided to take the canoe out and I brought my dog Bandit.&amp;nbsp; The scenery and silence was very peaceful. Bandit was hot so I shielded him from the sun with extra life jackets and dripped some cold lake water on his back.&amp;nbsp; I snapped this picture while we were canoeing:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_j2rus_Nv1d8/TFZPEXcVW8I/AAAAAAAABF8/60Qpa3SRGgY/s1600/Bandit+on+Canoe.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_j2rus_Nv1d8/TFZPEXcVW8I/AAAAAAAABF8/60Qpa3SRGgY/s320/Bandit+on+Canoe.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;After dinner I decided to go home.&amp;nbsp; The drive wasn't too bad and we made it home safely.&amp;nbsp; After unloading some things into my condo I took Bandit out for a walk.&amp;nbsp; I let Bandit run to the elevator with his leash dragging behind him while I locked the door.&amp;nbsp; I got lost in thought while we were waiting for the elevator, and then the door opened.&amp;nbsp; We entered, I pressed G for ground, then I stared at my sunburned face in the mirror.&amp;nbsp;&amp;nbsp; A second or two later I heard a thump.&amp;nbsp; I turned around, and Bandit was gone!&amp;nbsp; I looked up and to my horror he was hanging by the neck near the ceiling at the top right of the elevator door. My primal instinct was to scream in terror.&amp;nbsp; I probably screamed two or three times before pulling myself together enough to figure out how to save him.&amp;nbsp; First I checked to see if his head was still in the elevator because I could only see his legs and body. It was.&amp;nbsp; Next I lifted him a bit to hopefully help him breath, then I was able to unclip his collar.&amp;nbsp; He landed in my arms and appeared fine. No choking, no shaking, no whining... it was like nothing had happened.&amp;nbsp; I could hear people in another elevator saying "What the f*** is going on???" because of my screaming.&amp;nbsp; The hairs on the backs of their necks must have stood up on end because the way I was screaming made it clear that I was truly terrified... like death was imminent.&lt;br /&gt;&lt;br /&gt;When we got to the ground floor the door opened, and Bandit's leash was all wound up in the door jam.&amp;nbsp; I was able to pull it out easily, then I carried Bandit over to the security desk.&amp;nbsp; I put him down, re-attached the collar then told the security guard what just happened.&amp;nbsp; I also told him that if anyone reports screaming, it was me.&amp;nbsp; A moment later another elevator door opened and a crowd of people came out.&amp;nbsp; I figure they were the same people that said "What the f*** is going on???".&amp;nbsp; They probably had no idea it was me as they walked by, or that it is even possible for a man to scream like that :)&amp;nbsp; My throat still hurts a few hours later.&lt;br /&gt;&lt;br /&gt;Bandit seems totally fine.&amp;nbsp; He pulled me along the walk as usual, didn't hesitate to get back in the elevator, ate some food, drank water, and slept on the floor.&amp;nbsp; I think I'm more traumatized by this incident than he is!&amp;nbsp; I will now be very conscious of his leash when using the elevator, and will educate other dog owners about the potential danger.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-7055050367366618271?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/7055050367366618271/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2010/08/civic-long-weekend-ends-with-freak.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/7055050367366618271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/7055050367366618271'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2010/08/civic-long-weekend-ends-with-freak.html' title='Civic Long Weekend Ends With Freak Accident - Everyone is OK'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_j2rus_Nv1d8/TFZPEXcVW8I/AAAAAAAABF8/60Qpa3SRGgY/s72-c/Bandit+on+Canoe.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-6723068242429288954</id><published>2010-04-29T22:03:00.001-04:00</published><updated>2010-04-29T22:04:17.615-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><title type='text'>Robert (Bob) Thirsk First Canadian Expedition Crest</title><content type='html'>One of the security guards in my building is quite friendly and chats with everyone.&amp;nbsp; I sometimes chat with him and recently found out that he's a university student switching from Molecular Biology to Aerospace Engineering.&amp;nbsp; He told me that his cousin has a PhD in Math and is working on next-generation vision technology that can see inside of buildings and underground bunkers from a satellite in space!&amp;nbsp; It seems difficult to believe, but I think defense technology is decades ahead of anything civilians know about.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.asc-csa.gc.ca/images/expedition_20-21_ecusson_t.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="212" src="http://www.asc-csa.gc.ca/images/expedition_20-21_ecusson_t.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;My security guard friend told me that he was at the Canadian Space Agency in Quebec last year and got to see the mission control center with live video feeds.&amp;nbsp; His cousin gave him a pin (that you pin to your shirt) that &lt;a href="http://www.asc-csa.gc.ca/eng/missions/expedition20-21/canadian_patch.asp"&gt;commemorates Canada's first long duration Expedition on-board the International Space Station (ISS)&lt;/a&gt;. He said only ten of these were made, and it is personalized with the astronaut's name.&amp;nbsp;&amp;nbsp; This one is for &lt;a href="http://www.asc-csa.gc.ca/eng/astronauts/biothirsk.asp"&gt;Rober Thirsk&lt;/a&gt;.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;He's trying to convince me to take Aerospace Engineering instead of Computer Science when I go back to school in a few years.&amp;nbsp;&amp;nbsp; He said it is such a large field and surely I will find an area that can take advantage of my programming skills.&amp;nbsp; That is an interesting thought and I will keep it in mind.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-6723068242429288954?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.asc-csa.gc.ca/eng/missions/expedition20-21/canadian_patch.asp' title='Robert (Bob) Thirsk First Canadian Expedition Crest'/><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/6723068242429288954/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2010/04/robert-bob-thirsk-first-canadian.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/6723068242429288954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/6723068242429288954'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2010/04/robert-bob-thirsk-first-canadian.html' title='Robert (Bob) Thirsk First Canadian Expedition Crest'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-3596863660430767816</id><published>2010-04-29T00:15:00.002-04:00</published><updated>2010-04-29T00:19:47.716-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><title type='text'>Bumped into Brian Mulroney while walking the dog</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://communications.uwo.ca/com/media/images/Alumni_Gazette2007/mulroney2.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="320" src="http://communications.uwo.ca/com/media/images/Alumni_Gazette2007/mulroney2.jpg" width="240" /&gt;&lt;/a&gt;&lt;/div&gt;Tonight I thought I'd do some multi-tasking by depositing some cheques at an ATM while walking the dog.  We walked to my branch and the ATM had a sign saying that it was down for the evening for an upgrade.  So, we walked up to a branch on Front St. by the Rogers Center where a baseball game had just finished.  After I finished my banking we walked down Front St. and met some people who loved my dog.  They also have Miniature Schnauzers.  While we were chatting about our dogs someone said "Excuse me." I turned around and there was &lt;a href="http://en.wikipedia.org/wiki/Brian_Mulroney" target="_new"&gt;Brian Mulroney&lt;/a&gt;, a former Canadian Prime Minister!  Apparantly we had stopped to chat about dogs right in front of his limousine and were in his way.  I stood there star struck, staring at him for a long time trying to figure out who this familiar face is.  He stared back at me and we were probably silent for 5 - 10 seconds.  He smiled, turned away and walked into &lt;a href="http://www.azurerestaurant.ca/" target="_new"&gt;Azure Restaurant &amp;amp; Bar&lt;/a&gt;. I snapped out of it and said "Oh my God!".&amp;nbsp; The people I was chatting with were totally oblivious about what was happening. When I explained who it was, they said "Oh, he's from back when Regan was President." They were American.&lt;br /&gt;&lt;br /&gt;I wonder if Mulroney thought I didn't like him and was being rude by not getting out of his way, or if he realized that I was star struck.  I suspect he realized what was going on when he smiled before turning away. That probably made his night :)&amp;nbsp; Maybe he'll write about it on his blog tonight.&amp;nbsp; jk&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-3596863660430767816?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/3596863660430767816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2010/04/bumped-into-brian-mulroney-while.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/3596863660430767816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/3596863660430767816'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2010/04/bumped-into-brian-mulroney-while.html' title='Bumped into Brian Mulroney while walking the dog'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-6394211561845855259</id><published>2010-04-14T01:06:00.004-04:00</published><updated>2010-04-15T01:57:29.750-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><title type='text'>Summer Plans</title><content type='html'>I've been living on the cutting edge of technology for the past five years always trying to make sure I'm ready for the next challenge at work; but also because programming is my favorite hobby.  Constantly keeping myself up to date has substituted any kind of personal life outside of technology.  &lt;br /&gt;&lt;br /&gt;Recently I decided to make some adjustments for this summer. I'm putting down my books and all ambitions of creating the next killer app, and instead will focus on hobbies and activities that don't involve computers. I'm not freezing my programming skills in time... I'm just shifting my learning to work hours like everyone else at the office does.&lt;br /&gt;&lt;br /&gt;For starters, I &lt;a href="http://www.roland.com/products/en/KR-7/images/KR-7-PM_L.jpg" target="_new"&gt;bought a used piano&lt;/a&gt; and will be starting in-home lessons soon. I know what some of you are thinking: years ago I bought a guitar and did nothing with it, so this is just another passing fancy.  I really think this is different.  This time I didn't buy an instrument [just] because a bunch of my friends bought one, and this time I'm taking private lessons. I've always wanted to learn to play the piano, and think it is more "me" than the guitar. I plan to put a lot more effort into the piano than I did with the guitar; probably 30-60 minutes per day for years.&lt;br /&gt;&lt;br /&gt;I live on the Toronto waterfront and there is a yacht club just a short walk away. A couple years ago I took sailing lessons and earned my Basic Cruising license.  Club members have unlimited usage of the club-owned boats. Race nights are on Tuesdays, and the social sails are on Friday nights.  I didn't join because I took my lessons at the end of the season, and the following summer I needed to spend all of my time and money saving my dog's life (he is doing really well now.)  This year I intend to join because I really enjoy sailing under wind power with the Toronto skyline under sunset as the backdrop. It's also a really good way to forget about everything and enjoy the moment.&lt;br /&gt;&lt;br /&gt;This summer I'm also going to &lt;i&gt;begin&lt;/i&gt; re-learning high school level algebra, calculus, vectors and advanced functions.  My goal is to be able to score in the high 90's a few years from now. I've never been good at math and always thought that only certain types of people get it.  After reading a book called "The Tipping Point" I realized that anyone can be good at math -- you just need to put enough time and effort into it like I do with programming. You must be wondering why I have a sudden interest in math. There are a couple of reasons.  First, I would really like to take my programming skills beyond business database and user interface programming where all math is hidden from me in libraries and frameworks.  I envy the people who create the technologies I use to do my job such as operating systems, programming languages, developer tools, and also scientific type applications.  An area of programming I've always been interested in (even though I currently know nothing about it) is artificial intelligence.  I bought &lt;a href="http://www.amazon.com/Artificial-Intelligence-Modern-Approach-3rd/dp/0136042597/ref=dp_ob_title_bk" target="_new"&gt;a book used to teach AI&lt;/a&gt; in over 1000 universities but can't properly read it until I upgrade my math skills.   The other reason I want to re-learn math is because in 3-5 years from now I plan to go back to school.  Whether or not having a Computer Science degree matters when I have so much experience already doesn't matter to me. Not having a degree has been bothering me for years, and I feel like I am capable of doing so much more if I only had a proper education. I have a 2 year college diploma in Computer Programming which is very different.  The difference between a four to five year Computer Science degree and a two to three year Computer Programmer diploma is that the Computer Science grads learn how to make the technologies used by Computer Programmer grads.  So, I plan to thoroughly prep myself before applying to the best school in Canada for Computer Science: The University of Waterloo. It is very heavy on math. &lt;br /&gt;&lt;br /&gt;Another way I am getting deeper into computers is with my vintage computer collection.  I collect historically significant, first edition, unmodified, working computers in collectible condition.  My favorite ones are from the 1970's such as the Altair 8800, my Apple 1 replica, and the Apple II.  Just to use the Altair 8800 you need to learn machine code.  To use my Apple 1 replica I need to solder the chips onto the board first, and build a wooden case for it.  The Apple 1 is also programmed using raw machine code.  I find this stuff very fascinating.  I now have enough of a collection that I need to build a large display case for them. &lt;br /&gt;&lt;br /&gt;Sometime in the future I'd like to revive my French skills too.  I was raised in French schools but haven't used it for ten or more years.  I'd like to bring my reading, writing and speaking skills to the same level I'm at with English.  I'd also like to work with a speech therapist to learn the Quebec accent.  Maybe after getting a Computer Science degree from Waterloo and becoming fully bilingual again, I could work for the Canadian Forces developing top secret defense technology.&lt;br /&gt;&lt;br /&gt;A few more things I'd like to do this summer are: try cooking a new recipe every week, explore the city (Toronto) more, and to improve my photography skills. Maybe I'll also learn to hit a golf ball, play poker, and chess.  That might be too much for one summer, but they are all on my to-do list.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-6394211561845855259?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/6394211561845855259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2010/04/summer-plans.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/6394211561845855259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/6394211561845855259'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2010/04/summer-plans.html' title='Summer Plans'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-751537923736696399</id><published>2010-03-20T03:17:00.013-04:00</published><updated>2010-03-20T13:44:57.184-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='conspiracy'/><category scheme='http://www.blogger.com/atom/ns#' term='alien'/><category scheme='http://www.blogger.com/atom/ns#' term='ufo'/><title type='text'>The Frightening Truth</title><content type='html'>Over 400 US government, military, and intelligence community witnesses &lt;a href="http://www.disclosureproject.org/" target="_new"&gt;testify&lt;/a&gt; their direct, personal, first hand experiences with UFOs, ETs, ET technology, and the cover-up that keeps this information secret. &lt;i&gt;(Note: the three minute introduction can be skipped)&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- begin embedded WindowsMedia file... --&gt;&lt;br /&gt;&lt;table border='0' cellpadding='0' align="center"&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;object id='mediaPlayer' width="320" height="285"       classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95'       codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'      standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'&gt;       &lt;param name='fileName' value="http://speedstream.netro.ca/netrostream113/npcc.wmv"&gt;&lt;param name='animationatStart' value='true'&gt;&lt;param name='transparentatStart' value='true'&gt;&lt;param name='autoStart' value="false"&gt;&lt;param name='showControls' value="true"&gt;&lt;param name='loop' value="false"&gt;&lt;embed type='application/x-mplayer2'        pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'        id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1'         bgcolor='darkblue' showcontrols="true" showtracker='-1'         showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="320" height="285"        src="http://speedstream.netro.ca/netrostream113/npcc.wmv" autostart="false" designtimesp='5311' loop="false"&gt;       &lt;/EMBED&gt;       &lt;/OBJECT&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;!-- ...end embedded WindowsMedia file --&gt;     &lt;!-- begin link to launch external media player... --&gt;&lt;tr&gt;&lt;td align='center'&gt;&lt;br /&gt;&lt;a href="http://speedstream.netro.ca/netrostream113/npcc.wmv" style='font-size: 85%;' target='_blank'&gt;Launch in external player&lt;/a&gt;&lt;br /&gt;&lt;!-- ...end link to launch external media player... --&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;For those of you that don't have two hours to watch... The video gives a very brief introduction to the experiences of 21 of 400 retired US Government witnesses. In 2001 they got together and held a press conference to fully disclose everything they know, including the evidence to back up their claims. They are pressing for the government to &lt;a href="http://www.disclosureproject.org/email-update-october-24-2009.shtml" target="_new"&gt;declassify all of it, and to ban the weaponization of space&lt;/a&gt;. They confirm that:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;aliens are real&lt;/li&gt;&lt;li&gt;we have been in contact with aliens for at least 50 years&lt;/li&gt;&lt;li&gt;there is a shadow government that keeps this information secret, even from Presidents&lt;/li&gt;&lt;li&gt;aliens have bases on the other side of the moon (that never faces Earth)&lt;/li&gt;&lt;li&gt;we have had their technology for decades and have built craft using alien technology&lt;/li&gt;&lt;li&gt;we have the physics and technology to travel faster than light&lt;/li&gt;&lt;li&gt;we have the physics and technology for the generation of limitless clean energy from the so-called zero point energy field and quantum vacuum flux field from the space around us, and propulsion that has been termed (incorrectly) anti-gravity. The field of electromagnetic energy that is teeming all around us and which is embedded within the fabric of space/time can easily run all of the energy needs of the Earth - without pollution, oil, gas, coal, centralized utilities or nuclear power.&lt;/li&gt;&lt;li&gt;we have cataloged 57 species of aliens, some of which look exactly like humans but with heightened senses (such as smell, sight, etc.)&lt;/li&gt;&lt;li&gt;there is no evidence that the aliens are hostile.&lt;/li&gt;&lt;li&gt;all alien abduction and implant events are done by the government. They have proof. If you read the letter to President Obama it also talks about a government plan to stage a fake alien attack on Earth using alien technology and "programmed life forms" to convince 99.99% of people that it is real. The goal is to weaponize space.&lt;/li&gt;&lt;li&gt;many real encounters involve the aliens remotely disabling nuclear missiles rendering them useless.&lt;/li&gt;&lt;li&gt;once our planet becomes a peaceful civilization we will be able to be much more involved with the other civilizations in our universe.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Given the billions of stars in the universe, I have always thought it is naive to think that Earth is the only planet that can sustain life. Also, Earth could be hundreds, thousands, millions or billions of years younger than other life sustaining planets which would explain why they are so much more technologically advanced.&lt;br /&gt;&lt;br /&gt;Believe what you want. I want to believe.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-751537923736696399?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.disclosureproject.org/' title='The Frightening Truth'/><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/751537923736696399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2010/03/frightening-truth.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/751537923736696399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/751537923736696399'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2010/03/frightening-truth.html' title='The Frightening Truth'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-1893654494331404106</id><published>2010-03-14T20:05:00.003-04:00</published><updated>2010-03-24T00:52:33.243-04:00</updated><title type='text'>The original Apple 1 computer for sale on eBay</title><content type='html'>There are thought to be only 30 - 50 Apple 1 computers left in the world.&amp;nbsp; In 2009 two of them sold for $50,000 each.&amp;nbsp; This one was &lt;a href="http://cgi.ebay.com/Apple-1-The-ORIGINAL-Apple-Computer_W0QQitemZ160413355114QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item2559618c6a"&gt;just listed&lt;/a&gt; with a starting bid of $30,000.&amp;nbsp;&amp;nbsp; I think it's going to sell!&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_j2rus_Nv1d8/S514VpBe4-I/AAAAAAAABF0/2GwiTH170t0/s1600-h/Apple1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_j2rus_Nv1d8/S514VpBe4-I/AAAAAAAABF0/2GwiTH170t0/s320/Apple1.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I'm on a waiting list for the &lt;a href="http://www.willegal.net/appleii/apple1.htm"&gt;Apple 1 Mimeo kit&lt;/a&gt; which is a replica that tries to be as close to the original design possible.&amp;nbsp; I can't wait for it to arrive!&amp;nbsp;&amp;nbsp; There is also a book called "&lt;a href="http://www.amazon.com/Apple-Replica-Creation-Back-Garage/dp/193183640X/ref=sr_1_2?ie=UTF8&amp;amp;s=books&amp;amp;qid=1268611394&amp;amp;sr=1-2"&gt;Apple 1 Replica Creation : Back to the Garage&lt;/a&gt;" that walks you through the design from scratch so you understand every chip, every pin, every connection.&amp;nbsp;&amp;nbsp; I have so many Java books on my plate, I'd like to put them down to work through this book as a "light break". It could be a good introduction to electrical engineering which is something I'm starting to get interested in.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;UPDATE:&lt;/b&gt; It sold for $42,766.00 !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-1893654494331404106?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://cgi.ebay.com/Apple-1-The-ORIGINAL-Apple-Computer_W0QQitemZ160413355114QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item2559618c6a' title='The original Apple 1 computer for sale on eBay'/><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/1893654494331404106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2010/03/original-apple-1-computer-for-sale-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/1893654494331404106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/1893654494331404106'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2010/03/original-apple-1-computer-for-sale-on.html' title='The original Apple 1 computer for sale on eBay'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_j2rus_Nv1d8/S514VpBe4-I/AAAAAAAABF0/2GwiTH170t0/s72-c/Apple1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-1043219335586615866</id><published>2010-03-13T11:07:00.003-05:00</published><updated>2010-03-14T20:11:32.515-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vintage computers'/><title type='text'>Personal Computer Museum in Brantford Ontario</title><content type='html'>While watching a YouTube video of an Apple 1 replica running some games I discovered the &lt;a href="http://www.pcmuseum.ca/"&gt;Personal Computer Museum&lt;/a&gt; in Brantford Ontario, just an hour South West of Toronto.  It was started by Syd Bolton, a Brantford local who has been collecting vintage computers for over 20 years.  &lt;br /&gt;&lt;br /&gt;I recently started collecting vintage computers too. I don't remember exactly how it started, but I saw the original 1984 Macintosh computer on TV or the web and was floored about how usable it was compared to anything that came before it (except Lisa 1 which was developed by Apple at the same time and released in 1983).  I bought a collector quality, unmodified 1984 Macintosh with the original boxes, packaging, manuals, disks, accessories, a bunch of 1.0 boxed software, etc.  The spending didn't stop there.  I decided that I want to buy collector quality working first edition computers that are considered to be milestones in computing history.   Here is what I plan to have in my personal museum:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;1971 Intel 4004 - the world's first microprocessor. Check. Mine is framed in a museum display case with some historical information and a printout of the chip design.&lt;/li&gt;&lt;li&gt;1975 MITS Altair 8800 - this computer coined the term "personal computer" and inspired Bill Gates &amp;amp; Paul Allen to found Microsoft so they could create and sell their first product: a BASIC interpreter for the Altair 8800.  I'm  currently in discussions with three sellers.&lt;/li&gt;&lt;li&gt;January &amp;amp; February 1975 editions of Popular Electronics - this is the magazine issue that showed the world the new Altair 8800, and gave Paul Allen (Microsoft co-founder) the idea to create and sell a BASIC interpreter for it. Check.&lt;/li&gt;&lt;li&gt;1976 Apple 1 replica - A real Apple 1 costs $20,000 - $50,000 since there are only 30 - 50 of them left. In 1976, computers were made up of many boards and required a separate teletype or video terminal to access them. Steve Wozniak thought a computer should be a single board and have support for a video terminal built in (you attach a TV and keyboard to it). He sold a couple hundred kits and using that money they created an improved model called the Apple II. I am on a waiting list for a &lt;a href="http://www.willegal.net/appleii/apple1-kit.htm" target="_new"&gt;replica Apple 1 kit&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;1977 Apple II rev0 - Almost exactly one year after launching the Apple 1, an improved Apple II model was released - this time pre-assembled, and including a case and keyboard. This is the computer that introduced most people to personal computing. It wasn't until the 1978 release of VisiCalc, the first computerized spreadsheet, that people realized the value of a personal computer and sales exploded.  Not long after, IBM got into the business with the first IBM PC.  The rev0 Apple II's are the very first ones manufactured in 1977 before further improvements were made.  I have one lined up for purchased but the seller shorted something while trying to remember how to make it work so he could take pictures. He sent it away to an old Apple II technician, and I'm waiting for him to get back to me.&lt;/li&gt;&lt;li&gt;1981 IBM PC - The first IBM PC, the first MS DOS 1.0, etc. No explanation required here. These are much more affordable than the other computers in my collection, but it is lower priority so I have not purchased one yet.&lt;/li&gt;&lt;li&gt;1983 Apple Lisa 1 - This is the first commercially available computer with a graphical user interface and a mouse.  It was prohibitively expensive ($10,000 or, in today's dollars $22,000) so not many people ever saw or used one. There were problems with the two "twiggy" floppy drives so Apple recalled them and upgraded the hardware to a "Lisa 2".  There are so few Lisa 1's around that they sell for $10,000 today.  I found one, but obviously don't have that kind of cash. Maybe when I'm rich I will buy one. I don't really want a Lisa 2 because it's not "the first" like the rest of my collection.&lt;/li&gt;&lt;li&gt;1984 Macintosh - no introduction needed here. This is the very first Macintosh computer. Check.&lt;/li&gt;&lt;li&gt;1988 NeXT Computer - After leaving Apple in 1985, Steve Jobs started a new company to create his vision of the future. He built a black cube computer that was so fast and powerful they were later called "personal mainframes". They were at least 5 years ahead of anything you could buy. For this computer he built the NeXTSTEP operating system based on BSD/UNIX, and built a graphical user interface similar to what is in the Macintosh.  In 1997 Apple bought the company and the NeXTSTEP operating system was re-worked to become the core of Mac OSX (and later iPhone OS.)  At CERN, the first web browser and web server was created on a NeXT Computer.  Check.  Mine is like new and includes manuals.&lt;/li&gt;&lt;li&gt;1993 Apple Newton - This product coined the term PDA. It was years ahead of its time and was a failure. Check.&lt;/li&gt;&lt;li&gt;2001 Apple iPod - This wasn't the first MP3 player, and isn't really a computer, but it ties into the next item so I had to get it. Check. Mine comes in the original box with manuals, disk, cables, etc.&lt;/li&gt;&lt;li&gt;2007 Apple iPhone - This phone changed the way people think about phones and smartphones.  Sure there was the Palm Treo and Windows phones before it, but somehow Apple's new touch interface changed everything.  Now everyone is trying to replicate it. I haven't bought one of these yet because I've been spending too much money lately.&lt;/li&gt;&lt;li&gt;2010 Apple iPad - These aren't out yet but as soon as they are available for pre-order in Canada I will buy one. Not everyone sees it yet, but I think Steve is right about this computer. It is going to change the way people think about computers.  You don't need a laptop or desktop computer for many things you do such as web browsing, email, reading books, etc.  In the future I think computers will kind of disappear into devices and appliances like the iPhone and iPad. You will only use a desktop or laptop computer for thins that really need it.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;You might think this is an Apple collection, but it is not. It is a collection of computers that are considered milestones in the history books. It just happens that Apple is responsible for most of the innovation! This really opened my eyes about Apple. Believe it or not I don't own or know how to use a modern Apple computer. Hopefully I'll get one this year for work because I'll be doing some iPhone work which can only be done on a Mac. &lt;br /&gt;&lt;br /&gt;My favorite computers are from the golden age of computing back in the mid 1970's. I'm looking forward to getting out the soldering iron and assembling the Apple 1 replica, then programming it using raw machine code. I'm sure I'll be able to program it because back in school I had the highest (or second highest?) grade in the x86 assembler class, and I really understood what I was doing. The Apple 1 uses a different processor, but the point is I should be able to learn it. After this experience, I might decide to study a bit of electrical engineering in the future as a hobby.&lt;br /&gt;&lt;br /&gt;Now back to the original topic.. the Personal Computer Museum is only open on select dates. Today is one of those dates so it's time for a shower, then I'm going to head over.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-1043219335586615866?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.pcmuseum.ca' title='Personal Computer Museum in Brantford Ontario'/><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/1043219335586615866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2010/03/personal-computer-museum-in-brantford.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/1043219335586615866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/1043219335586615866'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2010/03/personal-computer-museum-in-brantford.html' title='Personal Computer Museum in Brantford Ontario'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-1890127192075215925</id><published>2010-02-14T12:24:00.013-05:00</published><updated>2010-02-14T14:37:49.166-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jax-rs'/><category scheme='http://www.blogger.com/atom/ns#' term='java ee'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><title type='text'>Bill Burke's interesting perspective on Java EE standards</title><content type='html'>A well known Spring biased / anti Java EE personality wrote the following comment in &lt;a href="http://www.infoq.com/articles/springmvc_jsx-rs" target="_new"&gt;an article&lt;/a&gt; comparing Spring MVC's RESTful web service API with the Java EE 6 standardized JAX-RS API:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Spring MVC REST annotations caught up, and may have surpassed the JAX-RS annotations. I'm looking forward to new and exciting features that a single entity like SpringSource can pump out; &lt;b&gt;a JSR committee can't have as quick feature turn around.&lt;/b&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;A well known proponent of Java EE standards, &lt;a href="http://bill.burkecentral.com/" target="_new"&gt;Bill Burke&lt;/a&gt; of &lt;a href="http://www.jboss.com/"&gt;JBoss&lt;/a&gt;, responded with: &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;I think that's a bit unfair. JAX-RS is a specification not a product. &lt;b&gt;I'm sure JAX-RS implementations like &lt;a href="https://jersey.dev.java.net/" target="_new"&gt;Jersey&lt;/a&gt;, &lt;a href="http://jboss.org/resteasy" target="_new"&gt;RESTEasy&lt;/a&gt;, and &lt;a href="http://cxf.apache.org/docs/restful-services.html" target="_new"&gt;CXF&lt;/a&gt; can innovate just as fast&lt;/b&gt;, probably faster, than anything SpringSource comes up with. The difference is of course, that these projects will bring back their innovations to a future JAX-RS revision so that all can share and so that such an important API isn't controlled by one commercial company.&lt;br /&gt;&lt;br /&gt;IMO, its just sad that SpringSource has the inherent need to do their own thing for something as trivial as JAX-RS.&lt;/blockquote&gt;&lt;br /&gt;When another commenter listed a handful of features that the Jersey implementation has built in addition to the standard API, Bill writes:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Yeah, RESTEasy supports same kinda stuff, but additionally asynchronous HTTP, client and server caching, interceptors, and an annotation-driven client framework. I know a lot of the stuff in Jersey, RESTEasy etc. will be in the next revision of the spec. &lt;b&gt;IMO, specs aren't for innovation, they are for consolidation.&lt;/b&gt;&lt;/blockquote&gt;&lt;br /&gt;Bill made very good points, and I'm glad he helped to balance the view for readers. Hopefully insightful comments like these help to undo the damage from years of venomous anti-Java EE propaganda that the Spring community has been subjected to.&lt;br /&gt;&lt;br /&gt;Other good examples of consolidation are the &lt;a href="http://jcp.org/en/jsr/proposalDetails?id=224" target="_new"&gt;JAX-WS&lt;/a&gt;, &lt;a href="http://www.jcp.org/en/jsr/proposalDetails?id=299" target="_new"&gt;CDI&lt;/a&gt;, &lt;a href="http://www.jcp.org/en/jsr/proposalDetails?id=317" target="_new"&gt;JPA&lt;/a&gt;, &lt;a href="http://jcp.org/en/jsr/proposalDetails?id=303" target="_new"&gt;Bean Validation&lt;/a&gt;, and &lt;a href="http://jcp.org/en/jsr/proposalDetails?id=314" target="_new"&gt;JSF 2.0&lt;/a&gt; specifications.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-1890127192075215925?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/1890127192075215925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2010/02/bill-burkes-interesting-perspective-on.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/1890127192075215925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/1890127192075215925'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2010/02/bill-burkes-interesting-perspective-on.html' title='Bill Burke&apos;s interesting perspective on Java EE standards'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-3972494673164624705</id><published>2010-01-30T15:42:00.004-05:00</published><updated>2010-01-30T15:47:39.188-05:00</updated><title type='text'>Setting up JAX-RS in pre Java EE 6 environments</title><content type='html'>The JAX-RS API for developing RESTful web services is a Java EE 6 API.  Java EE 5 application servers and Tomcat don't come with JAX-RS, so you will need to add it into your project.  This article shows how to use Sun's Jersey implementation with Maven, and in case you are interested, how to integrate it with Spring. &lt;br /&gt;&lt;br /&gt;Start by adding dependencies to your Maven pom.xml:&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;dependencies&amp;gt;  &lt;br /&gt;   &amp;lt;dependency&amp;gt;  &lt;br /&gt;     &amp;lt;groupId&amp;gt;com.sun.jersey&amp;lt;/groupId&amp;gt;  &lt;br /&gt;     &amp;lt;artifactId&amp;gt;jersey-server&amp;lt;/artifactId&amp;gt;  &lt;br /&gt;     &amp;lt;version&amp;gt;1.1.4.1&amp;lt;/version&amp;gt;  &lt;br /&gt;     &amp;lt;scope&amp;gt;compile&amp;lt;/scope&amp;gt;  &lt;br /&gt;   &amp;lt;/dependency&amp;gt;  &lt;br /&gt;   &amp;lt;dependency&amp;gt;  &lt;br /&gt;     &amp;lt;groupId&amp;gt;com.sun.jersey.contribs&amp;lt;/groupId&amp;gt;  &lt;br /&gt;     &amp;lt;artifactId&amp;gt;jersey-spring&amp;lt;/artifactId&amp;gt;  &lt;br /&gt;     &amp;lt;version&amp;gt;1.1.4.1&amp;lt;/version&amp;gt;  &lt;br /&gt;     &amp;lt;scope&amp;gt;compile&amp;lt;/scope&amp;gt;  &lt;br /&gt;   &amp;lt;/dependency&amp;gt;  &lt;br /&gt;   &amp;lt;dependency&amp;gt;  &lt;br /&gt;     &amp;lt;groupId&amp;gt;com.sun.xml.bind&amp;lt;/groupId&amp;gt;  &lt;br /&gt;     &amp;lt;artifactId&amp;gt;jaxb-impl&amp;lt;/artifactId&amp;gt;  &lt;br /&gt;     &amp;lt;version&amp;gt;2.1.12&amp;lt;/version&amp;gt;  &lt;br /&gt;     &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;  &lt;br /&gt;   &amp;lt;/dependency&amp;gt;  &lt;br /&gt; &amp;lt;/dependencies&amp;gt;  &lt;br /&gt;   &lt;br /&gt; &amp;lt;repositories&amp;gt;  &lt;br /&gt;   &amp;lt;repository&amp;gt;  &lt;br /&gt;     &amp;lt;id&amp;gt;maven2-repository.dev.java.net&amp;lt;/id&amp;gt;  &lt;br /&gt;     &amp;lt;name&amp;gt;Java.net Repository for Maven&amp;lt;/name&amp;gt;  &lt;br /&gt;     &amp;lt;url&amp;gt;http://download.java.net/maven/2/&amp;lt;/url&amp;gt;  &lt;br /&gt;     &amp;lt;layout&amp;gt;default&amp;lt;/layout&amp;gt;  &lt;br /&gt;   &amp;lt;/repository&amp;gt;  &lt;br /&gt; &amp;lt;/repositories&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The Jersey implementation is a servlet, but you can also use it as a servlet filter.  I found that using it as a servlet made it either not respond to any requests, or it would break other things like JSF. So, I recommend using the servlet filter approach:&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;filter&amp;gt;  &lt;br /&gt;   &amp;lt;filter-name&amp;gt;Jersey Web Application&amp;lt;/filter-name&amp;gt;  &lt;br /&gt;   &amp;lt;filter-class&amp;gt;com.sun.jersey.spi.spring.container.servlet.SpringServlet&amp;lt;/filter-class&amp;gt;  &lt;br /&gt;   &amp;lt;init-param&amp;gt;  &lt;br /&gt;     &amp;lt;param-name&amp;gt;com.sun.jersey.config.property.packages&amp;lt;/param-name&amp;gt;  &lt;br /&gt;     &amp;lt;param-value&amp;gt;com.ryandelaplante.example&amp;lt;/param-value&amp;gt;  &lt;br /&gt;   &amp;lt;/init-param&amp;gt;  &lt;br /&gt;   &amp;lt;init-param&amp;gt;  &lt;br /&gt;     &amp;lt;param-name&amp;gt;com.sun.jersey.spi.container.ContainerRequestFilters&amp;lt;/param-name&amp;gt;  &lt;br /&gt;     &amp;lt;param-value&amp;gt;com.sun.jersey.api.container.filter.PostReplaceFilter;com.sun.jersey.api.container.filter.LoggingFilter&amp;lt;/param-value&amp;gt;  &lt;br /&gt;   &amp;lt;/init-param&amp;gt;  &lt;br /&gt;   &amp;lt;init-param&amp;gt;  &lt;br /&gt;     &amp;lt;param-name&amp;gt;com.sun.jersey.spi.container.ContainerResponseFilters&amp;lt;/param-name&amp;gt;  &lt;br /&gt;     &amp;lt;param-value&amp;gt;com.sun.jersey.api.container.filter.LoggingFilter&amp;lt;/param-value&amp;gt;  &lt;br /&gt;   &amp;lt;/init-param&amp;gt;  &lt;br /&gt;   &amp;lt;init-param&amp;gt;  &lt;br /&gt;      &amp;lt;param-name&amp;gt;com.sun.jersey.config.feature.logging.DisableEntitylogging&amp;lt;/param-name&amp;gt;  &lt;br /&gt;      &amp;lt;param-value&amp;gt;false&amp;lt;/param-value&amp;gt;  &lt;br /&gt;    &amp;lt;/init-param&amp;gt;  &lt;br /&gt; &amp;lt;/filter&amp;gt;  &lt;br /&gt; &amp;lt;filter-mapping&amp;gt;  &lt;br /&gt;   &amp;lt;filter-name&amp;gt;Jersey Web Application&amp;lt;/filter-name&amp;gt;  &lt;br /&gt;   &amp;lt;url-pattern&amp;gt;/rest/*&amp;lt;/url-pattern&amp;gt;  &lt;br /&gt; &amp;lt;/filter-mapping&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;This configures Jersey to respond to /rest/* URIs.  It also enables the logging filter so you can see the request and response headers and bodies.  The PostReplaceFilter enables support for sending an X-HTTP-Method-Override header in POST requests to translate it into a PUT or DELETE.  This is necessary for supporting some RESTful web service clients that don't support PUT or DELETE.  &lt;br /&gt;&lt;br /&gt;The com.sun.jersey.config.property.packages init-param tells Jersey which package(s) to recursively scan for classes that have JAX-RS annotations.  I think you can separate multiple packages with a semicolon. &lt;br /&gt;&lt;br /&gt;Your JAX-RS resources are managed by Jersey. You can inject Spring beans into it using the com.sun.jersey.spi.inject.Inject annotation, as long as you have the jersey-spring dependency added to your pom.xml in Maven.  For example:&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;1:  package com.ryandelaplante.example;  &lt;br /&gt;2:    &lt;br /&gt;3:  import com.sun.jersey.spi.inject.Inject;  &lt;br /&gt;4:  import javax.ws.rs.Consumes;  &lt;br /&gt;5:  import javax.ws.rs.Path;  &lt;br /&gt;6:  import javax.ws.rs.Produces;  &lt;br /&gt;7:    &lt;br /&gt;8:  @Consumes("text/xml")  &lt;br /&gt;9:  @Produces("text/xml")  &lt;br /&gt;10:  @Path("/rest/orders")  &lt;br /&gt;11:  public class OrdersResource {  &lt;br /&gt;12:    @Inject  &lt;br /&gt;13:    private OrderService orderService;  &lt;br /&gt;14:    &lt;br /&gt;15:    ...  &lt;br /&gt;16:  }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The OrderService will be loaded from the Spring container.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-3972494673164624705?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/3972494673164624705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2010/01/setting-up-jax-rs-in-pre-java-ee-6.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/3972494673164624705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/3972494673164624705'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2010/01/setting-up-jax-rs-in-pre-java-ee-6.html' title='Setting up JAX-RS in pre Java EE 6 environments'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-8535226024878166678</id><published>2010-01-30T15:05:00.004-05:00</published><updated>2010-02-03T08:39:47.045-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='jax-rs'/><category scheme='http://www.blogger.com/atom/ns#' term='java ee'/><category scheme='http://www.blogger.com/atom/ns#' term='jaxb'/><title type='text'>XML bindings with JAXB and JAX-RS</title><content type='html'>There are many tutorials and examples of using JAX-RS to create RESTful web services, but most fall short of explaining how to produce and consume complex object graphs using XML and JAXB. This article will show how easy it can be, several approaches to where you place the annotations, and how you can configure them.&lt;br /&gt;&lt;br /&gt;Lets start with the root XML element. I chose to call mine GetOrdersResponse, and use it as a container for a collection of Order objects and a Customer object.  You don't need to follow this convention.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;1:  package com.ryandelaplante.example;  &lt;br /&gt;2:    &lt;br /&gt;3:  import java.util.ArrayList;  &lt;br /&gt;4:  import java.util.List;  &lt;br /&gt;5:  import javax.xml.bind.annotation.XmlElement;  &lt;br /&gt;6:  import javax.xml.bind.annotation.XmlElementWrapper;  &lt;br /&gt;7:  import javax.xml.bind.annotation.XmlRootElement;  &lt;br /&gt;8:    &lt;br /&gt;9:  @XmlRootElement  &lt;br /&gt;10:  public class GetOrdersResponse {  &lt;br /&gt;11:    private Customer customer;  &lt;br /&gt;12:    private List&amp;lt;Order&amp;gt; orders = new ArrayList&amp;lt;Order&amp;gt;();  &lt;br /&gt;13:    &lt;br /&gt;14:    @XmlElement  &lt;br /&gt;15:    public Customer getCustomer() {  &lt;br /&gt;16:      return customer;  &lt;br /&gt;17:    }  &lt;br /&gt;18:    &lt;br /&gt;19:    public void setCustomer(Customer customer) {  &lt;br /&gt;20:      this.customer = customer;  &lt;br /&gt;21:    }  &lt;br /&gt;22:    &lt;br /&gt;23:    @XmlElement  &lt;br /&gt;24:    @XmlElementWrapper(name = "orders")  &lt;br /&gt;25:    public List&amp;lt;Order&amp;gt; getOrders() {  &lt;br /&gt;26:      return orders;  &lt;br /&gt;27:    }  &lt;br /&gt;28:    &lt;br /&gt;29:    public void setOrders(List&amp;lt;Order&amp;gt; orders) {  &lt;br /&gt;30:      this.orders = orders;  &lt;br /&gt;31:    }  &lt;br /&gt;32:  }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;JAXB's default naming convention is to use your class or bean getter name as-is, but starting with a lower case letter.  In this example, once marshaled to XML the element names will be getOrdersResponse, customer, and orders. I will show an example of how to override the default naming later in this article.&lt;br /&gt;&lt;br /&gt;Also notice that I placed the @XmlElement annotations on the getter methods instead of on the private fields.  When placed on the private fields, JAXB will give you an error unless you add @XmlAccessorType(XmlAccessType.FIELD) at the class level.  I will show an example of this later.&lt;br /&gt;&lt;br /&gt;Finally, notice the @XmlElementWrapper annotation on the List&lt;order&gt; collection. This makes JAXB wrap all of the order XML elements inside of an orders XML element.  This annotation can be used with an array instead of a List too, which will be shown later.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;1:  package com.ryandelaplante.example;  &lt;br /&gt;2:    &lt;br /&gt;3:  import javax.xml.bind.annotation.XmlElement;  &lt;br /&gt;4:  import javax.xml.bind.annotation.XmlType;  &lt;br /&gt;5:    &lt;br /&gt;6:  @XmlType(name = "Customer")  &lt;br /&gt;7:  public class Customer {  &lt;br /&gt;8:    private long customerNumber;  &lt;br /&gt;9:    private String firstName;  &lt;br /&gt;10:    private String lastName;  &lt;br /&gt;11:    &lt;br /&gt;12:    @XmlElement(name = "CustomerNumber")  &lt;br /&gt;13:    public long getCustomerNumber() {  &lt;br /&gt;14:      return customerNumber;  &lt;br /&gt;15:    }  &lt;br /&gt;16:    &lt;br /&gt;17:    public void setCustomerNumber(long customerNumber) {  &lt;br /&gt;18:      this.customerNumber = customerNumber;  &lt;br /&gt;19:    }  &lt;br /&gt;20:    &lt;br /&gt;21:    &lt;br /&gt;22:    @XmlElement(name = "FirstName")  &lt;br /&gt;23:    public String getFirstName() {  &lt;br /&gt;24:      return firstName;  &lt;br /&gt;25:    }  &lt;br /&gt;26:    &lt;br /&gt;27:    public void setFirstName(String firstName) {  &lt;br /&gt;28:      this.firstName = firstName;  &lt;br /&gt;29:    }  &lt;br /&gt;30:    &lt;br /&gt;31:    @XmlElement(name = "LastName")  &lt;br /&gt;32:    public String getLastName() {  &lt;br /&gt;33:      return lastName;  &lt;br /&gt;34:    }  &lt;br /&gt;35:    &lt;br /&gt;36:    public void setLastName(String lastName) {  &lt;br /&gt;37:      this.lastName = lastName;  &lt;br /&gt;38:    }  &lt;br /&gt;39:  }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;In the example above, we use @XmlType at the class level instead of @XmlRootElement because it is not the root element.  Also notice the name parameter in each of the annotations.  This is how you override JAXB's default element naming.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;1:  package com.ryandelaplante.example;  &lt;br /&gt;2:    &lt;br /&gt;3:  import java.util.Date;  &lt;br /&gt;4:  import javax.xml.bind.annotation.XmlAccessType;  &lt;br /&gt;5:  import javax.xml.bind.annotation.XmlAccessorType;  &lt;br /&gt;6:  import javax.xml.bind.annotation.XmlElement;  &lt;br /&gt;7:  import javax.xml.bind.annotation.XmlElementWrapper;  &lt;br /&gt;8:  import javax.xml.bind.annotation.XmlType;  &lt;br /&gt;9:    &lt;br /&gt;10:  @XmlType(propOrder = { "orderDate", "orderNumber", "lineItems" } )  &lt;br /&gt;11:  @XmlAccessorType(XmlAccessType.FIELD)  &lt;br /&gt;12:  public class Order {  &lt;br /&gt;13:    @XmlElement  &lt;br /&gt;14:    public Date orderDate;  &lt;br /&gt;15:    &lt;br /&gt;16:    @XmlElement  &lt;br /&gt;17:    public long orderNumber;  &lt;br /&gt;18:    &lt;br /&gt;19:    @XmlElement  &lt;br /&gt;20:    @XmlElementWrapper(name = "lineItems")  &lt;br /&gt;21:    public LineItem[] lineItems;  &lt;br /&gt;22:      &lt;br /&gt;23:    public long getOrderNumber() {  &lt;br /&gt;24:      return orderNumber;  &lt;br /&gt;25:    }  &lt;br /&gt;26:    &lt;br /&gt;27:    public void setOrderNumber(long orderNumber) {  &lt;br /&gt;28:      this.orderNumber = orderNumber;  &lt;br /&gt;29:    }  &lt;br /&gt;30:    &lt;br /&gt;31:    public Date getOrderDate() {  &lt;br /&gt;32:      return orderDate;  &lt;br /&gt;33:    }  &lt;br /&gt;34:    &lt;br /&gt;35:    public void setOrderDate(Date orderDate) {  &lt;br /&gt;36:      this.orderDate = orderDate;  &lt;br /&gt;37:    }  &lt;br /&gt;38:    &lt;br /&gt;39:    public LineItem[] getLineItems() {  &lt;br /&gt;40:      return lineItems;  &lt;br /&gt;41:    }  &lt;br /&gt;42:    &lt;br /&gt;43:    public void setLineItems(LineItem[] lineItems) {  &lt;br /&gt;44:      this.lineItems = lineItems;  &lt;br /&gt;45:    }  &lt;br /&gt;46:  }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;In the example above I used the @XmlAccessorType(XmlAccessType.FIELD) to allow me to place the @XmlElement annotations on the private fields instead of on the getter methods.&lt;br /&gt;&lt;br /&gt;Also notice the propOrder parameter of the @XmlType annotation.  By default JAXB will order the elements alphabetically.  Use the propOrder parameter to specify the order when marshaling to XML.  The values are the bean names, not the overridden names in the @XmlElement(name = "overridenName") annotation.&lt;br /&gt;&lt;br /&gt;Finally, notice the @XmlElementWrapper used on a LineItem[] array.  It works with arrays and Lists.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;1:  package com.ryandelaplante.example;  &lt;br /&gt;2:    &lt;br /&gt;3:  import javax.xml.bind.annotation.XmlElement;  &lt;br /&gt;4:  import javax.xml.bind.annotation.XmlType;  &lt;br /&gt;5:    &lt;br /&gt;6:  @XmlType(propOrder = { "sku", "description", "quantity", "unitPrice",  &lt;br /&gt;7:              "subTotal", "tax", "total" } )  &lt;br /&gt;8:  public class LineItem {  &lt;br /&gt;9:    private long sku;  &lt;br /&gt;10:    private String description;  &lt;br /&gt;11:    private short quantity;  &lt;br /&gt;12:    private double unitPrice;  &lt;br /&gt;13:      &lt;br /&gt;14:    @XmlElement  &lt;br /&gt;15:    public long getSku() {  &lt;br /&gt;16:      return sku;  &lt;br /&gt;17:    }  &lt;br /&gt;18:    &lt;br /&gt;19:    public void setSku(long sku) {  &lt;br /&gt;20:      this.sku = sku;  &lt;br /&gt;21:    }  &lt;br /&gt;22:    &lt;br /&gt;23:    @XmlElement  &lt;br /&gt;24:    public String getDescription() {  &lt;br /&gt;25:      return description;  &lt;br /&gt;26:    }  &lt;br /&gt;27:    &lt;br /&gt;28:    public void setDescription(String description) {  &lt;br /&gt;29:      this.description = description;  &lt;br /&gt;30:    }  &lt;br /&gt;31:    &lt;br /&gt;32:    @XmlElement  &lt;br /&gt;33:    public short getQuantity() {  &lt;br /&gt;34:      return quantity;  &lt;br /&gt;35:    }  &lt;br /&gt;36:    &lt;br /&gt;37:    public void setQuantity(short quantity) {  &lt;br /&gt;38:      this.quantity = quantity;  &lt;br /&gt;39:    }  &lt;br /&gt;40:    &lt;br /&gt;41:    @XmlElement  &lt;br /&gt;42:    public double getUnitPrice() {  &lt;br /&gt;43:      return unitPrice;  &lt;br /&gt;44:    }  &lt;br /&gt;45:    &lt;br /&gt;46:    public void setUnitPrice(double unitPrice) {  &lt;br /&gt;47:      this.unitPrice = unitPrice;  &lt;br /&gt;48:    }  &lt;br /&gt;49:    &lt;br /&gt;50:    @XmlElement  &lt;br /&gt;51:    public double getSubTotal() {  &lt;br /&gt;52:      return unitPrice * quantity;  &lt;br /&gt;53:    }  &lt;br /&gt;54:    &lt;br /&gt;55:    @XmlElement  &lt;br /&gt;56:    public double getTax() {  &lt;br /&gt;57:      return getSubTotal() * 0.15F;  &lt;br /&gt;58:    }  &lt;br /&gt;59:    &lt;br /&gt;60:    @XmlElement  &lt;br /&gt;61:    public double getTotal() {  &lt;br /&gt;62:      return getSubTotal() + getTax();  &lt;br /&gt;63:    }  &lt;br /&gt;64:  }  &lt;br /&gt;65:    &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;In the example above there are no setter methods that correspond to getSubTotal, getTax and getTotal.&lt;br /&gt;&lt;br /&gt;Now lets create a JAX-RS RESTful web service that can return this object graph in the response.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;1:  package com.ryandelaplante.example;  &lt;br /&gt;2:    &lt;br /&gt;3:  import java.util.Date;  &lt;br /&gt;4:  import javax.ws.rs.GET;  &lt;br /&gt;5:  import javax.ws.rs.PUT;  &lt;br /&gt;6:  import javax.ws.rs.Path;  &lt;br /&gt;7:  import javax.ws.rs.PathParam;  &lt;br /&gt;8:  import javax.ws.rs.Produces;  &lt;br /&gt;9:  import javax.ws.rs.core.MediaType;  &lt;br /&gt;10:  import javax.ws.rs.core.Response;  &lt;br /&gt;11:  import javax.ws.rs.core.Response.ResponseBuilder;  &lt;br /&gt;12:    &lt;br /&gt;13:  @Path("/api/orders")  &lt;br /&gt;14:  public class OrderResource {  &lt;br /&gt;15:    @GET  &lt;br /&gt;16:    @Produces("text/xml")  &lt;br /&gt;17:    public GetOrdersResponse getOrders() {  &lt;br /&gt;18:        &lt;br /&gt;19:      GetOrdersResponse response = new GetOrdersResponse();  &lt;br /&gt;20:      Customer customer = new Customer();  &lt;br /&gt;21:      LineItem lineItem1;  &lt;br /&gt;22:      LineItem lineItem2;  &lt;br /&gt;23:    &lt;br /&gt;24:      // customer  &lt;br /&gt;25:      customer.setCustomerNumber(12345);  &lt;br /&gt;26:      customer.setFirstName("Ryan");  &lt;br /&gt;27:      customer.setLastName("de Laplante");  &lt;br /&gt;28:      response.setCustomer(customer);  &lt;br /&gt;29:        &lt;br /&gt;30:      // first order  &lt;br /&gt;31:      Order order1 = new Order();  &lt;br /&gt;32:      order1.setOrderNumber(54321);  &lt;br /&gt;33:      order1.setOrderDate(new Date());  &lt;br /&gt;34:    &lt;br /&gt;35:      lineItem1 = new LineItem();  &lt;br /&gt;36:      lineItem1.setSku(77777);  &lt;br /&gt;37:      lineItem1.setDescription("winning lottery ticket");  &lt;br /&gt;38:      lineItem1.setQuantity((short) 10);  &lt;br /&gt;39:      lineItem1.setUnitPrice(5.00F);  &lt;br /&gt;40:    &lt;br /&gt;41:      lineItem2 = new LineItem();  &lt;br /&gt;42:      lineItem2.setSku(12121212);  &lt;br /&gt;43:      lineItem2.setDescription("Real World Java EE Patterns Rethinking " +  &lt;br /&gt;44:          "Best Practices");  &lt;br /&gt;45:      lineItem2.setQuantity((short) 1);  &lt;br /&gt;46:      lineItem2.setUnitPrice(40.40F);  &lt;br /&gt;47:    &lt;br /&gt;48:      order1.setLineItems(new LineItem[] { lineItem1, lineItem2 } );  &lt;br /&gt;49:      response.getOrders().add(order1);  &lt;br /&gt;50:    &lt;br /&gt;51:      // second order  &lt;br /&gt;52:      Order order2 = new Order();  &lt;br /&gt;53:      order2.setOrderNumber(12345);  &lt;br /&gt;54:      order2.setOrderDate(new Date());  &lt;br /&gt;55:    &lt;br /&gt;56:      lineItem1 = new LineItem();  &lt;br /&gt;57:      lineItem1.setSku(787878);  &lt;br /&gt;58:      lineItem1.setDescription("JavaServer Faces 2.0, The Complete " +  &lt;br /&gt;59:          "Reference");  &lt;br /&gt;60:      lineItem1.setQuantity((short) 10);  &lt;br /&gt;61:      lineItem1.setUnitPrice(31.49F);  &lt;br /&gt;62:    &lt;br /&gt;63:      lineItem2 = new LineItem();  &lt;br /&gt;64:      lineItem2.setSku(1111111);  &lt;br /&gt;65:      lineItem2.setDescription("Beginning Java EE 6 with GlassFish 3, " +  &lt;br /&gt;66:          "Second Edition");  &lt;br /&gt;67:      lineItem2.setQuantity((short) 1);  &lt;br /&gt;68:      lineItem2.setUnitPrice(41.73F);  &lt;br /&gt;69:    &lt;br /&gt;70:      order2.setLineItems(new LineItem[] { lineItem1, lineItem2 } );  &lt;br /&gt;71:      response.getOrders().add(order2);  &lt;br /&gt;72:        &lt;br /&gt;73:      return response;  &lt;br /&gt;74:    }  &lt;br /&gt;75:  }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Notice the @Produces("text/xml") annotation, and that the method returns a GetOrdersResponse object.  Since the GetOrdersResponse is annotated with JAXB annotations, JAX-RS will automatically marshal the response to XML.&lt;br /&gt;&lt;br /&gt;Next lets add a method that takes part of the object graph as a request parameter.  We'll start by creating an object to represent the XML root element:&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;1:  package com.ryandelaplante.example;  &lt;br /&gt;2:    &lt;br /&gt;3:  import javax.xml.bind.annotation.XmlElement;  &lt;br /&gt;4:  import javax.xml.bind.annotation.XmlRootElement;  &lt;br /&gt;5:    &lt;br /&gt;6:  @XmlRootElement  &lt;br /&gt;7:  public class UpdateOrderRequest {  &lt;br /&gt;8:    private Order order;  &lt;br /&gt;9:    &lt;br /&gt;10:    @XmlElement  &lt;br /&gt;11:    public Order getOrder() {  &lt;br /&gt;12:      return order;  &lt;br /&gt;13:    }  &lt;br /&gt;14:    &lt;br /&gt;15:    public void setOrder(Order order) {  &lt;br /&gt;16:      this.order = order;  &lt;br /&gt;17:    }  &lt;br /&gt;18:  }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Now lets use this object in a PUT request:&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;1:  @PUT  &lt;br /&gt;2:  @Path("{orderNumber}.xml")  &lt;br /&gt;3:  @Produces(MediaType.TEXT_PLAIN)  &lt;br /&gt;4:  public Response updateOrder(@PathParam("orderNumber") String orderNumber,  &lt;br /&gt;5:      UpdateOrderRequest request) throws OrderNotFoundException {  &lt;br /&gt;6:    &lt;br /&gt;7:    ResponseBuilder response;  &lt;br /&gt;8:    &lt;br /&gt;9:    if ("12345".equals(orderNumber)) {  &lt;br /&gt;10:      response = Response.status(Response.Status.ACCEPTED).entity(  &lt;br /&gt;11:          "Saved changes to order '" +  &lt;br /&gt;12:          request.getOrder().getOrderNumber() + "'.");  &lt;br /&gt;13:    } else {  &lt;br /&gt;14:      throw new OrderNotFoundException("Order number '" + orderNumber +  &lt;br /&gt;15:          "' does not exist.");  &lt;br /&gt;16:    }  &lt;br /&gt;17:    return response.build();  &lt;br /&gt;18:  }&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Since the UpdateOrderRequest is annotated with JAXB annotations, JAX-RS will automatically unmarshal it from XML.&lt;br /&gt;&lt;br /&gt;This example returns a javax.ws.rs.core.Response built using javax.ws.rs.core.ResponseBuilder. You can use ResponseBuilder to set response headers, the status code, and many other things. The response body is called the entity, and you can place anything in it. For example, a String, or a JAXB annotated object graph.&lt;br /&gt;&lt;br /&gt;This example also throws an OrderNotFoundException:&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;1:  package com.ryandelaplante.example;  &lt;br /&gt;2:    &lt;br /&gt;3:  import javax.ws.rs.WebApplicationException;  &lt;br /&gt;4:  import javax.ws.rs.core.MediaType;  &lt;br /&gt;5:  import javax.ws.rs.core.Response;  &lt;br /&gt;6:  import javax.ws.rs.core.Response.Status;  &lt;br /&gt;7:    &lt;br /&gt;8:  public class OrderNotFoundException extends WebApplicationException {  &lt;br /&gt;9:    public OrderNotFoundException(String message) {  &lt;br /&gt;10:      super(Response.status(Status.NOT_FOUND).entity(message).type(  &lt;br /&gt;11:          MediaType.TEXT_PLAIN).build());  &lt;br /&gt;12:    }  &lt;br /&gt;13:  }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The custom exception extends the WebApplicationException in JAX-RS. There are many constructors in WebApplicationException.  I chose to use the one that lets me provide the complete response data.&lt;br /&gt;&lt;br /&gt;Another interesting issue is API versioning.  When I created my first RESTful web service I included an API version number in the URL.  For example, /rest/v1/orders.  When it came to implementation, a number of thoughts came to mind:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Some companies might deploy/install multiple copies of their service into production, each with a different context root. For example,   https://api.company.com/v1/  and  https://api.company.com/v2/  could be two separate copies of the same service/.war file, just different versions.&lt;/li&gt;&lt;li&gt;Another approach might be to detect the version number in the URL, and process the request/response accordingly.  There may be challenges such as returning an Order object in v1 has fewer fields than v2.  Since the same object implementation is probably being used for both versions, is it important that v1 does not include the new v2 fields?&lt;/li&gt;&lt;li&gt;Is there any benefit to distinguishing the API version number in the URL if you ensure backward compatibility in all releases?&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;I decided that the last option was best for me, so I do not include version numbers in the URI.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-8535226024878166678?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/8535226024878166678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2010/01/xml-bindings-with-jaxb-and-jax-rs.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/8535226024878166678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/8535226024878166678'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2010/01/xml-bindings-with-jaxb-and-jax-rs.html' title='XML bindings with JAXB and JAX-RS'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-6134859500484550844</id><published>2010-01-30T12:51:00.000-05:00</published><updated>2010-01-30T12:51:11.430-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java iphone ipad'/><title type='text'>J2ME on the iPhone</title><content type='html'>Back in 2008, &lt;a href="http://www.ibtimes.com/articles/20080428/apple-sun-java-iphone.htm" target="_new"&gt;Sun was working with a company called Innaworks&lt;/a&gt; to build &lt;a href="http://www.innaworks.com/alcheMo-for-iPhone.html" target="_new"&gt;alcheMo for iPhone&lt;/a&gt;; a commercial product that translates J2ME source code to Objective C so that it can be compiled to run on the iPhone. Here is a snippet from their product description:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;alcheMo for iPhone is capable of converting J2ME applications utilizing an extensive subset of Java ME CLDC 1.1 and MIDP 2.0 (including touch screen support) and supports several JSR extension APIs including the JSR-256 mobile sensor API. Additional APIs support multi-touch and native iPhone look and feel. This automatic translation process is instantaneous, repeatable, and available 24/7 while requiring no iPhone specific experience.&lt;/blockquote&gt;&lt;br /&gt;That is interesting.  After my recent experience developing J2ME for BlackBerry, I was quite underwhelmed. I hope that Sun/Oracle releases a Java FX compiler that outputs native iPhone/iPad binaries, with support for nearly the full Java 6 API, and all of the J2ME JSR APIs.&lt;br /&gt;&lt;br /&gt;I listen to the &lt;a href="http://javaposse.com/" target="_new"&gt;Java Posse&lt;/a&gt; podcast, and noticed that whenever they talk about Java FX on Android, Tor Norbye from Sun who works on Java FX tooling always says "No comment."  I hope this is a sign that Sun is working on bringing Java FX to platforms that developers REALLY want and need to target. Otherwise, Java is going to lose to C# (&lt;a href="http://monotouch.net/" target="_new"&gt;MonoTouch&lt;/a&gt;) and &lt;a href="http://www.adobe.com/devnet/logged_in/abansod_iphone.html" target="_new"&gt;Flash Lite&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-6134859500484550844?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/6134859500484550844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2010/01/j2me-on-iphone.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/6134859500484550844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/6134859500484550844'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2010/01/j2me-on-iphone.html' title='J2ME on the iPhone'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-2791666860663514132</id><published>2010-01-27T20:24:00.010-05:00</published><updated>2010-01-29T08:08:57.139-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sun oracle java glassfish netbeans'/><title type='text'>The Sun has not set: Oracle makes Sun shine brighter than ever</title><content type='html'>For over nine months the Java world has been waiting with bated breath for definitive information about the future of Sun's software and hardware portfolios. That day has arrived! Today Oracle held a five hour live webcast outlining their high level strategies for Sun's entire product line.  The webcast was recorded and &lt;a href="http://www.oracle.com/events/productstrategy/index.html" target="_new"&gt;broken up into topics&lt;/a&gt; for easy consumption.  &lt;br /&gt;&lt;br /&gt;As a Java developer and Sun customer, I am very excited about Oracle's acquisition of Sun and their plans for the software.  I have summarized the topics that interest me:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The Sun brand and logo live on!&lt;/b&gt; All the pictures of hardware, slides, the sun.com and oracle.com websites, etc. show the Sun logo above the Oracle logo.  I'm really glad they are keeping the brand because it makes it easier for me to warm up to Oracle.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;JavaOne lives on!&lt;/b&gt;  JavaOne will somehow run at the same venue and same time as Oracle OpenWorld on September 19-23 2010.  Call for papers will be open soon.  Also, Oracle will be expanding JavaOne to Brazil, Russia, India and China!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The JCP lives on!&lt;/b&gt;  Oracle believes in the value of a community process to develop standardized APIs.  I don't think they mentioned any specifics about process changes, or if there would be process changes.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://oracle.com.edgesuite.net/ivt/4000/8104/9236/12627/lobby_external_flash_clean_480x360/default.htm" target="_new"&gt;NetBeans lives on!&lt;/a&gt;&lt;/b&gt; JDeveloper remains Oracle's strategic IDE for Oracle middleware, and they will continue to develop Eclipse tooling.  However, Oracle wants to make NetBeans the best IDE for Java SE, Java EE, Java ME and Java FX. They also see value in the NetBeans platform and want it to be the best as well.  They want developers to have choice, and will make sure that JDeveloper, NetBeans and Eclipse all have excellent support for Oracle middleware.  They see opportunities for sharing features, such as porting NetBeans' Matisse Swing GUI builder to JDeveloper, and porting some middleware support from JDeveloper into NetBeans.  They will increase resources on NetBeans development.  I think that they will focus more on Java platform technologies than on support for other languages, and maybe expect the community to contribute for the other languages.  That makes me very happy because I'd much rather see focus on Java SE, EE, ME, FX, etc. than on Ruby, PHP, Jython, etc.  The netbeans.org website and wikis will continue to be maintained. The licenses stay the same.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://oracle.com.edgesuite.net/ivt/4000/8104/9236/12629/lobby_external_flash_clean_480x360/default.htm" target="_new"&gt;GlassFish lives on!&lt;/a&gt;&lt;/b&gt; GlassFish continues as the Java EE reference implementation, continues to be open source, and continues to be commercially supported.  For example, a GlassFish V3 extended support contract is available until December 2017.  Oracle thinks that GlassFish and WebLogic Server are the best Java EE application server offerings in the industry.  All of the supporting projects that make up GlassFish will also continue to thrive.  They have plans to share code between GlassFish and WebLogic, possibly including management infrastructure.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;HotSpot and JRocket are Oracle's strategic JVMs.&lt;/b&gt;  Oracle will bring the best of both together over the coming months and years. OpenJDK 7 will be released this year.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;OpenSSO, OpenDS, OpenESB, OpenPortal, and almost everything else live on.&lt;/b&gt;  I tuned into the live webcast for a few minutes and heard talks about these products.  I get the impression that Oracle wants to continue to offer and sell Sun software products to smaller businesses, and offer an upgrade path to their more expensive products as the company grows or their needs change.  I'm glad they see it that way because I for one would never pay $25,000 per server for WebLogic with cluster support when I could be using JBoss or another more affordable application server.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Kenai.com for internal use only.&lt;/b&gt;  Soon there will be an announcement on kenai.com about it not achieving the expected usage levels. Oracle thinks they still have a use for it, and will use it internally.  They will continue to improve it, and might one day offer it to the public again, but no promises.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://oracle.com.edgesuite.net/ivt/4000/8104/9236/12625/lobby_external_flash_clean_480x360/default.htm"&gt;Sun's public cloud is closed effective immediately.&lt;/a&gt;&lt;/b&gt;  I guess they want enterprises to buy hardware instead.  They talked about Sun's huge amount of work in creating virtualization technologies to make the public cloud a reality, and Oracle sees tremendous value in that work.  They want to help enterprises evolve their datacenters to private clouds and/or hybrid clouds using these technologies.  Sun has datacenter management software from the operating system layer down to firmware upgrades and hardware provisioning.  Oracle has the equivalent management software for middleware and up.  They now have an end-to-end cloud solution to sell you. They referred to it as "cloud in a box". &lt;br /&gt;&lt;br /&gt;There is much more to talk about, but I think I've covered the most important bits for most Java developers.  I am picturing many pessimists and Sun haters flapping around the floor like fish in frustration because they were hoping to see the death of NetBeans, GlassFish, Java FX, the JCP, SPARC, JavaOne, Solaris, and anything that came out of Sun.  Nope, not going to happen.  In related news, SpringSource's dmServer is in the process of &lt;a href="http://www.theserverside.com/news/thread.tss?thread_id=59183" target="_new"&gt;being moved to the Eclipse foundation&lt;/a&gt; soon after VMWare bought the company :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-2791666860663514132?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/2791666860663514132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2010/01/sun-has-not-set-oracle-makes-sun-shine.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/2791666860663514132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/2791666860663514132'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2010/01/sun-has-not-set-oracle-makes-sun-shine.html' title='The Sun has not set: Oracle makes Sun shine brighter than ever'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-4557099472059908977</id><published>2009-10-26T23:53:00.001-04:00</published><updated>2009-10-26T23:55:35.771-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>I know your password</title><content type='html'>If you are using Thunderbird as your email client and don't know to manually set a master password, then anyone with access to your computer can see your passwords in plain text!  Don't believe me?  Click the Edit menu, select Preferences, click the Privacy tab, then the Edit Saved Passwords button.  Click the Show Passwords button and a new column will appear with the password of each email account shown in plain text.  &lt;br /&gt;&lt;br /&gt;To protect your passwords you need to set a master password on the Privacy tab of the Preferences window.  The master password will be used to encrypt your passwords.  Every time you open Thunderbird it will ask you to enter your master password before it will be able to communicate with mail servers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-4557099472059908977?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/4557099472059908977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2009/10/i-know-your-password.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/4557099472059908977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/4557099472059908977'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2009/10/i-know-your-password.html' title='I know your password'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-1197220984480533653</id><published>2009-10-24T19:45:00.005-04:00</published><updated>2009-10-25T08:23:33.730-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solaris'/><title type='text'>OpenSolaris at the Ontario Linux Fest 2009</title><content type='html'>Today I attended the &lt;a href="http://www.onlinux.ca" target="_new"&gt;Ontario [GNU] Linux Fest&lt;/a&gt; here in Toronto. To my delight there was a session on OpenSolaris led by Steven Acres, the founder of the new &lt;a href="http://opensolaris.org/os/project/torosug/" target="_new"&gt;Toronto OpenSolaris Users Group (SUG)&lt;/a&gt;.  I heard about the new SUG earlier this week and joined the mailing list.  After his presentation, I spoke with Steven about the new SUG.  He says it has very few members at this stage and is seeking additional leadership.  The meetings are held at the Bahen Centre for Computer Science (University of Toronto.) When finished, some head out for food and drinks.  This sounds like a great way to meet and get to know fellow geeks. I thought the Toronto Java Users Group was going be good for that, but it doesn't seem very social to me. Everyone shows up, listens to a vendor presentation, then leaves.&lt;br /&gt;&lt;br /&gt;I think Steven's presentation was prepared earlier by Sun.  It was full of command line examples but light on explaining the meat of what makes Solaris a compelling alternative to other operating systems. Maybe each slide was designed as a visual cue for the presenter to go into the kind of detail I was expecting. This session did have the best swag though: a thick book on ZFS Administration!! Thank you Sun!&lt;br /&gt;&lt;br /&gt;This session got me thinking about a blog series I've been wanting to write for more than a year about OpenSolaris.   Each entry was going to focus on a particular technology such as SMF, Resource Manager, Zones, etc.  I haven't written the series yet because I'd have to do a bunch more research about each technology, and just haven't had the time.  I'm a Java developer using OpenSolaris, not a network administrator who gets hands on experience with the full stack every day.  Maybe once I meet some of the SUG members we can work together on creaing such a blog series to be posted on &lt;a href="http://blogs.sun.com/observatory/" target="_new"&gt;The Observatory&lt;/a&gt;, then turn it into a new PowerPoint presentation that will be more persuasive.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-1197220984480533653?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/1197220984480533653/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2009/10/opensolaris-at-ontario-linux-fest-2009.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/1197220984480533653'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/1197220984480533653'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2009/10/opensolaris-at-ontario-linux-fest-2009.html' title='OpenSolaris at the Ontario Linux Fest 2009'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-5807625965368172258</id><published>2009-10-12T15:17:00.006-04:00</published><updated>2009-10-12T19:52:46.175-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java ee'/><category scheme='http://www.blogger.com/atom/ns#' term='glassfish'/><title type='text'>GlassFish lockups and Windows crashes - solved after 2 years!</title><content type='html'>In July 2008 I wrote a blog entry titled &lt;a href="http://www.ryandelaplante.com/2008/07/glassfish-lockups-were-microsofts-fault.html" target="_new"&gt;GlassFish lockups were Microsoft's fault&lt;/a&gt; one month after finding the solution to our lockups.  The problem returned six months later, but was much worse.  In September 2009 I believe I found the cause and solution to the second problem. We have been problem free for one month now.&lt;br /&gt;&lt;br /&gt;First I'll give a brief summary of the original problem and solution. Late September 2007 we migrated our production server from JBoss to GlassFish V2, which had just been released. We had been testing on betas and release candidates for months.   Just weeks after the migration, GlassFish started to lock up causing users to get blank white screens.  The browser's spinner would spin forever waiting for a response.  Using our GlassFish support contract, we discovered the problem was Microsoft's JDBC driver that we were using to communicate with a remote SQL Server.  It seemed that when SQL Server was under extreme load the JDBC would get a "TDS prelogin response error" and get stuck. It would block the thread indefinitely.  GlassFish uses its own HTTP server called Grizzly which takes advantage of nio and asynchronous sockets. It needs only 5 threads (default config) for most loads, so once the JDBC driver locked all 5 threads, subsequent HTTP requests would block waiting for one of the threads to become available.  Our solution was to switch to the &lt;a href="http://jtds.sf.net/" target="_new"&gt;open source jTDS JDBC driver&lt;/a&gt;. (Side note: I recently tried the latest version of the Microsoft JDBC driver and the problem still exists.)&lt;br /&gt;&lt;br /&gt;The system ran well for six months, then in December 2008 we had our first Windows crash. The server was not accessible over the network, and the local console had a blank gray screen. We had to cycle the power to reboot Windows.  This happened again, and again, and again until September 2009.  Sometimes it would happen multiple times per day, 3-4 times per week, or every couple of weeks.  There was no pattern.  We did notice that Windows Task Manager's NP Pool column for java.exe would be relatively stable until "something" opened the flood gates causing it to rise rapidly until Windows would crash.   We noticed the exact same thing while diagnosing our original problem with the Microsoft JDBC driver, and think that the problem is somehow related to the remote SQL Server being under extreme load.   Also, we found that java.exe's memory was growing.  It would baloon by hundreds of megabytes sometimes until we got Java Heap Space errors.   That problem turned out to be a bug in an SQL query that tried to load every record in a multi-gigabyte table.&lt;br /&gt;&lt;br /&gt;After fixing the SQL query, we still had hundreds of megabytes of BlobBuffer objects being leaked, which are part of the jTDS driver.  The BlobBuffer objects seemed to be unreferenced, so we figured it was a bug in the jTDS driver.  In September 2009 I read the release notes of the new jTDS v1.2.3 release.  They had fixed a number of nasty bugs that seemed to be directly related to all of our problems:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Corrected bug [1755448], login failure leaves unclosed sockets. &lt;span style="font-weight: bold;"&gt;- (we think this is the source of our NP Pool leak)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Added missing finalizer in connection class to ensure resources are released if an application fails to close a connection.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Corrected bug [2796385], running out of UDP sockets.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Resolved problem [1957748], Java VM is leaking memory in File.deleteOnExit() &lt;span style="font-weight: bold;"&gt;- (we think this is the source of our BlobBuffer leak)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Corrected bug [1869156] memory leak of WeakReferences&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Corrected bug [1793584], Login timeout canceled too early.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Corrected bug [1843801] infinite loop if DB connection dies during a batch.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Corrected bug [1883905] unintentional infinite wait.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;I upgraded the driver on our production server and we've now been running problem free for a month! After two years, it looks like our GlassFish lockups and Windows crashes are finally behind us!&lt;br /&gt;&lt;br /&gt;I suspect that I upgraded the JDBC driver in December 2008 during an application upgrade.  After our first Windows crash I rolled back the application upgrade but forgot about the JDBC driver upgrade.   The bugs were probably introduced after June 2008, and before December 2008.  That would explain why we ran problem free for almost six months.&lt;br /&gt;&lt;br /&gt;jTDS v1.2.3 now implements JDBC4 APIs so that it can be compiled on Java 6.  They didn't actually implement a JDBC4 driver, they just got it to compile.  When I installed it on GlassFish in our test environment I had to use GlassFish's proprietary "JDBC30DataSource=true" JDBC property to make the driver work.  When I installed it on our production server, I did not have to add this property!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-5807625965368172258?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/5807625965368172258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2009/10/glassfish-lockups-and-windows-crashes.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/5807625965368172258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/5807625965368172258'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2009/10/glassfish-lockups-and-windows-crashes.html' title='GlassFish lockups and Windows crashes - solved after 2 years!'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-2188070866851407840</id><published>2009-09-14T23:41:00.006-04:00</published><updated>2009-10-12T15:35:29.584-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='netbeans'/><title type='text'>Speeding up NetBeans IDE on Windows</title><content type='html'>I've been using NetBeans in Linux and Solaris a lot over the last year and a half. On many occasions I find myself noticing how much progress has been made in the performance department since I started using it in 2007 (version 5.5 beta). Well, at least until I return to my Windows laptop and restore focus to a running instance of NetBeans that I minimized a few hours earlier.  Then it's time to go get a drink or use the bathroom while waiting for it to draw itself or become responsive, which often takes minutes.   Even when it finishes doing whatever it's doing I find myself being hostile towards NetBeans and the computer when using it on Windows.&lt;br /&gt;&lt;br /&gt;Today I remembered a tip from the NetBeans users mailing list about configuring my antivirus program to skip the .netbeans directory in your home directory (C:\Users\Your Name\ in Vista, or C:\Documents and Settings\Your Name\ on XP).  I did that at the end of the day then minimized NetBeans.  Before bed I came back to the computer (no I don't live at the office, I work from home :) and brought NetBeans back into focus to see if there is much of a difference.  Wow, this time it didn't take much time at all to swap back into memory and become usable again.  I'm even able to move around between files and tabs without things getting sluggish.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-2188070866851407840?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/2188070866851407840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2009/09/speeding-up-netbeans-ide-on-windows.html#comment-form' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/2188070866851407840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/2188070866851407840'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2009/09/speeding-up-netbeans-ide-on-windows.html' title='Speeding up NetBeans IDE on Windows'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-1554847065590544624</id><published>2009-08-10T23:03:00.007-04:00</published><updated>2010-01-26T04:19:27.517-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='jpa'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='glassfish'/><title type='text'>How to use GlassFish managed JPA EntityManagers in Spring</title><content type='html'>When you deploy your application into a Java EE 5 application server it detects the persistence.xml, creates an EntityManager for each persistence unit, and exposes them in JNDI.  You can get Spring to load the EntityManagers of all your persistence units from JNDI.  First you need to tell web.xml that you want to load the persistence unit references from JNDI. The JNDI name always starts with "persistence/" and ends with the persistence unit name.  For example:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt; &amp;lt;persistence-unit-ref&amp;gt; &lt;br /&gt;&amp;lt;persistence-unit-ref-name&amp;gt;persistence/MyPU1&amp;lt;/persistence-unit-ref-name&amp;gt; &lt;br /&gt;&amp;lt;persistence-unit-name&amp;gt;MyPU1&amp;lt;/persistence-unit-name&amp;gt; &lt;br /&gt;&amp;lt;/persistence-unit-ref&amp;gt; &lt;br /&gt;&lt;br /&gt;&amp;lt;persistence-unit-ref&amp;gt; &lt;br /&gt;&amp;lt;persistence-unit-ref-name&amp;gt;persistence/MyPU2&amp;lt;/persistence-unit-ref-name&amp;gt; &lt;br /&gt;&amp;lt;persistence-unit-name&amp;gt;MyPU2&amp;lt;/persistence-unit-name&amp;gt; &lt;br /&gt;&amp;lt;/persistence-unit-ref&amp;gt; &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Next, add the following configuration to your Spring XML config file:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt; &amp;lt;bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" &amp;gt; &lt;br /&gt;&amp;lt;property name="persistenceUnits"&amp;gt; &lt;br /&gt;&amp;lt;map&amp;gt; &lt;br /&gt;&amp;lt;entry key="MyPU1" value="persistence/MyPU1"/&amp;gt; &lt;br /&gt;&amp;lt;entry key="MyPU2" value="persistence/MyPU2"/&amp;gt; &lt;br /&gt;&amp;lt;/map&amp;gt; &lt;br /&gt;&amp;lt;/property&amp;gt; &lt;br /&gt;&amp;lt;/bean&amp;gt; &lt;br /&gt;&lt;br /&gt;&amp;lt;tx:jta-transaction-manager/&amp;gt; &lt;br /&gt;&amp;lt;tx:annotation-driven/&amp;gt; &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Spring is now configured to use the JPA EntityManagers and JTA transactions from GlassFish. Use persistence.xml, @PersistenceUnit, and @PersistenceContext like normal. Use Spring's proprietary @Transactional annotation for transaction demarcation.  If you need to query both persistence units within the same transaction then you need to use XA data sources, or mark code that uses the second persistence unit with @Transactional(propagation=Propagation.REQUIRES_NEW).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-1554847065590544624?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/1554847065590544624/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2009/08/how-to-use-glassfish-managed-jpa.html#comment-form' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/1554847065590544624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/1554847065590544624'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2009/08/how-to-use-glassfish-managed-jpa.html' title='How to use GlassFish managed JPA EntityManagers in Spring'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-5605313435646264975</id><published>2009-03-07T11:33:00.004-05:00</published><updated>2009-10-12T15:45:06.270-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='jax-rpc'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><title type='text'>JAX-RPC client with Maven2</title><content type='html'>Recently I needed to make my Maven2 web project communicate with an old style RPC encoded web service. We run on GlassFish which comes with JAX-RPC RI built-in, so I was hoping to find a way to use it without having to bundle another runtime such as Axis into the project. Specifically I was looking for a way to make my build-script generate client stubs from a WSDL file in the project tree. I want the client stubs to use standardized JAX-RPC APIs which are serviced by the implementation provided by GlassFish.&lt;br /&gt;&lt;br /&gt;I found that the &lt;i&gt;JAX-WS&lt;/i&gt; RI has a &lt;a href="https://jax-ws-commons.dev.java.net/jaxws-maven-plugin/" target="_new"&gt;Maven2 plugin&lt;/a&gt; but not the JAX-RPC RI.  I did a lot of googling, and posted messages in a few mailing lists. Surprisingly there is almost nobody using JAX-RPC on Maven2 projects because there are barely any examples online and nobody could answer my question. I'm surprised because there are a lot of legacy systems out there that developers need to integrate with, so I can't be the only one still needing JAX-RPC support. Some people suggested that I update the web service to modern RPC literal to make client-side development easier with JAX-WS, but that is not an option.  Others suggested that I use Maven's antrun plugin to call out to an ant build script that does JAX-RPC work. Finally I found an all Maven solution that works for me:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt; &amp;lt;dependency&amp;gt; &lt;br /&gt;  &amp;lt;groupId&amp;gt;org.apache.axis&amp;lt;/groupId&amp;gt; &lt;br /&gt;  &amp;lt;artifactId&amp;gt;axis&amp;lt;/artifactId&amp;gt; &lt;br /&gt;  &amp;lt;version&amp;gt;1.4&amp;lt;/version&amp;gt; &lt;br /&gt;  &amp;lt;scope&amp;gt;compile&amp;lt;/scope&amp;gt; &lt;br /&gt;&amp;lt;/dependency&amp;gt; &lt;br /&gt;&amp;lt;dependency&amp;gt; &lt;br /&gt;  &amp;lt;groupId&amp;gt;org.apache.axis&amp;lt;/groupId&amp;gt; &lt;br /&gt;  &amp;lt;artifactId&amp;gt;axis-jaxrpc&amp;lt;/artifactId&amp;gt; &lt;br /&gt;  &amp;lt;version&amp;gt;1.4&amp;lt;/version&amp;gt; &lt;br /&gt;  &amp;lt;scope&amp;gt;compile&amp;lt;/scope&amp;gt; &lt;br /&gt;&amp;lt;/dependency&amp;gt; &lt;br /&gt;&amp;lt;dependency&amp;gt; &lt;br /&gt;  &amp;lt;groupId&amp;gt;commons-discovery&amp;lt;/groupId&amp;gt; &lt;br /&gt;  &amp;lt;artifactId&amp;gt;commons-discovery&amp;lt;/artifactId&amp;gt; &lt;br /&gt;  &amp;lt;version&amp;gt;0.4&amp;lt;/version&amp;gt; &lt;br /&gt;  &amp;lt;scope&amp;gt;compile&amp;lt;/scope&amp;gt; &lt;br /&gt;&amp;lt;/dependency&amp;gt; &lt;br /&gt;&amp;lt;dependency&amp;gt; &lt;br /&gt;  &amp;lt;groupId&amp;gt;wsdl4j&amp;lt;/groupId&amp;gt; &lt;br /&gt;  &amp;lt;artifactId&amp;gt;wsdl4j&amp;lt;/artifactId&amp;gt; &lt;br /&gt;  &amp;lt;version&amp;gt;1.6.2&amp;lt;/version&amp;gt; &lt;br /&gt;  &amp;lt;scope&amp;gt;compile&amp;lt;/scope&amp;gt; &lt;br /&gt;&amp;lt;/dependency&amp;gt; &lt;br /&gt; &lt;br /&gt;&amp;lt;plugin&amp;gt; &lt;br /&gt;  &amp;lt;groupId&amp;gt;org.codehaus.mojo&amp;lt;/groupId&amp;gt; &lt;br /&gt;  &amp;lt;artifactId&amp;gt;axistools-maven-plugin&amp;lt;/artifactId&amp;gt; &lt;br /&gt;  &amp;lt;version&amp;gt;1.3&amp;lt;/version&amp;gt; &lt;br /&gt;  &amp;lt;executions&amp;gt; &lt;br /&gt;    &amp;lt;execution&amp;gt; &lt;br /&gt;      &amp;lt;goals&amp;gt; &lt;br /&gt;        &amp;lt;goal&amp;gt;wsdl2java&amp;lt;/goal&amp;gt; &lt;br /&gt;      &amp;lt;/goals&amp;gt; &lt;br /&gt;    &amp;lt;/execution&amp;gt; &lt;br /&gt;  &amp;lt;/executions&amp;gt; &lt;br /&gt;  &amp;lt;configuration&amp;gt; &lt;br /&gt;    &amp;lt;packageSpace&amp;gt;com.mycompany.service.client&amp;lt;/packageSpace&amp;gt; &lt;br /&gt;    &amp;lt;sourceDirectory&amp;gt;src/main/resources/META-INF/wsdl&amp;lt;/sourceDirectory&amp;gt; &lt;br /&gt;    &amp;lt;outputDirectory&amp;gt;target/generated-sources/wsdl2java&amp;lt;/outputDirectory&amp;gt; &lt;br /&gt;  &amp;lt;/configuration&amp;gt; &lt;br /&gt;&amp;lt;/plugin&amp;gt; &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt; private MyServiceSEI getMyServicePort() throws ServiceException { &lt;br /&gt;  MyServiceLocator locator = new MyServiceLocator(); &lt;br /&gt;  MyServiceSEI port; &lt;br /&gt;  Stub stub; &lt;br /&gt; &lt;br /&gt;  port = locator.getMyServiceSEIPort(); &lt;br /&gt; &lt;br /&gt;  // OPTIONALLY configure URL and HTTP BASIC authentication &lt;br /&gt;  stub = (Stub) port; &lt;br /&gt;  stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://hostname/ContextRoot/ServicePort"); &lt;br /&gt;  stub._setProperty(Stub.USERNAME_PROPERTY, "user"); &lt;br /&gt;  stub._setProperty(Stub.PASSWORD_PROPERTY, "secret"); &lt;br /&gt; &lt;br /&gt;  return port; &lt;br /&gt;} &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;It works, but I think the client stubs are dependent on the Axis 1 runtime instead of using the GlassFish provided JAX-RPC runtime through the standardized JAX-RPC APIs. I've wasted enough time on this so I moved on. If you know a better way to do this, please let me know.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-5605313435646264975?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/5605313435646264975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2009/03/jax-rpc-client-with-maven2.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/5605313435646264975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/5605313435646264975'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2009/03/jax-rpc-client-with-maven2.html' title='JAX-RPC client with Maven2'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-1493579855930643103</id><published>2008-10-18T12:21:00.000-04:00</published><updated>2009-08-07T18:53:04.254-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='jsf'/><title type='text'>Suggested enhancement to JSF's h:selectOneRadio component</title><content type='html'>&lt;i&gt;This is an email I sent to the JSF 2.0 expert group. Since the final draft is scheduled for December 12 2008 I recommend JSF users contact the expert group NOW if you agree with my suggestions below, and if you have other gripes with JSF. jsr-314-comments-AT-jcp-DOT-org&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;The h:selectOneRadio renders an HTML table containing each radio button listed in f:selectItems or f:selectItem facets using most of the attributes in the h:selectOneRadio tag.&lt;br /&gt;&lt;br /&gt;There are situations where the table layout is not desirable, such as in a table row where only one row among several may be selected. To do this with h:selectOneRadio I can place the following in each table row:&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;h:selectOneRadio id="subscriptions"   &lt;br /&gt;                   value="#{subscriberBean.selectedSubscription}"&amp;gt;  &lt;br /&gt;   &amp;lt;f:selectItem id="#{subscription.id}"   &lt;br /&gt;                 itemLabel="#{subscription.name}"   &lt;br /&gt;                 itemValue="#{subscription.id}" /&amp;gt;  &lt;br /&gt; &amp;lt;/h:selectOneRadio&amp;gt;   &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;There are two issues with this:&lt;br /&gt;&lt;br /&gt;1) The output of each one looks like this:&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;table id="subscriptions"&amp;gt;   &lt;br /&gt;   &amp;lt;tbody&amp;gt;  &lt;br /&gt;     &amp;lt;tr&amp;gt;  &lt;br /&gt;       &amp;lt;td&amp;gt;  &lt;br /&gt;         &amp;lt;input name="subscriptions" id="subscriptions:0" value="2" type="radio"&amp;gt;&amp;lt;label for="subscriptions:0"&amp;gt; Sports&amp;lt;/label&amp;gt;  &lt;br /&gt;       &amp;lt;/td&amp;gt;  &lt;br /&gt;     &amp;lt;/tr&amp;gt;  &lt;br /&gt;   &amp;lt;/tbody&amp;gt;  &lt;br /&gt; &amp;lt;/table&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;when all I really want is this:&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;input name="subscriptions" id="subscriptions:0" value="2" type="radio"&amp;gt;&amp;lt;label for="subscriptions:0"&amp;gt; Sports&amp;lt;/label&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Also there are many tables in my HTML output that have id="subscriptions" now which is illegal. If the h:selectOneRadio tag's existing layout attribute had a new "none" constant that rendered only the input component, then this issue would be resolved.&lt;br /&gt;&lt;br /&gt;2) I must use a f:selectItem facet which seems unnecessary when wanting to output a single UI component, and it also makes it difficult or impossible to use in facelets templates. I've tried to think of ways h:selectOneRadio could be changed to render a radio button when no h:selectItem(s) are present (like h:selectBooleanCheckbox), and using a new name/groupName attribute. I don't think that will work because h:selectOneRadio's id attribute is used as both table id and for the name attribute in each rendered input component. The value attribute would probably clash too.&lt;br /&gt;&lt;br /&gt;What JSF really needs is an equivalent of h:selectBooleanCheckbox that renders only one input component (no table), lets me specify the name/groupName, and works with facelets. I've suggested a new component in the past and the expert group decided not to do it in JSF 2.0 because the focus should be on extensibility etc. instead of new input components. If you search on Google for jsf radio button you'll be flooded with tons and tons of people coming up with hacks for using radio buttons in JSF. Every component library also has their version of radio button that makes it usable. If I want a usable radio button I currently need to add a component suite and all of it's bloated dependencies to my pages.&lt;br /&gt;&lt;br /&gt;I still think adding a usable radio button component should be done in JSF 2.0, but if it can't be done then my first suggestion would be a good compromise for now.&lt;br /&gt;&lt;br /&gt;I am really interested in hearing the expert group's thoughts on this. Do you guys use JSF in production systems, and haven't you found h:selectOneRadio to be too inflexible to be useful beyond the most basic of UIs?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-1493579855930643103?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/1493579855930643103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2008/10/suggested-enhancement-to-jsfs.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/1493579855930643103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/1493579855930643103'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2008/10/suggested-enhancement-to-jsfs.html' title='Suggested enhancement to JSF&apos;s h:selectOneRadio component'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-4137206938567887939</id><published>2008-08-30T14:35:00.000-04:00</published><updated>2009-08-07T16:58:48.398-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sailing'/><title type='text'>Skipper Ryan</title><content type='html'>Sunday I passed my CYA Basic Cruising Skills paper test and the Pleasure Craft Operators Certificate (PCOC) test.  Tuesday I passed my on-water test so I can now rent sailboats and join the yacht club!  My instructor said that I have potential to be a good sailor given enough experience and she wanted to see me on the boat one more time this week.  I went with her, her boyfriend, and a few of her friends the other night.  We took the biggest boat at the club and went out past Toronto Island.  We literally sailed off into the sunset (technically away from).  Views of the city skyline from the water at night are absolutely breathtaking and I now know that sailing is something I will enjoy.  The club I went to for my classes is just a 10 minute walk from my condo.  It is primarily a training club, and nobody owns the boats there.  You either rent the boats or get unlimited usage as a member.  Membership for my level will cost around $1300 - $1500/year.  I'll probably just rent the boat until the end of this season (one more month) then wait to buy the membership in May. Once a member I'll probably go sailing every Tuesday and Friday evenings.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-4137206938567887939?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/4137206938567887939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2008/08/skipper-ryan.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/4137206938567887939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/4137206938567887939'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2008/08/skipper-ryan.html' title='Skipper Ryan'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-4051775211705936013</id><published>2008-07-02T21:39:00.002-04:00</published><updated>2009-08-07T18:07:33.633-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='glassfish'/><title type='text'>GlassFish lockups were Microsoft's fault</title><content type='html'>Just days after the official release of GlassFish V2 in September 2007, we migrated one of our production applications from JBoss 4 to GlassFish V2. I had been playing with GlassFish V1 and later V2 for many months and -really- liked the command line and web based admin console.  Earlier I had been given the opportunity to make major changes to our application to port it over to Java EE 5 using features such as JSF, JPA, JAX-WS and EJB 3.  I had also converted our proprietary JBoss JMX MBean service to a standard JCA resource adapter.  The rollout of GlassFish V2 and the new version of our application went smoothly, and we lived happily ever after.  Well, not quite.  A few weeks later we experienced our first lockup.&lt;br /&gt;&lt;br /&gt;Users accessing our web application were presented with a blank white screen, and the browser busy indicator spun forever.  java.exe wasn't using much CPU, there was no disk activity, and the web admin console worked fine.  Restarting GlassFish solved the problem and we forgot about it until it locked up again a few weeks later.  This time users were presented with an error that said: "Maximum Connections Reached: 4096".  Earlier we had purchased a GlassFish support contract for assurance, so I promptly opened a case with Sun.  The support engineers thought that we were under heavy load and reached the maximum number of connections, and told me how to increase the default setting.  I knew our application had nowhere near 4096 simultaneous users, but gave it a try anyway.  It didn't help.&lt;br /&gt;&lt;br /&gt;We kept experiencing lockups every couple of weeks, would report to Sun and restart GlassFish.  One day we found that restarting GlassFish did not solve the problem.  Even Postgres seemed to be dead, and restarting it didn't help either.  After a bit of panic we found that simply rebooting Windows 2003 Server brought everything back to life.  Sun said that I'm one of only a small handful of people in the world experiencing something called Non-Paged Pool leak in Windows 2003 Server TCP/IP stack, and that they have been working with Microsoft for over a year to diagnose it.  Sun is absolutely 100% positive it is not caused by the JVM and therefore GlassFish, and told me that to fix our bi-weekly lockups we will need a Microsoft patch.  We waited months for this patch (hotfix) which was never publicly released.  By that time we were experiencing lockups once per week, sometimes two or three times per week.  What was different? Increased user activity.  We were restarting GlassFish every Friday to try and prevent the lockups from happening.  After installing the Microsoft hotfix I swear the problem got worse.  We resorted to restarting GlassFish every Monday, Wednesday and Friday.  It seemed that restarting GlassFish didn't make any difference.  Sometimes it would lock up 20 minutes after restarting. An interesting note: we noticed that the NP Pool column in Windows Task Manager for java.exe would stay pretty steady until a lockup.  Once locked up it would increase by 1K every 15-20 seconds.&lt;br /&gt;&lt;br /&gt;Around that time we decided to evaluate our other options.  Sun was telling us that we would not suffer from the effects of the NP Pool leak if we switched to another operating system such as Windows 2000, XP, Vista, Solaris or Linux. The NP Pool leak is unique to Windows 2003 Server. We were also considering going back to JBoss since our application had been running on JBoss on the same computer (but with older JDBC driver version) for over a year without lockups.  Then the bombshell.  Someone reported the same lockup symptoms on Linux. Then another, then another. A bunch of people on the GlassFish users mailing list got involved in heated discussions about their daily lockups and how their apps worked fine on Tomcat.&lt;br /&gt;&lt;br /&gt;Sun explained what they thought was happening, but no-one was buying it.  I'll try to explain in my own words how GlassFish and Tomcat are different.  Tomcat has a socket sever called Coyote that uses blocking IO. Since it uses blocking IO, it loads a new thread for each request. If there are 30 simultanious HTTP requests, there will be 30 threads.  There is a default maximum of 100 threads.  If all 100 threads are servicing requests, the 101st user will immediately get an HTTP 500 error.  Years ago Jeanfrancois Arcand of Sun suggested to the Tomcat community that they use non-blocking IO and a small pool of threads to service requests.  The Tomcat community rejected this idea, so he created a project called Grizzly.  Grizzly is the default socket server in GlassFish. It uses nonblocking IO and has a default of 5 threads to service ALL web requests. If all threads are being used, new web requests will be queued until a thread is available. The number of Grizzly threads is configurable, and Sun has done extensive scalability testing.  You can tell GlassFish to use Coyote instead of Grizzly by adding the following JVM option to domain.xml:&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; -Dcom.sun.enterprise.web.connector.useCoyoteConnector=true  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;If you do that, GlassFish will lock up after 100 threads are locked instead of 5.  It seems to fix the problem, but only for a while longer.  To some people, this was evidence that the problem is Grizzly and therefore they should abandon GlassFish. I don't understand that logic. I wanted to solve the problem so kept working with Sun.  Jeanfrancois suggested that something in my application was blocking for a long time so the Grizzly thread servicing the request was not going back into the pool to be re-used.  Four more web requests would follow, and they would also get into this blocked state. Now there are no threads to service requests. All new web requests would be queued, which explains why web users see a white screen and the browser's busy animation spun forever.&lt;br /&gt;&lt;br /&gt;To prove it, Sun asked for me to provide a thread dump of GlassFish while it was in a locked up state.  To do this I ran the following command from the command prompt:&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; asadmin generate-jvm-report --type=thread &amp;gt; thread_dump.txt  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;It didn't take long for them to point out that all five Grizzly threads were waiting on ResourceManager, which is responsible for JCA connection pools of things such as database connections.  The ResourceManager had no usable database connections and was trying to create a new one.  It was waiting on the Microsoft SQL Server 2005 JDBC driver.  The JDBC driver was stuck in some prelogin() method.  Turning on fine logging only revealed that the JDBC driver received some "TDS prelogin response error".  Sun suggested that we use the JDBC driver's loginTimeout property to override the default value of 0 (wait forever).  We tried this with no success.  Next we tried the open source jTDS driver which is for MS SQL Server.  Bingo!!!!!!! We've been running for over a month without experiencing lockups and are very happy that the problem was not GlassFish's fault.&lt;br /&gt;&lt;br /&gt;Still there is some skepticism on the GlassFish users mailing list.  My problem was because of JDBC, but some of the other people aren't using databases.  One guy who is using a database says that the exact same .war file and MySQL JDBC driver never locks up on Tomcat, but locks up several times daily on GlassFish.  All I can say is that Jeanfrancois's explanation of Grizzly's thread pool and queue make perfect sense, and obviously something is blocking those threads. Maybe you don't notice lockups on Tomcat because not all of the 100 threads lock up, and whatever is causing the lockups eventually times out and releases the threads before it has a chance to lock up all 100 threads??  Generate a thread dump and get Sun to work with you to figure it out.  Unfortunately Sun hasn't been able to help everyone who provides a thread dump on the mailing list, and suggested that these users purchase a support contract.  That doesn't bode well for people evaluating GlassFish.  This blog entry is to give those people a better understanding of the problem, and hope that it can be resolved.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-4051775211705936013?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/4051775211705936013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2008/07/glassfish-lockups-were-microsofts-fault.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/4051775211705936013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/4051775211705936013'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2008/07/glassfish-lockups-were-microsofts-fault.html' title='GlassFish lockups were Microsoft&apos;s fault'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-984818615690082999</id><published>2008-03-29T10:32:00.001-04:00</published><updated>2009-08-07T17:25:52.000-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='agile'/><category scheme='http://www.blogger.com/atom/ns#' term='scrum'/><title type='text'>I'm now a Certified Scrum Master</title><content type='html'>Last night I returned from a three day Scrum Master training course led by &lt;a href="http://www.scrumalliance.org/profiles/47-mishkin-g-berteig" target="_new"&gt;Mishkin Berteig&lt;/a&gt;, one of only two certified trainers in Canada.  I found it interesting that my employer's existing non-formal development processes will make it MUCH easier to implement Scrum than everyone else who attended the course.  Much of what we do already can be refined and made consistent to become Agile and the Scrum way.  For example, releasing changes to customers every few weeks. The companies my colleagues work for have hierarchies of sign-offs, waterfall like processes, and way more paperwork than I ever thought possible.&lt;br /&gt;&lt;br /&gt;I also found it interesting to contrast the kinds of questions I asked (from a developer's point of view) with the questions asked by the project managers.  My questions were more about how to make Scrum work with our tools such as JIRA (with &lt;a href="http://www.greenpeppersoftware.com/en/products/GreenHopper/" target="_new"&gt;Green Hopper plugin&lt;/a&gt;) and Confluence, and how to build a truly cross-functional team that has all the skills necessary to implement any product backlog item from start to finish.  I was really surprised to find out that many of the companies my colleagues work for do not use issue tracking systems, or know what Subversion does!&lt;br /&gt;&lt;br /&gt;My next plan is to create wiki pages that talk about how to implement Scrum in our company using as few words possible. I think it's important to make it short and readable. I've written several process documents for our company before, usually over 50 pages, and I find that people don't read the whole thing or remember what they read.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-984818615690082999?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/984818615690082999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2008/03/im-now-certified-scrum-master.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/984818615690082999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/984818615690082999'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2008/03/im-now-certified-scrum-master.html' title='I&apos;m now a Certified Scrum Master'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-464822604175778589</id><published>2007-10-21T14:20:00.001-04:00</published><updated>2009-08-07T17:26:36.871-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Who says Java isn't good for 3D games?</title><content type='html'>A few months ago I was talking with some developers at work about how Java can be used for any kind of application you can think of, even 3D games.  Some of them didn't believe that Java could do 3D games because they thought it was too slow.  I showed them &lt;a href="http://www.jmonkeyengine.com/index.php?option=com_content&amp;task=view&amp;id=68&amp;Itemid=84"&gt;jMonkeyEngine screenshots&lt;/a&gt; and they were very surprised.  These are professional quality games that look like any other game you'd buy in a store.  And to show it can perform, here  is a demo reel:&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;object width="425" height="366"&gt;&lt;param name="movie" value="http://www.youtube.com/v/ho_b18HRmGA&amp;rel=1&amp;border=0"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/ho_b18HRmGA&amp;rel=1&amp;border=0" type="application/x-shockwave-flash" wmode="transparent" width="425" height="366"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/center&gt;&lt;br /&gt;After 4 years of development, this 3D engine &lt;a href="http://www.jmonkeyengine.com/index.php?option=com_content&amp;task=view&amp;id=100&amp;Itemid=1"&gt;reached v1.0 on October 19 2007&lt;/a&gt;. I wish I knew game theory :/ Even if I could make a game I probably wouldn't have time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-464822604175778589?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/464822604175778589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2007/10/who-says-java-isnt-good-for-3d-games.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/464822604175778589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/464822604175778589'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2007/10/who-says-java-isnt-good-for-3d-games.html' title='Who says Java isn&apos;t good for 3D games?'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-3832121922684612517</id><published>2007-10-20T11:35:00.003-04:00</published><updated>2010-10-28T17:02:39.471-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='glassfish'/><category scheme='http://www.blogger.com/atom/ns#' term='windows service'/><title type='text'>Creating a Windows service for Glassfish V2</title><content type='html'>In the past I have chosen to use the commercial version of Glassfish (Sun Java Application Server 9.0), because it comes with a graphical installer and our customers have the option to buy support for it.  Other than those two differences, they are exactly the same product.  When used on Windows, the SJAS graphical installer has a checkbox on one of the screens to create a Windows service.  Glassfish does not come with a graphical installer, and requires a full JDK for installation.  It is still simple to install, but lacks an easy way to create a Windows service. &lt;br /&gt;&lt;br /&gt;The &lt;a href="http://wiki.glassfish.java.net/Wiki.jsp?page=Milestones"&gt;final release date&lt;/a&gt; for Glassfish V2 (and also Sun Java Application Server 9.1) is September 17 2007.  I've been using Glassfish V2 lately because of the features, performance, and I wanted to make sure that my apps run on it.  The instructions to create a Windows service look like this:&lt;br /&gt;&lt;pre style="background: url(&amp;quot;http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif&amp;quot;) repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; C:\windows\system32\sc.exe create domain1 binPath=   &lt;br /&gt;"C:\Sun\AppServer\lib\appservService.exe \"C:\Sun\AppServer\bin\asadmin.bat   &lt;br /&gt;start-domain --user admin --passwordfile C:\Sun\AppServer\password.txt domain1\"   &lt;br /&gt;\"C:\Sun\AppServer\bin\asadmin.bat stop-domain domain1\"" start= auto   &lt;br /&gt;DisplayName= "SunJavaSystemAppServer DOMAIN1"  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;It may be simple enough to change the paths to match your own to get this to work, unless there are  spaces such as C:\Program Files\Sun\GlassfishV2\.  Try figuring out the correct sequences of escaping the escape characters etc. After over an hour I had it almost working, but still failed.  When I asked Sun for help they provided me with the few lines of source code from the Sun Java Application Platform SDK graphical installer that builds the properly escaped command line.  I turned this into a command line utility that is very simple to use.&lt;br /&gt;&lt;br /&gt;The simplest way to use the utility is to copy GlassfishSvc.jar to your Glassfish installation path (such as C:\Program Files\Sun\GlassfishV2\), then run the following command from the command line:&lt;br /&gt;&lt;pre style="background: url(&amp;quot;http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif&amp;quot;) repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; C:\Program Files\Sun\GlassfishV2&amp;gt;java -jar GlassfishSvc.jar -i  &lt;br /&gt;&lt;br /&gt;glassfishsvc v1.0 (Aug 19 2007)  &lt;br /&gt;&lt;br /&gt;Service name        : GlassfishAppServer  &lt;br /&gt;Glassfish installation path : C:\Program Files\Sun\GlassfishV2RC1  &lt;br /&gt;Glassfish domain      : domain1  &lt;br /&gt;Glassfish admin username  : admin  &lt;br /&gt;&lt;br /&gt;Installing service...  &lt;br /&gt;Done.  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The -i argument will install the service with default options.  A complete listing of the command line arguments follows:&lt;br /&gt;&lt;pre style="background: url(&amp;quot;http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif&amp;quot;) repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; glassfishsvc v1.0 (Aug 19 2007)  &lt;br /&gt;&lt;br /&gt;DESCRIPTION:  &lt;br /&gt;Installs and uninstalls a Windows service for Glassfish  &lt;br /&gt;&lt;br /&gt;USAGE:  &lt;br /&gt;java -jar glassfishsvc.jar [-i | -u] [OPTIONS]  &lt;br /&gt;&lt;br /&gt;-i    Installs a Windows service for Glassfish.  &lt;br /&gt;-u    Uninstalls a Windows service for Glassfish.  &lt;br /&gt;-n name  Name for the Windows service. Use double quotes around names  &lt;br /&gt;that contain spaces. Defaults to GlassfishAppServer.  &lt;br /&gt;-d path  Directory where Glassfish is installed. Use double  &lt;br /&gt;quotes around paths with spaces, and escape back slashes.  &lt;br /&gt;Defaults to current directory.  &lt;br /&gt;-m domain Name of the Glassfish domain to start and stop. Defaults to  &lt;br /&gt;domain1.  &lt;br /&gt;-a user  Glassfish admin user name. Defaults to admin.  &lt;br /&gt;-p pwd  Glassfish admin password. A password.txt file will be created  &lt;br /&gt;in the Glassfish install directory containing the password in  &lt;br /&gt;plain text, and the Windows service will be configured to read  &lt;br /&gt;from it. This is usually not necessary. If no password is passed  &lt;br /&gt;in, the password.txt file will not be created.  &lt;br /&gt;&lt;br /&gt;EXAMPLES:  &lt;br /&gt;java -jar glassfishsvc.jar -i  &lt;br /&gt;java -jar glassfishsvc.jar -i -p adminadmin  &lt;br /&gt;java -jar glassfishsvc.jar -i -n MyServiceName -d "C:\\Program Files\\Sun\\Glassfish" -m myDomain -a admin5 -p secretpwd  &lt;br /&gt;java -jar glassfishsvc.jar -u  &lt;br /&gt;java -jar glassfishsvc.jar -u -n MyServiceName  &lt;br /&gt;&lt;br /&gt;AUTHOR:  &lt;br /&gt;Ryan de Laplante &amp;lt;ryan at gmail dot com&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Download links:  &lt;a href="http://wiki.glassfish.java.net/attach/FaqRunAsWindowsService/GlassfishSvc.jar"&gt;GlassfishSvc.jar&lt;/a&gt;, &lt;a href="http://wiki.glassfish.java.net/attach/FaqRunAsWindowsService/GlassfishSvc.java"&gt;GlassfishSvc.java&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I hope that there are Glassfish users who find this utility helpful, and that the Glassfish project either links to this utility from their installation manual or adopts it as part of the project.  There is no license, do what you want with it.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Sep 6 2007 UPDATE:&lt;/b&gt; I have since learned about a couple of important issues related to running Glassfish as a Windows service.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;1) &lt;a href="https://glassfish.dev.java.net/issues/show_bug.cgi?id=3584"&gt;After you log out of Windows the java.exe process will terminate&lt;/a&gt;.  Meanwhile, the appservService.exe Windows service wrapper that comes with Glassfish will continue to run, and Windows will think that the service is still running.  The JVM has a built in feature that shuts itself down when it receives an event from Windows indicating that a user is logging out.  You can disable this "feature" by adding the -Xrs JVM option to Glassfish's domain.xml.  In Glassfish's domains\domain1\config\ folder you will find domain.xml.  Open the file and search for jvm-options.  You'll see that each JVM option is on it's own line inside of an XML element.  Add a new line using the same syntax, but with the -Xrs option. Save then restart the Glassfish Windows service for the change to take effect.&lt;/li&gt;&lt;li&gt;2) If you are running the cluster profile, &lt;a href="http://weblogs.java.net/blog/km/archive/2007/08/glassfish_passw.html"&gt;Glassfish will ask for the admin password every time the service starts&lt;/a&gt;.  This was a bit confusing to me because it only asked for a password on some computers and not others.  Later, it asked for a password on all computers.  You need to create a password file in a specific format and tell the Windows service to use it.  Luckily the GlassfishSvc.jar tool that I wrote has a -p option to do exactly that.  The -p option creates a file called password.txt in Glassfish's root directory.  You should use NTFS security options to ensure that only the "Local system account" (the service) can read/write this file.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-3832121922684612517?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/3832121922684612517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2009/08/in-past-i-have-chosen-to-use-commercial.html#comment-form' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/3832121922684612517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/3832121922684612517'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2009/08/in-past-i-have-chosen-to-use-commercial.html' title='Creating a Windows service for Glassfish V2'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-7450639003454798293</id><published>2007-06-17T19:25:00.019-04:00</published><updated>2009-08-07T18:04:49.402-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='jax-ws'/><category scheme='http://www.blogger.com/atom/ns#' term='java ee'/><category scheme='http://www.blogger.com/atom/ns#' term='j2ee'/><category scheme='http://www.blogger.com/atom/ns#' term='glassfish'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>SSL and HTTP BASIC authentication with Glassfish and JAX-WS</title><content type='html'>One of my more recent challenges at work has been to secure the web service communication between two servers that live behind a firewall.  I wanted the communication to be encrypted, and to require some form of authentication.  I also needed to provide access to a specific method from one of the web services to several third parties who's servers are also behind the firewall.  These third parties were using Java 1.4 on a BEA WebLogic server, and Apache/PHP on the other.  In this entry I will discuss the solution to the problem with exact command line and source code examples.&lt;br /&gt;&lt;br /&gt;Web service security was new to me and I explored many avenues before arriving at transport layer SSL and HTTP BASIC authentication.  Initially I was looking at using Sun Access Manager to do message level end-to-end security. Later I looked at using the new WSIT (Web Service Interoperability Technology) and it's corresponding NetBeans plugin.  These are both very impressive and powerful technologies that are useful in situations where you may want to do single sign on, federated identity, LDAP, etc.  I had the opportunity to have a lengthy conversation with three of the WSIT engineers at JavaOne about my scenario. They helped me realize that I don't need this level of sophistication for my simple requirements.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Part 1 – Generating and installing SSL Certificates&lt;/h2&gt;I'll start by explaining how to set up transport layer SSL security between two servers.  What exactly does that mean?  Transport layer security is point to point, meaning that the receiving end will be able to decrypt the entire message.  This is fine for my scenario and is what I will show next.  In other scenarios,  your web service requests might go through multiple points before reaching their destinations (such as a Policy Enforcement Point.) You may not want the middle-man to be able to see the entire message.   Access Manager and WSIT enable you to encrypt specific fields in your SOAP payload, or even the entire payload, while leaving the SOAP header clear-text for the middle-man. This is called end-to-end security, or message level security.&lt;br /&gt;&lt;br /&gt;Lets begin by describing the setup:&lt;br /&gt;&lt;h4&gt;Server A&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Glassfish V2 application server&lt;/li&gt;&lt;li&gt;WAR file containing a web application that acts as the web service client&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Server B&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Glassfish V2 application server&lt;/li&gt;&lt;li&gt;Central reservation data service.  This service is for querying central reservations data. It is an EJB 3.0 service endpoint that lives inside of a JAR.  I will also show how to configure a web.xml deployment descriptor for those who prefer servlet service endpoints.&lt;/li&gt;&lt;/ul&gt;The first step is to generate a new self signed SSL key and certificate for use on Server B.  The application server comes with a default key that you definitely want to replace for production use.  Keys are stored in a Java keystore file and managed by Java's standard keytool command line utility.&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt; cd /opt/SUNWappserver/domains/domain1/config/&lt;br /&gt;cp keystore.jks keystore-backup.jks&lt;br /&gt;keytool -delete -alias s1as -keystore keystore.jks&lt;br /&gt;Enter keystore password: changeit&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;i&gt;Note: the 'changeit' password is the default keystore password.  Type it in exactly as you see. At this time I do not know how to tell Glassfish the new password if I changed it. I believe the process is different between development and production environments.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;The first two commands are used to make a backup of Glassfish's keystore file because we are going to make some changes to it.  Next, we deleted the &lt;b&gt;s1as&lt;/b&gt; alias from the keystore.  An alias is a name for a key that lives inside of a keystore.  Many keys can live inside of a keystore. You use the alias to refer to the key when using keytool, configuring Glassfish, and in other tools such as WSIT and Access Manager.  Glassfish uses the &lt;b&gt;s1as&lt;/b&gt; alias for it's default SSL key. You can't generate a new key on top of an existing alias, so we needed to delete it first.  An other approach would be to create a new alias for the new key, then reconfigure Glassfish to use it.&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt; keytool -genkey -keyalg RSA -keysize 1024 -alias s1as -keystore keystore.jks -validity 365&lt;br /&gt;Enter keystore password: changeit&lt;br /&gt;What is your first and last name?&lt;br /&gt;[Unknown]: serverb.mycompany.com&lt;br /&gt;What is the name of your organizational unit?&lt;br /&gt;[Unknown]: IT&lt;br /&gt;What is the name of your organization?&lt;br /&gt;[Unknown]: My Company&lt;br /&gt;What is the name of your City or Locality?&lt;br /&gt;[Unknown]: Toronto&lt;br /&gt;What is the name of your State or Province?&lt;br /&gt;[Unknown]: ON&lt;br /&gt;What is the two-letter country code for this unit?&lt;br /&gt;[Unknown]: CA&lt;br /&gt;Is CN=serverB.mycompany.com, OU=IT, O=My Company, L=Toronto, ST=ON, C=CA correct?&lt;br /&gt;[no]: yes&lt;br /&gt;&lt;br /&gt;Enter key password for &amp;lt;s1as&amp;gt;&lt;br /&gt;(RETURN if same as keystore password):&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Next we generated a new 1024 bit RSA key that will expire in 365 days, and put it in the s1as alias. It is important that you enter the &lt;u&gt;host name&lt;/u&gt; of the server to be secured with the certificate being created in the “first and last name” field. Even though the question reads "your first and last name," it is necessary to enter the host name of the computer instead. This should be the same host name that will be used in the URLs to access the server.&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt; keytool -export -alias s1as -file serverb-cert.cer -keystore keystore.jks&lt;br /&gt;Enter keystore password: changeit&lt;br /&gt;Certificate stored in file &amp;amp;lt;serverb-cert.cer&amp;amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Next we exported a certificate to serverb-cert.cer so that we can import it into Server A. Restart Server B's Glassfish for the new key to take effect.&lt;br /&gt;&lt;br /&gt;Now we will import the certificate into Server A's trusted keystore.  This is the keystore where certificate authorities usually go.  Since we want our self signed certificate to be trusted, we need to import it into the trusted keystore.  To do this, copy the serverb-cert.cer to AppServer\domains\domain1\config\ on Server A.  Open a console on Server A, cd to the directory you just copied a certificate into, then run the following command:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt; keytool -import -alias serverb.mycompany.com -file serverb-cert.cer -keystore cacerts.jks&lt;br /&gt;Enter keystore password: changeit&lt;br /&gt;Owner: CN=serverB.mycompany.com, OU=IT, O=My Company, L=Toronto, ST=ON, C=CA&lt;br /&gt;Issuer: CN=serverB.mycompany.com, OU=IT, O=My Company, L=Toronto, ST=ON, C=CA&lt;br /&gt;Serial number: 4665c3d8&lt;br /&gt;Valid from: Tue Jun 05 16:13:12 EDT 2007 until: Tue Jun 05 16:13:12 EDT 2008&lt;br /&gt;Certificate fingerprints:&lt;br /&gt; MD5: 2D:7F:F8:1D:EB:54:6D:4E:EB:1A:AF:99:34:C1:0A:F2&lt;br /&gt; SHA1: 2A:01:08:85:FD:DC:7A:65:59:E0:07:F0:4E:12:5A:D4:A9:EA:A1:37&lt;br /&gt; Signature algorithm name: MD5withRSA&lt;br /&gt; Version: 1&lt;br /&gt;Trust this certificate? [no]: yes&lt;br /&gt;Certificate was added to keystore&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Restart Glassfish on Server A for the new certificate to take effect.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Part 2 – Configuring Realms And Users for HTTP BASIC Authentication&lt;/h2&gt;Earlier I said that Server B will host the service, and Server A will be the client.  Before we can enable HTTP BASIC authentication in the web service, we need to create the username and password that will be used by the service client.  Glassfish has several repositories for user accounts, called realms.  We're going to create a new realm for our service, then add a user into it.  To do this, log into Server B's Glassfish web console at http://serverB:4848 and log in as admin.  The default password is adminadmin.&lt;br /&gt;&lt;br /&gt;Use the tree on the left to navigate to &lt;i&gt;Configuration --&gt; Security --&gt; Realms.&lt;/i&gt; Click the New button to create a new realm and enter the following information:&lt;table border="1"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th&gt;Name&lt;/th&gt;&lt;td&gt;myRealm&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;th&gt;Class Name&lt;/th&gt;&lt;td&gt;com.sun.enterprise.security.auth.realm.file.FileRealm&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;th&gt;JAAS context&lt;/th&gt;&lt;td&gt;fileRealm&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;th&gt;Key File&lt;/th&gt;&lt;td&gt;${com.sun.aas.instanceRoot}/config/myRealm-keyfile&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Click OK.  It will save your new realm and bring you back to the list of realms.  Click on your new realm to bring up the Edit Realm screen.  Click the Manage Users button.  Next you will see an empty list of users.  Click the New button to create a new user.  Enter the following information:&lt;table border="1"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th&gt;User ID&lt;/th&gt;&lt;td&gt;testClient&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;th&gt;Group List&lt;/th&gt;&lt;td&gt;Users&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;th&gt;New Password&lt;/th&gt;&lt;td&gt;secret&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;th&gt;Confirm New Password&lt;/th&gt;&lt;td&gt;secret&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;i&gt;Note: You make up the group name.  It does not come from a list somewhere else.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Press OK to save.  We now have a new realm and user account that can be used for the service.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Part 3 – Creating a Secured Web Service&lt;/h2&gt;I will be using NetBeans to create the service.  First, create an EJB Module project (Java EE 5) called CentralDataService. Once the project is created, right click the project in the project tree and select New --&gt; Web Service.  If you can't find Web Service, click Other to bring up the New File window.  Select the Web Services category, and Web Service file type. Click next.&lt;br /&gt;&lt;br /&gt;On the New Web Service screen, enter “CentralData” for the service name, and “com.ryandelaplante.centraldata.service” for the package.  Click Finish to generate the new web service.&lt;br /&gt;&lt;br /&gt;Before we modify the code of the web service, we'll create a Reservation object that will later be used as the return value.   Create a “com.ryandelaplante.domain” package, and a new Reservation class inside of it.  The code should look like this&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt;package com.ryandelaplante.domain;&lt;br /&gt;&lt;br /&gt;public class Reservation {&lt;br /&gt;private String confNumber;&lt;br /&gt;private String firstName;&lt;br /&gt;private String lastName;&lt;br /&gt;&lt;br /&gt;public Reservation() {&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public String getConfNumber() {&lt;br /&gt;  return confNumber;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void setConfNumber(String confNumber) {&lt;br /&gt;  this.confNumber = confNumber;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public String getFirstName() {&lt;br /&gt;  return firstName;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void setFirstName(String firstName) {&lt;br /&gt;  this.firstName = firstName;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public String getLastName() {&lt;br /&gt;  return lastName;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void setLastName(String lastName) {&lt;br /&gt;  this.lastName = lastName;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Next, modify the CentralData.java web service to look like the following:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt;package com.ryandelaplante.centraldata.service;&lt;br /&gt;&lt;br /&gt;import com.ryandelaplante.domain.Reservation;&lt;br /&gt;import javax.ejb.Stateless;&lt;br /&gt;import javax.jws.WebMethod;&lt;br /&gt;import javax.jws.WebParam;&lt;br /&gt;import javax.jws.WebService;&lt;br /&gt;&lt;br /&gt;@Stateless()&lt;br /&gt;@WebService()&lt;br /&gt;public class CentralData {&lt;br /&gt;@WebMethod&lt;br /&gt;public Reservation[] findReservations(@WebParam(name = "lastName")&lt;br /&gt;    String lastName) {&lt;br /&gt;&lt;br /&gt;  Reservation[] results = { new Reservation(), new Reservation() };&lt;br /&gt;&lt;br /&gt;  results[0].setConfNumber("0001");&lt;br /&gt;  results[0].setFirstName("John");&lt;br /&gt;  results[0].setLastName("Doe");&lt;br /&gt;&lt;br /&gt;  results[1].setConfNumber("0002");&lt;br /&gt;  results[1].setFirstName("Jane");&lt;br /&gt;  results[1].setLastName("Doe");&lt;br /&gt;&lt;br /&gt;  return results;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;Enabling SSL&lt;/h3&gt;To enable transport layer SSL security for this web service, you need to modify the deployment descriptor.  For EJB service endpoints you modify the application server specific deployment descriptor (sun-ejb-jar.xml for Glassfish).  For servlet endpoint services you modify the web.xml deployment descriptor. Your deployment descriptor might be almost empty by default.  You'll need to add the missing parts.&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt; &amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 EJB 3.0//EN" "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_0-0.dtd"&amp;gt;&lt;br /&gt;&amp;lt;sun-ejb-jar&amp;gt;&lt;br /&gt; &amp;lt;enterprise-beans&amp;gt;&lt;br /&gt;   &amp;lt;ejb&amp;gt;&lt;br /&gt;     &amp;lt;ejb-name&amp;gt;CentralData&amp;lt;/ejb-name&amp;gt;&lt;br /&gt;     &amp;lt;webservice-endpoint&amp;gt;&lt;br /&gt;       &amp;lt;port-component-name&amp;gt;CentralData&amp;lt;/port-component-name&amp;gt;&lt;br /&gt;       &lt;b&gt;&amp;lt;transport-guarantee&amp;gt;CONFIDENTIAL&amp;lt;/transport-guarantee&amp;gt;&lt;/b&gt;&lt;br /&gt;     &amp;lt;/webservice-endpoint&amp;gt;&lt;br /&gt;   &amp;lt;/ejb&amp;gt;&lt;br /&gt; &amp;lt;/enterprise-beans&amp;gt;&lt;br /&gt;&amp;lt;/sun-ejb-jar&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The transport-guarantee element is what enables SSL security.  If this service was a servlet endpoint in a web project instead of an EJB endpoint, then the web.xml deployment descriptor would have been updated like this:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt; &amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"&lt;br /&gt;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&amp;gt;&lt;br /&gt; &lt;b&gt;&amp;lt;security-constraint&amp;gt;  &lt;br /&gt;   &amp;lt;display-name&amp;gt;SSL&amp;lt;/display-name&amp;gt;&lt;br /&gt;   &amp;lt;web-resource-collection&amp;gt;&lt;br /&gt;     &amp;lt;web-resource-name&amp;gt;Everything&amp;lt;/web-resource-name&amp;gt;&lt;br /&gt;     &amp;lt;description/&amp;gt;&lt;br /&gt;     &amp;lt;url-pattern&amp;gt;/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;     &amp;lt;http-method&amp;gt;GET&amp;lt;/http-method&amp;gt;&lt;br /&gt;     &amp;lt;http-method&amp;gt;PUT&amp;lt;/http-method&amp;gt;&lt;br /&gt;     &amp;lt;http-method&amp;gt;HEAD&amp;lt;/http-method&amp;gt;&lt;br /&gt;     &amp;lt;http-method&amp;gt;POST&amp;lt;/http-method&amp;gt;&lt;br /&gt;     &amp;lt;http-method&amp;gt;OPTIONS&amp;lt;/http-method&amp;gt;&lt;br /&gt;     &amp;lt;http-method&amp;gt;TRACE&amp;lt;/http-method&amp;gt;&lt;br /&gt;     &amp;lt;http-method&amp;gt;DELETE&amp;lt;/http-method&amp;gt;&lt;br /&gt;   &amp;lt;/web-resource-collection&amp;gt;&lt;br /&gt;   &amp;lt;user-data-constraint&amp;gt;&lt;br /&gt;     &amp;lt;transport-guarantee&amp;gt;CONFIDENTIAL&amp;lt;/transport-guarantee&amp;gt;&lt;br /&gt;   &amp;lt;/user-data-constraint&amp;gt;&lt;br /&gt; &amp;lt;/security-constraint&amp;gt;&lt;/b&gt;&lt;br /&gt;&amp;lt;/web-app&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;Enabling HTTP BASIC Authentication&lt;/h3&gt;Next we're going to add HTTP BASIC authentication security.  Earlier we had created a new security realm in Glassfish called &lt;i&gt;myRealm&lt;/i&gt; and a new user inside the realm called &lt;i&gt;testClient&lt;/i&gt;.  We put testClient in a group called &lt;i&gt;Users&lt;/i&gt;.  To enable HTTP BASIC authentication we need to modify the deployment descriptor again:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt; &amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 EJB 3.0//EN" "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_0-0.dtd"&amp;gt;&lt;br /&gt;&amp;lt;sun-ejb-jar&amp;gt;&lt;br /&gt; &lt;b&gt;&amp;lt;security-role-mapping&amp;gt;&lt;br /&gt;   &amp;lt;role-name&amp;gt;AuthorizedClients&amp;lt;/role-name&amp;gt;&lt;br /&gt;   &amp;lt;group-name&amp;gt;Users&amp;lt;/group-name&amp;gt;&lt;br /&gt; &amp;lt;/security-role-mapping&amp;gt;&lt;/b&gt;&lt;br /&gt; &amp;lt;enterprise-beans&amp;gt;&lt;br /&gt;   &amp;lt;ejb&amp;gt;&lt;br /&gt;     &amp;lt;ejb-name&amp;gt;CentralData&amp;lt;/ejb-name&amp;gt;&lt;br /&gt;     &amp;lt;webservice-endpoint&amp;gt;&lt;br /&gt;       &amp;lt;port-component-name&amp;gt;CentralData&amp;lt;/port-component-name&amp;gt;&lt;br /&gt;       &lt;b&gt;&amp;lt;login-config&amp;gt;&lt;br /&gt;         &amp;lt;auth-method&amp;gt;BASIC&amp;lt;/auth-method&amp;gt;&lt;br /&gt;         &amp;lt;realm&amp;gt;myRealm&amp;lt;/realm&amp;gt;&lt;br /&gt;       &amp;lt;/login-config&amp;gt;&lt;/b&gt;&lt;br /&gt;       &amp;lt;transport-guarantee&amp;gt;CONFIDENTIAL&amp;lt;/transport-guarantee&amp;gt;&lt;br /&gt;     &amp;lt;/webservice-endpoint&amp;gt;&lt;br /&gt;   &amp;lt;/ejb&amp;gt;&lt;br /&gt; &amp;lt;/enterprise-beans&amp;gt;&lt;br /&gt;&amp;lt;/sun-ejb-jar&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The security-role-mapping section maps a role name that you make up for use by your web service to a group name used by real user accounts in the application server.  The role name could be exactly the same as the group name for simplicity; but I chose a different name to demonstrate how it can be used.&lt;br /&gt;&lt;br /&gt;If this service was a servlet endpoint in a web project instead of an EJB endpoint, then the web.xml deployment descriptor would have been updated like this:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt; &amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"&lt;br /&gt;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&amp;gt;&lt;br /&gt; &amp;lt;security-constraint&amp;gt;  &lt;br /&gt;   &amp;lt;display-name&amp;gt;SSL&amp;lt;/display-name&amp;gt;&lt;br /&gt;   &amp;lt;web-resource-collection&amp;gt;&lt;br /&gt;     &amp;lt;web-resource-name&amp;gt;Everything&amp;lt;/web-resource-name&amp;gt;&lt;br /&gt;     &amp;lt;description/&amp;gt;&lt;br /&gt;     &amp;lt;url-pattern&amp;gt;/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;     &amp;lt;http-method&amp;gt;GET&amp;lt;/http-method&amp;gt;&lt;br /&gt;     &amp;lt;http-method&amp;gt;PUT&amp;lt;/http-method&amp;gt;&lt;br /&gt;     &amp;lt;http-method&amp;gt;HEAD&amp;lt;/http-method&amp;gt;&lt;br /&gt;     &amp;lt;http-method&amp;gt;POST&amp;lt;/http-method&amp;gt;&lt;br /&gt;     &amp;lt;http-method&amp;gt;OPTIONS&amp;lt;/http-method&amp;gt;&lt;br /&gt;     &amp;lt;http-method&amp;gt;TRACE&amp;lt;/http-method&amp;gt;&lt;br /&gt;     &amp;lt;http-method&amp;gt;DELETE&amp;lt;/http-method&amp;gt;&lt;br /&gt;   &amp;lt;/web-resource-collection&amp;gt;&lt;br /&gt;   &lt;b&gt;&amp;lt;auth-constraint&amp;gt;&lt;br /&gt;     &amp;lt;role-name&amp;gt;AuthorizedClients&amp;lt;/role-name&amp;gt;&lt;br /&gt;   &amp;lt;/auth-constraint&amp;gt;&lt;/b&gt;&lt;br /&gt;   &amp;lt;user-data-constraint&amp;gt;&lt;br /&gt;     &amp;lt;transport-guarantee&amp;gt;CONFIDENTIAL&amp;lt;/transport-guarantee&amp;gt;&lt;br /&gt;   &amp;lt;/user-data-constraint&amp;gt;&lt;br /&gt; &amp;lt;/security-constraint&amp;gt;&lt;br /&gt; &lt;b&gt;&amp;lt;login-config&amp;gt;&lt;br /&gt;   &amp;lt;auth-method&amp;gt;BASIC&amp;lt;/auth-method&amp;gt;&lt;br /&gt;   &amp;lt;realm&amp;gt;myRealm&amp;lt;/realm&amp;gt;&lt;br /&gt; &amp;lt;/login-config&amp;gt;&lt;br /&gt; &amp;lt;security-role&amp;gt;&lt;br /&gt;   &amp;lt;role-name&amp;gt;AuthorizedClients&amp;lt;/role-name&amp;gt;&lt;br /&gt; &amp;lt;/security-role&amp;gt;&lt;/b&gt;&lt;br /&gt;&amp;lt;/web-app&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The web.xml deployment descriptor does not have a security-role-mapping section so you need to enter that information into the application server specific deployment descriptor (sun-web.xml for Glassfish).  The sun-web.xml file would like look this:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt; &amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"&amp;gt;&lt;br /&gt;&amp;lt;sun-web-app error-url=""&amp;gt;&lt;br /&gt; &lt;b&gt;&amp;lt;security-role-mapping&amp;gt;&lt;br /&gt;   &amp;lt;role-name&amp;gt;AuthorizedClients&amp;lt;/role-name&amp;gt;&lt;br /&gt;   &amp;lt;group-name&amp;gt;Users&amp;lt;/group-name&amp;gt;&lt;br /&gt; &amp;lt;/security-role-mapping&amp;gt;&lt;/b&gt;&lt;br /&gt; &amp;lt;context-root&amp;gt;/CentralDataService&amp;lt;/context-root&amp;gt;&lt;br /&gt; &amp;lt;class-loader delegate="true"/&amp;gt;&lt;br /&gt; &amp;lt;jsp-config&amp;gt;&lt;br /&gt;   &amp;lt;property name="keepgenerated" value="true"&amp;gt;&lt;br /&gt;     &amp;lt;description&amp;gt;Keep a copy of the generated servlet class' java code.&amp;lt;/description&amp;gt;&lt;br /&gt;   &amp;lt;/property&amp;gt;&lt;br /&gt; &amp;lt;/jsp-config&amp;gt;&lt;br /&gt;&amp;lt;/sun-web-app&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The last step is to specify which methods you would like to secure with HTTP BASIC authentication. You can use the @RolesAllowed annotation on a per-method basis, or for the whole class.  In this example we'll use it per method.&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt;package com.ryandelaplante.centraldata.service;&lt;br /&gt;&lt;br /&gt;import com.ryandelaplante.domain.Reservation;&lt;br /&gt;&lt;b&gt;import javax.annotation.security.RolesAllowed;&lt;/b&gt;&lt;br /&gt;import javax.ejb.Stateless;&lt;br /&gt;import javax.jws.WebMethod;&lt;br /&gt;import javax.jws.WebParam;&lt;br /&gt;import javax.jws.WebService;&lt;br /&gt;&lt;br /&gt;@Stateless()&lt;br /&gt;@WebService()&lt;br /&gt;public class CentralData {&lt;br /&gt;  @WebMethod&lt;br /&gt;  &lt;b&gt;@RolesAllowed("AuthorizedClients")&lt;/b&gt;&lt;br /&gt;  public Reservation[] findReservations(@WebParam(name = "lastName")&lt;br /&gt;      String lastName) {&lt;br /&gt; &lt;br /&gt;    Reservation[] results = { new Reservation(), new Reservation() };&lt;br /&gt;     &lt;br /&gt;    results[0].setConfNumber("0001");&lt;br /&gt;    results[0].setFirstName("John");&lt;br /&gt;    results[0].setLastName("Doe");&lt;br /&gt; &lt;br /&gt;    results[1].setConfNumber("0002");&lt;br /&gt;    results[1].setFirstName("Jane");&lt;br /&gt;    results[1].setLastName("Doe");&lt;br /&gt; &lt;br /&gt;    return results;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Note that you can have a different role per method.  If you would like to include multiple roles, then use the following syntax:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt; @RolesAllowed( { “Role1”, “Role2” } )&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h2&gt;Part 4 – Creating a Secured Web Service Client&lt;/h2&gt;Before we can begin creating the web service client, we need the service's WSDL address.  I am using NetBeans to create the client.  The CentralData project has a Web Services tree node in the project tree.  Expand this node to reveal your web service.  Right click the service and select Properties.  A properties dialog window will open and the WSDL address is listed at the bottom.  Highlight the address and press CTRL-C to copy it into the clipboard.&lt;br /&gt;&lt;br /&gt;Create a new web project and name it &lt;i&gt;CentralDataClient&lt;/i&gt;.  Once the project is created, right click the project in the project tree and select New --&gt; Web Service Client.  If you can't find Web Service Client, click Other to bring up the New File window.  Select the Web Services category, and Web Service Client file type. Click next.&lt;br /&gt;&lt;br /&gt;On the New Web Service Client screen click the WSDL URL radio button and paste the URL into the textbox beside it.  Since we have secured this web service, you need to change the URL a bit.  Change the http to &lt;b&gt;https&lt;/b&gt;, and change the port number from 8080 to 8181 (Glassfish's default https port).  In the package name textbox enter &lt;i&gt;com.ryandelaplante.centraldata.client&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;Next were going to create a basic servlet that will use the web service client. Right click the project, select New --&gt; Servlet.  On the New Servlet screen enter &lt;i&gt;FindRes&lt;/i&gt; for the class name, and &lt;i&gt;com.ryandelaplante.servlets&lt;/i&gt; for the package. Click the Finish button to generate the servlet and have it added to the web.xml deployment descriptor. The new servlet class's code window will be displayed.&lt;br /&gt;&lt;br /&gt;In the project tree, expand the Web Service References node down to Central Data --&gt; CentralDataService --&gt; CentralDataPort --&gt; findReservations.   Drag/drop the findReservations method into the servlet code window just before the out.close(); line.  NetBeans will generate a few lines of code to help you get started calling the web service operation.  The servlet's processRequest method now looks something like this:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt;protected void processRequest(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;  throws ServletException, IOException {&lt;br /&gt;response.setContentType("text/html;charset=UTF-8");&lt;br /&gt;PrintWriter out = response.getWriter();&lt;br /&gt;&lt;b&gt;try { // Call Web Service Operation&lt;br /&gt;  com.ryandelaplante.centraldata.client.CentralData port = service.getCentralDataPort();&lt;br /&gt;  // TODO initialize WS operation arguments here&lt;br /&gt;  java.lang.String lastName = "";&lt;br /&gt;  // TODO process result here&lt;br /&gt;  java.util.List&amp;amp;lt;com.ryandelaplante.centraldata.client.Reservation&amp;amp;gt; result = port.findReservations(lastName);&lt;br /&gt;  out.println("Result = "+result);&lt;br /&gt;} catch (Exception ex) {&lt;br /&gt;  // TODO handle custom exceptions here&lt;br /&gt;}&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;out.close();&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;We're going to tweak the generated the code a bit to display the information from the web service response:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt;protected void processRequest(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;  throws ServletException, IOException {&lt;br /&gt;response.setContentType("text/html;charset=UTF-8");&lt;br /&gt;PrintWriter out = response.getWriter();&lt;br /&gt;&lt;br /&gt;try { // Call Web Service Operation&lt;br /&gt;  com.ryandelaplante.centraldata.client.CentralData port = service.getCentralDataPort();&lt;br /&gt;  // TODO initialize WS operation arguments here&lt;br /&gt;  &lt;b&gt;java.lang.String lastName = "Doe";&lt;/b&gt;&lt;br /&gt;  // TODO process result here&lt;br /&gt;  java.util.List&amp;amp;lt;com.ryandelaplante.centraldata.client.Reservation&amp;amp;gt; result = port.findReservations(lastName);&lt;br /&gt;&lt;br /&gt;  &lt;b&gt;for (com.ryandelaplante.centraldata.client.Reservation res : result) {&lt;br /&gt;    out.println("Conf# : " + res.getConfNumber() + ", Name: " +&lt;br /&gt;        res.getFirstName() + " " + res.getLastName() + "&amp;amp;lt;br/&amp;amp;gt;");&lt;br /&gt;  }&lt;/b&gt;&lt;br /&gt;} catch (Exception ex) {&lt;br /&gt;  // TODO handle custom exceptions here&lt;br /&gt;} &lt;br /&gt;out.close();&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;You do not need to modify the deployment descriptor to enable SSL because the WSDL URL includes https.  As long as Server B's certificate has been added to Server A's trusted keystore then SSL will work.&lt;br /&gt;&lt;br /&gt;The last thing left to do is add support for HTTP BASIC authentication.  You need to set the username and password on the port object before using it.  I have created a getCentralDataPort() convenience method to do this.  In the sample code the username and password are hard coded in.  You would load this information from somewhere else such as env-entry settings in your deployment descriptor.&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt;protected void processRequest(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;  throws ServletException, IOException {&lt;br /&gt;response.setContentType("text/html;charset=UTF-8");&lt;br /&gt;PrintWriter out = response.getWriter();&lt;br /&gt;&lt;br /&gt;try { // Call Web Service Operation&lt;br /&gt;  &lt;b&gt;com.ryandelaplante.centraldata.client.CentralData port = getCentralDataPort();&lt;/b&gt;&lt;br /&gt;  // TODO initialize WS operation arguments here&lt;br /&gt;  java.lang.String lastName = "Doe";&lt;br /&gt;  // TODO process result here&lt;br /&gt;  java.util.List&lt;com.ryandelaplante.centraldata.client.reservation&gt; result = port.findReservations(lastName);&lt;br /&gt;&lt;br /&gt;  for (com.ryandelaplante.centraldata.client.Reservation res : result) {&lt;br /&gt;    out.println("Conf# : " + res.getConfNumber() + ", Name: " +&lt;br /&gt;        res.getFirstName() + " " + res.getLastName() + "&amp;amp;lt;br/&amp;amp;gt;");&lt;br /&gt;  }&lt;br /&gt;} catch (Exception ex) {&lt;br /&gt;  // TODO handle custom exceptions here&lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;out.close();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;b&gt;private com.ryandelaplante.centraldata.client.CentralData getCentralDataPort() {&lt;br /&gt;com.ryandelaplante.centraldata.client.CentralData port = service.getCentralDataPort();&lt;br /&gt;&lt;br /&gt;((BindingProvider)port).getRequestContext().put(&lt;br /&gt;    BindingProvider.USERNAME_PROPERTY, "testClient");&lt;br /&gt;((BindingProvider)port).getRequestContext().put(&lt;br /&gt;    BindingProvider.PASSWORD_PROPERTY, "secret");&lt;br /&gt;&lt;br /&gt;return port;&lt;br /&gt;}&lt;/b&gt;&lt;/com.ryandelaplante.centraldata.client.reservation&gt;&lt;/code&gt;&lt;/pre&gt;Now you can deploy the web service client project to Server A and give it a try.  If you find any errors or know of a better way to do something then please let me know!&lt;br /&gt;&lt;br /&gt;While I was first playing with HTTP BASIC authentication, I was using an EJB session bean instead of a servlet to call the web service operation.  The service was a servlet endpoint in a web project and I had enabled authentication for all HTTP type requests (GET, POST, etc.)  The @WebServiceRef resource injection seems to try to download the WSDL while the instance of my EJB Session Bean was being created.  Because I wasn't able to provide it a username and password at this stage, it would fail.  To get around this I ended up removing the HTTP GET line in the service endpoint's web.xml so that HTTP GET did not require authentication.  The WSDL is loaded using HTTP GET.  I think it is safe to do this because the real web service operations are done using HTTP POST.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-7450639003454798293?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/7450639003454798293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2007/06/ssl-and-http-basic-authentication-with.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/7450639003454798293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/7450639003454798293'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2007/06/ssl-and-http-basic-authentication-with.html' title='SSL and HTTP BASIC authentication with Glassfish and JAX-WS'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6656477858173203405.post-8640456934050862384</id><published>2007-01-08T21:21:00.000-05:00</published><updated>2009-08-07T17:14:29.126-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='java ee'/><category scheme='http://www.blogger.com/atom/ns#' term='jca'/><category scheme='http://www.blogger.com/atom/ns#' term='j2ee'/><title type='text'>Java Connector Architecture project a success</title><content type='html'>A while back I believe I mentioned that I was reading a book on the Java Connector Architecture for work. I finished reading it over the holidays and got started on it before returning to work in the new year. Last week I wrote the rest of it and am adding the final touches now. It works really well.&lt;br /&gt;&lt;br /&gt;I'd like to describe a few approaches I tried before arriving at the decision to use JCA. First, the requirements. I had to write a piece of software that uses sockets and a proprietary protocol to communicate with one of our in-house EIS systems. The EIS system will allow only one inbound connection, and all requests from multiple clients must share the connection (no transaction support). The communication libraries work asynchronously, but users of the library want to communicate synchronously.&lt;br /&gt;&lt;br /&gt;Several libraries were written. The first was a wrapper around nio sockets to make working with the socket easier. You could create an instance (which owns a separate thread to monitor the nio selector), set the hostname/port and tell it to connect. You get events when it connects, connection is closed, data arrives, and a few others. The second library is similar to an XML parser, but is for our own proprietary protocol. The third library understands the idea of requests/responses, connections, and our parser. You can send requests using it and when the response arrives it matches it with the original request, then calls back to the sender. There's a lot more to it than that, but that's all I need to describe for this.&lt;br /&gt;&lt;br /&gt;Next I needed to have it establish a connection to the EIS when the application server starts so that it's available to EJB's and web apps. My first implementation was a bit odd. I was using JBoss and found out that they have proprietary JMX interfaces I can use that feel a bit like the Windows NT service controller. You get start() and stop() callbacks, as well as the functionality of JMX. I wrote the first implementation using this, so it started as service inside JBoss when JBoss was started. The problem with this is that it is JBoss specific, and that is not what JMX was meant for. JMX is similar to SNMP and is made for monitoring and managing java apps (like the application server itself) with tools like IBM Tivoli. However it worked, and worked well.&lt;br /&gt;&lt;br /&gt;The next idea was to write a stand alone java application and have it start up as a real Windows service using the JavaService wrapper utility. This program would have several threads. One thread would monitor config files in a folder for new/modified/deleted files. Each file represented a connection to an EIS. As it detected changes, it would manage a thread for each connection. An other thread operated a JMS consumer. It would wait for requests, broker them to the appropriate connection thread, then pass the response back through a separate JMS Queue. I wrote this in a week or so but never ended up using it. I didn't use it because I found out that I had just re-invented the wheel. This is very similar to what the Java Connector Architecture does.&lt;br /&gt;&lt;br /&gt;I read a book on JCA, then re-wrote that program as a JCA resource adapter (RA). It is so beautiful. I deploy my RA to the application server (single .rar file). Next using the web based admin tool for the application server I can create a separate connection pool for each EIS I want to connect to. The application server manages the configuration, connection pooling, all the lifecycle events, and since JCA resource adapters don't live inside the EJB container they are free to manage threads. I was able to use wait(x) and notify() in a few key places to enable synchronous execution of a request for the user of the RA, while everything is asynchronous in the lower layers. This really simplified my source and the design of the system. It is also portable to any application server, even Tomcat. After writing the resource adapter I wrote a web service with a separate method for each type of request. This allows any application in any language to communicate with the EIS using nice objects rather than having to write their own socket code and message builder/parser.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6656477858173203405-8640456934050862384?l=www.ryandelaplante.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ryandelaplante.com/feeds/8640456934050862384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ryandelaplante.com/2007/08/java-connector-architecture-project.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/8640456934050862384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6656477858173203405/posts/default/8640456934050862384'/><link rel='alternate' type='text/html' href='http://www.ryandelaplante.com/2007/08/java-connector-architecture-project.html' title='Java Connector Architecture project a success'/><author><name>Ryan de Laplante</name><uri>http://www.blogger.com/profile/13440971336746246851</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_j2rus_Nv1d8/SnuWizDKzfI/AAAAAAAAA08/w0F0UZszVTo/s1600-R/ryan.jpg'/></author><thr:total>0</thr:total></entry></feed>
