<?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-9106654920506442106</id><updated>2012-01-26T23:54:30.832-08:00</updated><category term='ruby'/><category term='mobile'/><category term='apple mac'/><category term='obfuscation'/><category term='milestone'/><category term='s3'/><category term='web'/><category term='ec2'/><category term='Objective-c iPhone'/><category term='maven'/><category term='multiple tables'/><category term='osx'/><category term='iphone objective-c'/><category term='assembly'/><category term='asynchronous processing'/><category term='rss parser'/><category term='Viewsonic VX2262WM'/><category term='ontario ministry of transport'/><category term='beginners'/><category term='iphone'/><category term='java server faces'/><category term='functional decomposition'/><category term='jsf rest'/><category term='amazon'/><category term='jetty'/><category term='spring'/><category term='rss'/><category term='rails'/><category term='orientation'/><category term='web api'/><category term='code'/><category term='droid'/><category term='t61'/><category term='aws'/><category term='learning'/><category term='repository'/><category term='rest api'/><category term='linux'/><category term='debug'/><category term='screen'/><category term='hibernate'/><category term='transaction'/><category term='operating systems'/><category term='jsf'/><category term='mysql'/><category term='java'/><category term='scalability'/><category term='cloud computing'/><category term='camera'/><category term='webservices'/><category term='ajax'/><category term='security'/><category term='programming'/><category term='cloudfront'/><category term='jsp'/><category term='game'/><category term='style'/><category term='rotate'/><category term='mvc'/><category term='dwr'/><category term='comet'/><category term='rollback'/><category term='java literature beginners'/><category term='android'/><category term='artifactory'/><category term='jpa'/><category term='xorg.conf'/><category term='session'/><category term='search'/><category term='browser incompatable'/><category term='exception'/><category term='quality'/><category term='ubuntu'/><category term='proguard'/><category term='caching'/><category term='webapp'/><category term='micro controllers'/><category term='examples'/><category term='reverse-ajax'/><category term='google'/><title type='text'>Software Development Notepad</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>39</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-3919981354396359441</id><published>2011-03-31T12:44:00.000-07:00</published><updated>2011-04-01T07:57:01.252-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><title type='text'>installing mysql on OSX server 10.6.6</title><content type='html'>If you're going to install mySQL on a mac osx server, you may run into a problem..&lt;br /&gt;&lt;br /&gt;I was trying to install mysql on my mac OSX server version 10.6.6&lt;br /&gt;&lt;br /&gt;After installation mysql expects to find a mysql.sock file in /var/mysql .. it doesn't exist!&lt;br /&gt;It's actually at /private/tmp/mysql.sock ..&lt;br /&gt;&lt;br /&gt;Here are the details, check out the post by chewitt on this &lt;a href="http://discussions.apple.com/thread.jspa?messageID=5059320"&gt;apple support discussion&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-3919981354396359441?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/3919981354396359441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=3919981354396359441' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/3919981354396359441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/3919981354396359441'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2011/03/installing-mysql-on-osx-server-1066.html' title='installing mysql on OSX server 10.6.6'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-1776544636381516767</id><published>2011-03-30T21:03:00.000-07:00</published><updated>2011-03-30T21:04:12.575-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web api'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><category scheme='http://www.blogger.com/atom/ns#' term='rest api'/><title type='text'>REST/Web API Security Practices</title><content type='html'>I wanted to make a record of a short but sweet article from InfoQ on the topic of securing REST/Web API (whatever they call them these days) calls. I'm finding that there are more and more web api's/Restful web services out there these days and for many of them authentication is done in many diverse ways.. Which is a pain in the rear, as it's nice to have some standards to rely on for efficiencies. In any event, there are a few best practices that should be relied on for ensuring the security of a web api&lt;br /&gt;&lt;br /&gt;3 Best practices are suggested in this article &lt;a href="http://www.infoq.com/news/2010/01/rest-api-authentication-schemes"&gt;here on infoq&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Quick Best Practices Summary:&lt;br /&gt;- All Calls over HTTPS (duh!) .. BUT cert from server is VALIDATED.&lt;br /&gt;- All calls made using dedicated api keys&lt;br /&gt;- All Queries/contents SIGNED with a hash signature (eg. HMAC-SHA256) using a "secret" api key only known to the 2 parties involved in the information exchange.&lt;br /&gt;&lt;br /&gt;A security authentication standard that supports these best practices is &lt;a href="http://oauth.net/"&gt;OAuth&lt;/a&gt;. This standard has various implementations for different platforms.. It's currently used by big guys like Facebook and Twitter for authentication.&lt;br /&gt;&lt;br /&gt;If you're not familiar with OAuth there's a decent beginners guide published on &lt;a href="http://hueniverse.com/2007/10/beginners-guide-to-oauth-part-i-overview/"&gt;hueniverse.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-1776544636381516767?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/1776544636381516767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=1776544636381516767' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/1776544636381516767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/1776544636381516767'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2011/03/restweb-api-security-practices.html' title='REST/Web API Security Practices'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-6725485046910766114</id><published>2011-01-21T11:22:00.001-08:00</published><updated>2011-01-22T10:36:39.494-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mvc'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='webservices'/><title type='text'>Spring 3.0 REST services development</title><content type='html'>&lt;a href="http://www.springsource.org/"&gt;Spring 3.0&lt;/a&gt; provides an excellent MVC framework with very easy to use support for building REST api's.&lt;br /&gt;&lt;br /&gt;An excellent primer from IBM on getting started with spring 3.0 rest functionality: &lt;a href="http://www.ibm.com/developerworks/webservices/library/wa-restful/index.html?ca=drs-"&gt;http://www.ibm.com/developerworks/webservices/library/wa-restful/index.html?ca=drs-&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-6725485046910766114?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/6725485046910766114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=6725485046910766114' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/6725485046910766114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/6725485046910766114'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2011/01/spring-30-rest-services-development.html' title='Spring 3.0 REST services development'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-6797176437244947162</id><published>2011-01-21T11:21:00.001-08:00</published><updated>2011-01-22T10:45:10.895-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><title type='text'>Hibernate Lazy Initialization</title><content type='html'>This is a good article on lazy loading for those new to hibernate: &lt;a href="http://www.javalobby.org/java/forums/t20533.html"&gt;http://www.javalobby.org/java/forums/t20533.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-6797176437244947162?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/6797176437244947162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=6797176437244947162' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/6797176437244947162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/6797176437244947162'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2011/01/hibernate-lazy-initialization.html' title='Hibernate Lazy Initialization'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-1829253146054923115</id><published>2010-03-04T11:05:00.001-08:00</published><updated>2010-03-04T11:13:29.334-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='screen'/><category scheme='http://www.blogger.com/atom/ns#' term='orientation'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Activity Orientation Issues on Android</title><content type='html'>This post is somewhat of an extension to the post I put up on March 3rd, 2010 on Android Milestone camera issues.&lt;br /&gt;&lt;br /&gt;My finding was that the Activity orientation has to be set to landscape if the camera preview rotation is to work correctly within an android application running on the Milestone/Droid.&lt;br /&gt;&lt;br /&gt;After this discovery with the test app that Iincluded  in the previous post, I had to integrate these changes into the application I'm currently working on, simply by calling setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); in the onCreate for the activity that is managing the camera...&lt;br /&gt;&lt;br /&gt;I expected things to work perfectly, but when running the app (Which runs in portrait mode btw), I noticed the app just froze.. This made no sense to me (as i'm still not yet an expert on Android).. I took a look at the logs and it appeared that the activity was being created over and over in a loop.&lt;br /&gt;&lt;br /&gt;I did a bit of searching on the net and found &lt;a href="http://www.anddev.org/viewtopic.php?p=33458"&gt;this thread&lt;/a&gt; which indicated that I need to tell the system that I'm going to be managing the screen orientaiton on my own. As it turned out, this worked.. the solution was quite simple, I just added the attribute below to my activity element in the android manifest:&lt;br /&gt;&lt;br /&gt;android:configChanges="orientation|keyboardHidden"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-1829253146054923115?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/1829253146054923115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=1829253146054923115' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/1829253146054923115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/1829253146054923115'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2010/03/activity-orientation-issues-on-android.html' title='Activity Orientation Issues on Android'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-2319375933650688176</id><published>2010-03-03T14:49:00.000-08:00</published><updated>2010-03-04T07:26:25.716-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mobile'/><category scheme='http://www.blogger.com/atom/ns#' term='camera'/><category scheme='http://www.blogger.com/atom/ns#' term='droid'/><category scheme='http://www.blogger.com/atom/ns#' term='rotate'/><category scheme='http://www.blogger.com/atom/ns#' term='milestone'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Motorola Droid/Milestone Camera issues</title><content type='html'>A number of people have been having issues with the orientation of camera previews on the Motorola Droid and Milestone devices. Some similar issues were also noticed on the HTC G1 and I do believe there are similar solutions.&lt;br /&gt;&lt;br /&gt;If you're finding that your camera preview is rotated 90 degrees, take a look at this sample Activity I created which does nothing but display the camera preview on a surface.. This should solve your issues.&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;package com.brisk;&lt;br /&gt;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;&lt;br /&gt;import android.app.Activity;&lt;br /&gt;import android.content.Context;&lt;br /&gt;import android.content.pm.ActivityInfo;&lt;br /&gt;import android.graphics.PixelFormat;&lt;br /&gt;import android.hardware.Camera;&lt;br /&gt;import android.os.Bundle;&lt;br /&gt;import android.view.SurfaceHolder;&lt;br /&gt;import android.view.SurfaceView;&lt;br /&gt;&lt;br /&gt;public class DefaultActivity extends Activity {&lt;br /&gt;&lt;br /&gt;  MySurfaceView surface = null;&lt;br /&gt;  public Camera camera;&lt;br /&gt;&lt;br /&gt;  @Override&lt;br /&gt;  public void onCreate(Bundle savedInstanceState) {&lt;br /&gt;      super.onCreate(savedInstanceState);&lt;br /&gt;    &lt;br /&gt;      surface = new MySurfaceView(this);&lt;br /&gt;      setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);&lt;br /&gt;      setContentView(surface);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  /**&lt;br /&gt;   * Surface View&lt;br /&gt;   */&lt;br /&gt;  class MySurfaceView extends SurfaceView implements SurfaceHolder.Callback {&lt;br /&gt;&lt;br /&gt;      private SurfaceHolder holder;&lt;br /&gt;&lt;br /&gt;      public MySurfaceView(Context context) {&lt;br /&gt;          super(context);&lt;br /&gt;        &lt;br /&gt;          holder = getHolder();&lt;br /&gt;          holder.addCallback(this);&lt;br /&gt;          holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {&lt;br /&gt;          Camera.Parameters parameters = camera.getParameters();&lt;br /&gt;          parameters.setPictureFormat(PixelFormat.JPEG);&lt;br /&gt;          parameters.set("orientation", "portrait");&lt;br /&gt;          parameters.setRotation(90);&lt;br /&gt;          camera.setParameters(parameters);&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      public void surfaceCreated(SurfaceHolder holder) {&lt;br /&gt;          try {&lt;br /&gt;              camera = Camera.open();&lt;br /&gt;              camera.setPreviewDisplay(holder);&lt;br /&gt;              camera.startPreview();&lt;br /&gt;            &lt;br /&gt;            &lt;br /&gt;          } catch (IOException e) {&lt;br /&gt;              e.printStackTrace();&lt;br /&gt;          }&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      public void surfaceDestroyed(SurfaceHolder holder) {&lt;br /&gt;        &lt;br /&gt;          if (camera != null) {&lt;br /&gt;              camera.stopPreview();&lt;br /&gt;              camera.release();&lt;br /&gt;              camera = null;&lt;br /&gt;          }&lt;br /&gt;      }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-2319375933650688176?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/2319375933650688176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=2319375933650688176' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/2319375933650688176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/2319375933650688176'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2010/03/motorola-droidmilestone-camera-issues.html' title='Motorola Droid/Milestone Camera issues'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-3603910964351966046</id><published>2009-12-17T11:28:00.000-08:00</published><updated>2010-01-06T09:01:41.562-08:00</updated><title type='text'>Ubuntu 9.10 + Eclipse -- Serious Bug</title><content type='html'>Wow.. I just had a hell of a time trying to figure out what was going wrong with my eclipse setup! I even tried creating a new user on my system.. I also toyed with the idea of even re-installing my OS thankfully I didn't get that far.&lt;br /&gt;&lt;br /&gt;A while back I upgraded to Ubuntu 9.10... And now I decided to upgrade from eclipse ganymede to galileo.. I was trying to install the subversive SVN client plugin and noticed that i couldn't, because buttons weren't working in eclipse.&lt;br /&gt;&lt;br /&gt;This was a nightmare.. Anyway, thank God it's easily resolved. I found a fix here:&lt;br /&gt;&lt;br /&gt;How to Fix &lt;a href="http://www.norio.be/blog/2009/10/problems-eclipse-buttons-ubuntu-910"&gt;Ubuntu 9.10 Eclipse Galileo Bug&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Summary:&lt;br /&gt;Do this before you run eclipse: %export GDK_NATIVE_WINDOWS=1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-3603910964351966046?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/3603910964351966046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=3603910964351966046' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/3603910964351966046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/3603910964351966046'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2009/12/ubuntu-910-eclipse-serious-bug.html' title='Ubuntu 9.10 + Eclipse -- Serious Bug'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-1368340560888672194</id><published>2009-10-24T09:36:00.000-07:00</published><updated>2009-10-24T09:36:06.870-07:00</updated><title type='text'>Audubon Field Guide</title><content type='html'>The Audubon Field Guide is finally up and open to the public. Client apps&lt;br /&gt;are also available on itunes!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.audubonguides.com/home.html"&gt;Audubon Field Guide&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-1368340560888672194?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.audubonguides.com/home.html' title='Audubon Field Guide'/><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/1368340560888672194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=1368340560888672194' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/1368340560888672194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/1368340560888672194'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2009/10/audubon-field-guide.html' title='Audubon Field Guide'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-6537412278587155</id><published>2009-08-19T19:49:00.000-07:00</published><updated>2009-08-19T19:54:27.640-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='comet'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='reverse-ajax'/><title type='text'>Good Comet/Reverse Ajax ArticleC</title><content type='html'>AJAX (asynchronous javascript and xml(er or json usually)  is a programming model&lt;br /&gt;for dynamically updating web content on the client side, by using javascript to make calls to a server in order to receive updates, which can be fed into div sections, or other parts of HTML to produce an update on the display.&lt;br /&gt;&lt;br /&gt;"Reverse-Ajax" is quite similar, except that in most cases, this programming model requires that the client (usually javascript) will maintain a persistent HTTP connection with a server. It's blocking on this connection until the server decides to push data down the pipe, which the client can then use to update the display.&lt;br /&gt;&lt;br /&gt;I found a really good article which introduces these concepts on &lt;a href="http://www.ibm.com/developerworks/web/library/j-jettydwr/index.html"&gt;IBM&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-6537412278587155?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/6537412278587155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=6537412278587155' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/6537412278587155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/6537412278587155'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2009/08/good-cometreverse-ajax-articlec.html' title='Good Comet/Reverse Ajax ArticleC'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-5576941793528546622</id><published>2009-07-14T19:40:00.000-07:00</published><updated>2009-07-14T19:45:15.756-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iphone objective-c'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><category scheme='http://www.blogger.com/atom/ns#' term='game'/><title type='text'>Medieval</title><content type='html'>The company that I work for, Brisk Mobile Inc just released their latest game to the Apple iPhone store. Medieval is a "castle defense" style game with rich graphics and exciting gameplay. I'm very impressed with it I must say and have enjoyed playing it now for some time.. I'm on level 8 :)&lt;br /&gt;&lt;br /&gt;Written in Objective-C for the iPhone platform.. Here is a really great review of the game that I'd like to share with everyone:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.frapstr.com/2009/07/14/medieval-castle-defense-never-looked-so-good/"&gt;Medieval Review on frapster&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can also buy the game on the Apple Store. Here's a &lt;a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=321960013&amp;amp;mt=8"&gt;direct link&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-5576941793528546622?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/5576941793528546622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=5576941793528546622' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/5576941793528546622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/5576941793528546622'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2009/07/medieval.html' title='Medieval'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-400307653925122760</id><published>2009-06-30T10:15:00.000-07:00</published><updated>2009-06-30T10:25:35.958-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloudfront'/><category scheme='http://www.blogger.com/atom/ns#' term='amazon'/><category scheme='http://www.blogger.com/atom/ns#' term='s3'/><category scheme='http://www.blogger.com/atom/ns#' term='ec2'/><category scheme='http://www.blogger.com/atom/ns#' term='cloud computing'/><category scheme='http://www.blogger.com/atom/ns#' term='aws'/><title type='text'>Amazon Web Services</title><content type='html'>Amazon Web Service (AWS) is an amazing set of tools and infrastructure for deploying applications on the web (or in the cloud as it is commonly called).&lt;br /&gt;&lt;br /&gt;Traditionally, when an organization wanted to deploy an application, they had to rent rack space at a datacenter, lease or purchase expensive computer equipment and pay for ongoing maintenance and support of their applications.&lt;br /&gt;&lt;br /&gt;The costs associated with this kind of a deployment were quite high, and were a moderate to significant barrier to entry for smaller organizations, especially startups with limited budgets.&lt;br /&gt;&lt;br /&gt;AWS has a number of "services" which allow you to leverage amazons computational infrastructure using a web api and web based administration console to easily start up "machine instances", configure them and deploy your applications to them. Amazon&lt;a href="http://aws.amazon.com/ec2/"&gt;EC2&lt;/a&gt; provides a number of basic machine instances that will likely meet your needs for many applications that you'd be deploying, preconfigured with java, mysql, ruby on rails software. Starting an instance takes just seconds. Anyway, tons of information on the amazon web services site.&lt;br /&gt;&lt;br /&gt;Another excellent service is &lt;a href="http://aws.amazon.com/s3/"&gt;S3&lt;/a&gt;, known as the Simple Storage Service. I've used this quite extensivelly and highly recommend it for applications that have significant amounts of data storage required, where it makes sense to access it in a restful way.  Essentially, you just create buckets, and store blocks of data within them in the same way you would use a Map, with a key and a value.&lt;br /&gt;&lt;br /&gt;S3 can be very easily integrated with &lt;a href="http://aws.amazon.com/cloudfront/"&gt;Cloudfront&lt;/a&gt;, Amazons content delivery network which will globally distribute data stored on s3 for optimal delivery to your clients.&lt;br /&gt;&lt;br /&gt;A number of other services are available for those of you that might be interested in cloud computing in general, such as a structured data storage service and a map-reduce service for distributed processing. I haven't used these much.&lt;br /&gt;&lt;br /&gt;Cheers&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-400307653925122760?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/400307653925122760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=400307653925122760' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/400307653925122760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/400307653925122760'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2009/06/amazon-web-services.html' title='Amazon Web Services'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-6258920992065570852</id><published>2009-04-30T12:49:00.000-07:00</published><updated>2009-04-30T12:51:39.092-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iphone objective-c'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><category scheme='http://www.blogger.com/atom/ns#' term='game'/><title type='text'>Brisk Mobile Game Review</title><content type='html'>Somebody out there on the net, downloaded Submarine by Brisk Mobile (the company which currently employs me) and reviewed it posting a vid to youtube: &lt;a href="http://www.youtube.com/watch?v=d5cOJMvdU54"&gt;Submarine Review&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-6258920992065570852?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/6258920992065570852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=6258920992065570852' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/6258920992065570852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/6258920992065570852'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2009/04/brisk-mobile-game-review.html' title='Brisk Mobile Game Review'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-1966027083395198906</id><published>2009-03-06T08:31:00.000-08:00</published><updated>2009-03-19T20:59:46.458-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='rss parser'/><category scheme='http://www.blogger.com/atom/ns#' term='rss'/><title type='text'>RSS</title><content type='html'>It's really difficult to find RSS libraries that are already implemented for parsing RSS feeds etc in java..&lt;br /&gt;&lt;br /&gt;I found one called RSS4j.. It was last updated in like 2003!! I tried it out, failed on parsing RSS 2.0.. Too bad..&lt;br /&gt;&lt;br /&gt;After a bit more googling I came across &lt;a href="http://java.sun.com/developer/technicalArticles/javaserverpages/rss_utilities/"&gt;this&lt;/a&gt; from Sun. &lt;br /&gt;&lt;br /&gt;It comes with an RSS parser that does indeed understand RSS 2.0.. Great!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-1966027083395198906?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/1966027083395198906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=1966027083395198906' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/1966027083395198906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/1966027083395198906'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2009/03/rss.html' title='RSS'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-3850528889093253767</id><published>2009-02-13T08:18:00.000-08:00</published><updated>2009-02-13T08:25:52.316-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='apple mac'/><title type='text'>Transitioning from Linux to an Apple Mac</title><content type='html'>I just bought myself a Mac Mini.. 1.8 Ghz 2 gb ram.&lt;br /&gt;&lt;br /&gt;That's what I thought I was getting! When it arrived from China via Fedex it only had 1 GB of RAM. Also, within a few hours of use, the OS ceased up completely to the point where I couldn't even reboot, I had to pull the power out.&lt;br /&gt;&lt;br /&gt;I decided to write a letter to Apple about my experience.. Here it is.&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;Hi there. I'm a Software Development professional trying to make the transition from a Linux &lt;br /&gt;environment to a Mac.&lt;br /&gt;&lt;br /&gt;So, I bought myself a mac Mini order # WXXXXXXXXXXX and I must say that the very first day of use &lt;br /&gt;of my new system was quite disappointing. I ordered the mini with 2 gigs of RAM and it was shipped &lt;br /&gt;with only 1. It's a good thing I checked how much RAM the system had. Most of your customers I'm sure &lt;br /&gt;would not have noticed. Now I have to go out of my way to bring my system in to an Apple store to have the &lt;br /&gt;RAM upgraded. I'm quite unhappy about this inconvenience. Now, to add insult to injury, my Mac crashed within &lt;br /&gt;2 hours of use! You folks boast about how stable your OS is. The entire windowing system ceased up, and I had &lt;br /&gt;to reboot the system..Actually, I couldn't even reboot it, it was that frozen.. I had to unplug it. Reminds &lt;br /&gt;me of my previous experiences with Microsoft Windows. I am considering writing a series about my transition &lt;br /&gt;from Linux to Mac on my Blog (http://jsimonelis.blogspot.com), highlighting some of these pitfalls.&lt;br /&gt;&lt;br /&gt;I was hoping to have a better Mac experience. &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-3850528889093253767?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/3850528889093253767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=3850528889093253767' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/3850528889093253767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/3850528889093253767'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2009/02/transitioning-from-linux-to-apple-mac.html' title='Transitioning from Linux to an Apple Mac'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-2288297631524500952</id><published>2009-01-31T09:36:00.000-08:00</published><updated>2009-02-02T07:49:02.561-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='jsf rest'/><category scheme='http://www.blogger.com/atom/ns#' term='mvc'/><category scheme='http://www.blogger.com/atom/ns#' term='java server faces'/><category scheme='http://www.blogger.com/atom/ns#' term='jsf'/><title type='text'>JSF and Restful URL's</title><content type='html'>There have been some unfounded criticisms of JSF out there which claim that it's very difficult to write applications with bookmarkable URL's. The claim is related to one in which that JSF doesn't support Restful web development. I'm not going to go on about that, you can find much more by simply googling.&lt;br /&gt;&lt;br /&gt;However, I'd like to show you just how easy it is to write an application that supports unique URL's representing entities in your system. These URL's can be bookmarked so that a user wouldn't have to go through any web flow in order to reach this page.&lt;br /&gt;&lt;br /&gt;In my previous &lt;a href="http://jsimonelis.blogspot.com/2009/01/spring-and-jsf.html"&gt;post&lt;/a&gt; I provided example configuration on how to marry JSF and Spring so that you can define your backing beans in a spring context. In this example I'll expand on that.&lt;br /&gt;&lt;br /&gt;What I want to do, is have a page, call it entity.jsp on my system display all the details for an entity in my system modeled as class com.example.Entity&lt;br /&gt;&lt;br /&gt;Here is &lt;span style="font-weight: bold;"&gt;entity.jsp&lt;/span&gt; which would be displayed at /entity.faces:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br /&gt;&amp;lt;jsp:root version="2.0"&lt;br /&gt; xmlns:jsp="http://java.sun.com/JSP/Page"&lt;br /&gt; xmlns:f="http://java.sun.com/jsf/core"&lt;br /&gt; xmlns:h="http://java.sun.com/jsf/html"&lt;br /&gt; xmlns:t="http://myfaces.apache.org/tomahawk"&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;jsp:directive.page contentType="text/html"/&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;jsp:output omit-xml-declaration="no"&lt;br /&gt;    doctype-root-element="html"&lt;br /&gt;    doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"&lt;br /&gt;    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;f:view&amp;gt;&lt;br /&gt;    &amp;lt;html xmlns="http://www.w3.org/1999/xhtml"&amp;gt;&lt;br /&gt;       &amp;lt;head&amp;gt;&lt;br /&gt;          &amp;lt;title&amp;gt;Entity Example&amp;lt;/title&amp;gt;&lt;br /&gt;       &amp;lt;/head&amp;gt;&lt;br /&gt;       &amp;lt;body&amp;gt;       &lt;br /&gt;           &amp;lt;h:outputText value="#{EntityController.entity}"/&amp;gt;&lt;br /&gt;       &amp;lt;/body&amp;gt;&lt;br /&gt;    &amp;lt;/html&amp;gt;&lt;br /&gt; &amp;lt;/f:view&amp;gt;&lt;br /&gt;&amp;lt;/jsp:root&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;In order to render the page for a particular entity, I would call the url /entity.faces?id=1234 to render the page with details for entity with id 1234.&lt;br /&gt;&lt;br /&gt;As you can see, I have a controller called EntityController which is a JSF backing bean which connects our backend to the view. Here is the bean defined in my web application context:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;beans xmlns="http://www.springframework.org/schema/beans"&lt;br /&gt;   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"&lt;br /&gt;   xsi:schemaLocation="http://www.springframework.org/schema/beans&lt;br /&gt;                       http://www.springframework.org/schema/beans/spring-beans.xsd&lt;br /&gt;                       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;!--Here is the entity controller which binds entities to the view. It takes an entity service, a service which is responsible&lt;br /&gt;for retrieving entities by id from wherever they may be stored. See my previous blog post for information on how this kind of JSF backing bean can be configured&lt;br /&gt;from within a Spring context. --&amp;gt;   &lt;br /&gt;   &amp;lt;bean id="entityController" class="com.jsimonelis.example.EntityController" scope="request"&amp;gt;&lt;br /&gt;       &amp;lt;property name="entityService" ref="entityService" /&amp;gt;&lt;br /&gt;   &amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;!-- other bean definitions below --&amp;gt;&lt;br /&gt;&amp;lt;/beans&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Here's the source code for com.example.jsimonelis.EntityController:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;package com.example.jsimonelis&lt;br /&gt;&lt;br /&gt;public class EntityController {&lt;br /&gt;  &lt;br /&gt;   protected static final String ENTITY_ID_QUERY_KEY = "id";&lt;br /&gt;&lt;br /&gt;   private EntityService entityService;&lt;br /&gt;  &lt;br /&gt;   public Entity getEntity() {&lt;br /&gt;       return entityService.findEntity(getEntityId());&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public void setSpeciesModel(EntityService entityService) {&lt;br /&gt;       this.entityService = entityService;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   protected String getEntityId() {&lt;br /&gt;       FacesContext context = FacesContext.getCurrentInstance();&lt;br /&gt;       ExternalContext ec = context.getExternalContext();&lt;br /&gt;      &lt;br /&gt;       return ec.getRequestParameterMap().get(ENTITY_ID_QUERY_KEY);&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;So after all, it's pretty simple to have unique url's in a JSF application!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-2288297631524500952?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/2288297631524500952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=2288297631524500952' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/2288297631524500952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/2288297631524500952'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2009/01/jsf-and-restful-urls.html' title='JSF and Restful URL&apos;s'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-5632566777486421373</id><published>2009-01-11T18:56:00.000-08:00</published><updated>2009-01-12T20:59:35.898-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='jsf'/><title type='text'>Spring and JSF</title><content type='html'>I'm currently in need of a solid web framework for building a web application for a client.&lt;br /&gt;I was considering a few different possibilities, one being Ruby on Rails that I mentioned in earlier blog entries. However, I'm currently moving away from that idea for a few reasons. One being that Ruby on Rails still seems to be more of a toy, in comparison to mature web development technologies and there are a few human resourcing issues I need to work with as well. I've decided to put some serious attention into using JavaServer Faces technology for this project.&lt;br /&gt;&lt;br /&gt;As of Java EE 5, JSF is formally a part of the Java EE suite of technologies. There seem to be a good deal of developers out there with knowledge of JSF, and there are a good deal of component libraries that should make web development easier.. Maybe not as easy as the RoR proponents claim, but I'm much happier and comfortable working with a well established and respected framework with a good deal of support available.&lt;br /&gt;&lt;br /&gt;I've had brief looks at JSF in the past, on previous jobs, but I needed to really familiarize myself with it, since I'll need to oversee this project and won't be comfortable without a firm grasp of all technologies that we're going to employ. So, I st arted out reading bits of Core &lt;a href="http://www.amazon.com/Core-JavaServer-Faces-2nd-Sun/dp/0131738860/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1231729347&amp;amp;sr=8-1"&gt;JavaServer™ Faces, Second Edition.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The book got me up to speed pretty quickly, but being a heavy Spring user I at first thought that using it as described by the author might be problematic, since backing beans and other configuration has to be handled within the jsf config descriptor files.. I would prefer to have a heavier integration with Spring because of the flexibility and productivity benefits it brings to the table.&lt;br /&gt;&lt;br /&gt;I did a bit of research and found that it's really easy to integrate spring with JSF. &lt;a href="http://static.springframework.org/spring/docs/2.5.x/reference/web-integration.html#jsf"&gt;Here&lt;/a&gt; are the Spring 2.5.x docs on the JSF integration available. Not too detailed but I put together a working demo application that integrates JSF and spring. Below I provided the XML webapp descriptors you'll need to get the ball rolling completely.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;I use maven, so here's my pom.xml for my demo app:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&amp;lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&amp;gt;&lt;br /&gt;&amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;com.jsf.demo&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;corewebapp&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;packaging&amp;gt;war&amp;lt;/packaging&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;1.0-SNAPSHOT&amp;lt;/version&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;name&amp;gt;corewebapp Maven Webapp&amp;lt;/name&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;dependencies&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;dependency&amp;gt;&lt;br /&gt;     &amp;lt;groupId&amp;gt;javax.faces&amp;lt;/groupId&amp;gt;&lt;br /&gt;     &amp;lt;artifactId&amp;gt;jsf-api&amp;lt;/artifactId&amp;gt;&lt;br /&gt;     &amp;lt;version&amp;gt;1.2&amp;lt;/version&amp;gt;&lt;br /&gt; &amp;lt;/dependency&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;dependency&amp;gt;&lt;br /&gt;     &amp;lt;groupId&amp;gt;javax.faces&amp;lt;/groupId&amp;gt;&lt;br /&gt;     &amp;lt;artifactId&amp;gt;jsf-impl&amp;lt;/artifactId&amp;gt;&lt;br /&gt;     &amp;lt;version&amp;gt;1.2-b19&amp;lt;/version&amp;gt;&lt;br /&gt; &amp;lt;/dependency&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;dependency&amp;gt;&lt;br /&gt;     &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;&lt;br /&gt;     &amp;lt;artifactId&amp;gt;spring-web&amp;lt;/artifactId&amp;gt;&lt;br /&gt;     &amp;lt;version&amp;gt;2.5.6&amp;lt;/version&amp;gt;&lt;br /&gt; &amp;lt;/dependency&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;dependency&amp;gt;&lt;br /&gt;     &amp;lt;groupId&amp;gt;junit&amp;lt;/groupId&amp;gt;&lt;br /&gt;     &amp;lt;artifactId&amp;gt;junit&amp;lt;/artifactId&amp;gt;&lt;br /&gt;     &amp;lt;version&amp;gt;3.8.1&amp;lt;/version&amp;gt;&lt;br /&gt;     &amp;lt;scope&amp;gt;test&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;&lt;br /&gt;&amp;lt;build&amp;gt;&lt;br /&gt; &amp;lt;finalName&amp;gt;corewebapp&amp;lt;/finalName&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;plugins&amp;gt;&lt;br /&gt;     &amp;lt;plugin&amp;gt;&lt;br /&gt;         &amp;lt;groupId&amp;gt;org.mortbay.jetty&amp;lt;/groupId&amp;gt;&lt;br /&gt;         &amp;lt;artifactId&amp;gt;maven-jetty-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;         &amp;lt;version&amp;gt;6.1.12&amp;lt;/version&amp;gt;&lt;br /&gt;         &amp;lt;configuration&amp;gt;&lt;br /&gt;             &amp;lt;systemProperties&amp;gt;&lt;br /&gt;             &amp;lt;/systemProperties&amp;gt;&lt;br /&gt;             &amp;lt;connectors&amp;gt;&lt;br /&gt;                 &amp;lt;connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"&amp;gt;&lt;br /&gt;                     &amp;lt;port&amp;gt;8091&amp;lt;/port&amp;gt;&lt;br /&gt;                     &amp;lt;maxIdleTime&amp;gt;60000&amp;lt;/maxIdleTime&amp;gt;&lt;br /&gt;                 &amp;lt;/connector&amp;gt;&lt;br /&gt;             &amp;lt;/connectors&amp;gt;&lt;br /&gt;         &amp;lt;/configuration&amp;gt;&lt;br /&gt;     &amp;lt;/plugin&amp;gt;&lt;br /&gt; &amp;lt;/plugins&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/build&amp;gt;&lt;br /&gt;&amp;lt;/project&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;My web.xml:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&amp;lt;!DOCTYPE web-app PUBLIC&lt;br /&gt;"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"&lt;br /&gt;"http://java.sun.com/dtd/web-app_2_3.dtd" &amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;web-app&amp;gt;&lt;br /&gt;&amp;lt;display-name&amp;gt;Archetype Created Web Application&amp;lt;/display-name&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- Load Spring Web application context --&amp;gt;&lt;br /&gt;&amp;lt;context-param&amp;gt;&lt;br /&gt;  &amp;lt;param-name&amp;gt;contextConfigLocation&amp;lt;/param-name&amp;gt;&lt;br /&gt;  &amp;lt;param-value&amp;gt;&lt;br /&gt;      classpath:webApplicationContext.xml&lt;br /&gt;  &amp;lt;/param-value&amp;gt;&lt;br /&gt;&amp;lt;/context-param&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- Spring context loader --&amp;gt;&lt;br /&gt;&amp;lt;listener&amp;gt;&lt;br /&gt;  &amp;lt;listener-class&amp;gt;&lt;br /&gt;      org.springframework.web.context.ContextLoaderListener&lt;br /&gt;  &amp;lt;/listener-class&amp;gt;&lt;br /&gt;&amp;lt;/listener&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- JavaServer Faces Servlet --&amp;gt;&lt;br /&gt;&amp;lt;servlet&amp;gt;&lt;br /&gt;  &amp;lt;servlet-name&amp;gt;Faces Servlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;  &amp;lt;servlet-class&amp;gt;javax.faces.webapp.FacesServlet&amp;lt;/servlet-class&amp;gt;&lt;br /&gt;  &amp;lt;load-on-startup&amp;gt;1&amp;lt;/load-on-startup&amp;gt;&lt;br /&gt;&amp;lt;/servlet&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- Map .faces pages to JavaServerFaces system --&amp;gt;&lt;br /&gt;&amp;lt;servlet-mapping&amp;gt;&lt;br /&gt;  &amp;lt;servlet-name&amp;gt;Faces Servlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;  &amp;lt;url-pattern&amp;gt;*.faces&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;&amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;welcome-file-list&amp;gt;&lt;br /&gt;  &amp;lt;welcome-file&amp;gt;index.html&amp;lt;/welcome-file&amp;gt;&lt;br /&gt;&amp;lt;/welcome-file-list&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/web-app&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;my faces-config.xml:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br /&gt;&amp;lt;faces-config 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&lt;br /&gt;   http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"&lt;br /&gt;version="1.2"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;navigation-rule&amp;gt;&lt;br /&gt;   &amp;lt;from-view-id&amp;gt;/index.jsp&amp;lt;/from-view-id&amp;gt;&lt;br /&gt;   &amp;lt;navigation-case&amp;gt;&lt;br /&gt;       &amp;lt;from-outcome&amp;gt;login&amp;lt;/from-outcome&amp;gt;&lt;br /&gt;       &amp;lt;to-view-id&amp;gt;/welcome.jsp&amp;lt;/to-view-id&amp;gt;&lt;br /&gt;   &amp;lt;/navigation-case&amp;gt;&lt;br /&gt;&amp;lt;/navigation-rule&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;application&amp;gt;&lt;br /&gt;   &amp;lt;variable-resolver&amp;gt;&lt;br /&gt;       org.springframework.web.jsf.DelegatingVariableResolver&amp;lt;/variable-resolver&amp;gt;&lt;br /&gt;   &amp;lt;locale-config&amp;gt;&lt;br /&gt;       &amp;lt;default-locale&amp;gt;en&amp;lt;/default-locale&amp;gt;&lt;br /&gt;       &amp;lt;supported-locale&amp;gt;en&amp;lt;/supported-locale&amp;gt;&lt;br /&gt;       &amp;lt;supported-locale&amp;gt;es&amp;lt;/supported-locale&amp;gt;&lt;br /&gt;   &amp;lt;/locale-config&amp;gt;&lt;br /&gt;   &amp;lt;message-bundle&amp;gt;messages&amp;lt;/message-bundle&amp;gt;&lt;br /&gt;&amp;lt;/application&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!--&lt;br /&gt;Managed Beans are in the webApplicationContext.xml since we're using the DelegatingVariableResolver&lt;br /&gt;&lt;br /&gt;&amp;lt;managed-bean&amp;gt;&lt;br /&gt;   &amp;lt;managed-bean-name&amp;gt;user&amp;lt;/managed-bean-name&amp;gt;&lt;br /&gt;   &amp;lt;managed-bean-class&amp;gt;com.jsf.demo.UserBean&amp;lt;/managed-bean-class&amp;gt;&lt;br /&gt;   &amp;lt;managed-bean-scope&amp;gt;session&amp;lt;/managed-bean-scope&amp;gt;&lt;br /&gt;&amp;lt;/managed-bean&amp;gt;&lt;br /&gt;--&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/faces-config&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;And finally my webApplicationContext.xml:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;beans xmlns="http://www.springframework.org/schema/beans"&lt;br /&gt;xmlns:tx="http://www.springframework.org/schema/tx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;xsi:schemaLocation="http://www.springframework.org/schema/beans&lt;br /&gt;                   http://www.springframework.org/schema/beans/spring-beans.xsd&lt;br /&gt;                   http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- JSF beans --&amp;gt;&lt;br /&gt;&amp;lt;bean id="user" class="com.jsf.demo.UserBean" scope="session"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/beans&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;So there you have it. That's all of the configuration you'll need to get a WAR project integrated with Spring and JSF.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-5632566777486421373?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/5632566777486421373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=5632566777486421373' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/5632566777486421373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/5632566777486421373'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2009/01/spring-and-jsf.html' title='Spring and JSF'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-1842251945715821862</id><published>2009-01-06T19:57:00.000-08:00</published><updated>2009-01-08T19:12:18.436-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='learning'/><title type='text'>Technical Videos</title><content type='html'>A friend of mine showed me a really cool site with a bunch of technical videos and presentations.&lt;br /&gt;As a developer that's keen on staying on top of technology, you know very well that the learning never stops.. Sometimes it's nice to watch a video, listen to a presentation.&lt;br /&gt;&lt;br /&gt;Check this place out&lt;br /&gt;&lt;a href="http://www.parleys.com/display/PARLEYS/Home#page=Home"&gt;&lt;br /&gt;http://www.parleys.com/display/PARLEYS/Home#page=Home&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In previous posts I've mentioned the Spring framework a few times.&lt;br /&gt;Parleys has a few presentations i've seen so far that are quite instructive for Spring newbies.&lt;br /&gt;&lt;a href="http://www.parleys.com/display/PARLEYS/Home#title=Spring%20Architectures;talk=20676612;slide=1"&gt;&lt;br /&gt;Presentation: Spring app architecture&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.parleys.com/display/PARLEYS/Home#title=Using%20Spring%20Security%202;talk=19267601;slide=1"&gt;Presentation: Spring Security&lt;/a&gt; -- A great intro to the easy to use security framework for j2ee apps&lt;br /&gt;&lt;br /&gt;Enjoy!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-1842251945715821862?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/1842251945715821862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=1842251945715821862' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/1842251945715821862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/1842251945715821862'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2009/01/technical-videos.html' title='Technical Videos'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-8874552478898286473</id><published>2009-01-01T18:20:00.000-08:00</published><updated>2009-01-05T07:18:59.891-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>Introduction To Ruby on Rails</title><content type='html'>I've been building web applications with java frameworks for a few years and decided that I wanted to look into Ruby on Rails. There has been a good deal of buzz over Ruby on Rails for some time now, and It's often stated that it's super simple to quickly "whip up" a web application with Ruby, much faster than in other frameworks. I want to find out what all the hype is about for myself.&lt;br /&gt;&lt;br /&gt;I've started reading "Agile Web Development with Rails 2nd Edition" by Dave Thomas (Pragmatic Programmer) and David Hansson (father of rails I believe).&lt;br /&gt;&lt;br /&gt;I've just read a little bit of the book and so far so good.&lt;br /&gt;&lt;br /&gt;Rails is an MVC based web application development framework, which uses the Ruby scripting language. Ruby is object oriented and many of its proponents hail it as a super efficiency tool because it favours convention over configuration -- as does Rails as I understand so far, which is supposed to greatly speed up web application development.. Coming from a Java background, I'm hoping this is the case, since even setting up a trivial j2ee web application requires quite a bit of configuration (I usually start with a canned demo I wrote before etc).&lt;br /&gt;&lt;br /&gt;Object Relational Mapping is central to the rails framework and using mapped domain object appears to be very simple, without the verbose configuration you'll have to write in other ORM frameworks. Active Record is the ORM layer provided by Rails. By convention, if you have say a Person class, in RoR it looks like you can call Person.find(id) to get a person instance by that id.. No crazy ORM config required.. Exciting! oh oh, yes I almost forgot to mention that RoR integrates very easily with MySQL right out of the box. A good deal of other DB's are supported such as Db2, Oracle, SQLServer, Postgres but you may need to do a bit more work in order to integrate with these.&lt;br /&gt;&lt;br /&gt;Building views, can be done as simply as with plain HTML files which invoke controllers. Dynamic content can be generated with a templating scheme called RHTML which is HTML that contains embedded Ruby. Another templating scheme mentioned is RXML that allows you to generate XML documents with Ruby code.&lt;br /&gt;&lt;br /&gt;I'm big on IDE's for java development because of the many efficiency features that they bring to the table such as fast refactoring, project management, source control integration, project intelligence and so on. So I was happy to find that there's an eclipse based IDE for Ruby called &lt;a href="http://www.aptana.com/rails"&gt;RadRails&lt;/a&gt;. I'll be learning this, although many Ruby users claim that a text editor with Ruby syntax highlighting is enough (since ruby is alleged to be so simple..) well, whatever, I'll still go with features like refactoring support.. can't live without that kind of stuff these days.&lt;br /&gt;&lt;br /&gt;I was really happy to learn that setting up a Ruby development environment is really simple as well.. And it also comes with an integrated web server, so you don't have to bother installing Apache or whatever, if you don't want to. The integrated Web server WebBrick is apparently fine for local development work.&lt;br /&gt;&lt;br /&gt;Installation essentially consists of 1. Installing the ruby language, 2. installing gems (a package manager for ruby) and 3. installing rails, the web framework.&lt;br /&gt;&lt;br /&gt;Instructions for Mac and Ubuntu can be found &lt;a href="http://wiki.rubyonrails.org/rails/pages/Installation"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In the mean time, I'm going to be writing some demo applications, learning Ruby and familiarizing myself with the framework.&lt;br /&gt;&lt;br /&gt;Happy new year!&lt;br /&gt;&lt;br /&gt;Update: I've found a terrific blog with a tutorial on Rails 2.0. I'm going over it myself and seems fantastic so far&lt;br /&gt;&lt;br /&gt;&lt;a href="http://fairleads.blogspot.com/2008/01/this-is-second-part-of-my-series.html"&gt;http://fairleads.blogspot.com/2008/01/this-is-second-part-of-my-series.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-8874552478898286473?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/8874552478898286473/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=8874552478898286473' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/8874552478898286473'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/8874552478898286473'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2009/01/introduction-to-ruby-on-rails.html' title='Introduction To Ruby on Rails'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-351758428904437035</id><published>2008-12-17T21:32:00.000-08:00</published><updated>2008-12-17T21:36:55.115-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Objective-c iPhone'/><title type='text'>New Gig</title><content type='html'>I spent the last 3 months with a company helping them improve their software development process and modernize their technology. It was a pretty nice place to work, but I've now moved on to a new company that's focusing on the mobile application space.&lt;br /&gt;&lt;br /&gt;I used to work in mobile, a few years ago, and am once again really excited about being back in this space with the emergence of some really cool and capable devices out there.. Not to mention, capable and modern platforms, such as Android.&lt;br /&gt;&lt;br /&gt;Over the next few months I'm going to be learning more about iPhone development in particular.. Kind of exciting! I'll be learning a new language, Objective-C.. I'll probably make some posts on the subject as I wrap my head around this stuff.&lt;br /&gt;&lt;br /&gt;For any mobile application development needs, check out my new company &lt;a href="http://www.briskmobile.com"&gt;www.briskmobile.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-351758428904437035?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/351758428904437035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=351758428904437035' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/351758428904437035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/351758428904437035'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2008/12/new-gig.html' title='New Gig'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-7023413091817056886</id><published>2008-12-09T21:40:00.001-08:00</published><updated>2008-12-09T21:42:39.745-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='examples'/><title type='text'>Spring By Example</title><content type='html'>I've been using Spring for a few years now and just came across an AWESOME webpage!&lt;br /&gt;&lt;br /&gt;The Spring docs are a great, I've been using them as a reference here and there, but I just bumped into a new site 'Spring by Example' that seriously kicks some ass.&lt;br /&gt;&lt;br /&gt;If you ever find yourself rewriting stuff, looking to old code for examples, this site will be super helpful. You'll also find complete example applications you can check out from SVN&lt;br /&gt;&lt;a href="http://www.springbyexample.org/"&gt;&lt;br /&gt;http://www.springbyexample.org/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-7023413091817056886?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/7023413091817056886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=7023413091817056886' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/7023413091817056886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/7023413091817056886'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2008/12/spring-by-example.html' title='Spring By Example'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-3725248190246932086</id><published>2008-12-06T06:24:00.000-08:00</published><updated>2008-12-06T06:33:58.572-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='beginners'/><category scheme='http://www.blogger.com/atom/ns#' term='java literature beginners'/><title type='text'>How to become more "senior"</title><content type='html'>I saw a post on a forum today from someone that was interested in what they could do to fast track themselves into becoming better java developers.&lt;br /&gt;&lt;br /&gt;This obviously takes a lot of time and effort through practice, working on projects and so forth. This is absolutely essential.&lt;br /&gt;&lt;br /&gt;Working on numerous projects, perhaps at numerous organizations in my opinion is likely one way to fast track yourself to seniority. However, not everyone is willing to work as a consultant, or move around frequently enough to build a breadth of experience in such a way.&lt;br /&gt;&lt;br /&gt;A simple answer I would suggest to this person, as a starting point would be to read the following books that I've found very helpful in the past.. And of course, practice practice practice.&lt;br /&gt;&lt;a href="http://www.amazon.com/Pragmatic-Programmer-Journeyman-Master/dp/020161622X/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1228573690&amp;amp;sr=1-1"&gt;&lt;br /&gt;The Pragmatic Programmer&lt;/a&gt; -- A bit old, pre-agile, but provides solid foundations in terms of general development philosophy.&lt;a href="http://www.amazon.com/Software-Development-Principles-Patterns-Practices/dp/0135974445/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1228573769&amp;amp;sr=1-1"&gt;&lt;br /&gt;&lt;br /&gt;Agile Software Development&lt;/a&gt; -- Excellent book on the principles of agile with numerous examples, agile patterns, case studies. I would recommend this book to anyone in the field.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/0321356683/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1228573834&amp;amp;sr=1-1"&gt;Effective Java 2nd Edition&lt;/a&gt; -- Not a good read for someone that needs to learn java first. But terrific for someone that wants to master the ins and outs of java language best practices.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/Head-First-Design-Patterns/dp/0596007124/ref=sr_1_2?ie=UTF8&amp;amp;s=books&amp;amp;qid=1228573895&amp;amp;sr=1-2"&gt;Design Patterns&lt;/a&gt; -- You'll want to be able to speak the language of other developers you work with.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-3725248190246932086?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/3725248190246932086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=3725248190246932086' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/3725248190246932086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/3725248190246932086'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2008/12/how-to-become-more-senior.html' title='How to become more &quot;senior&quot;'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-5739837928630266973</id><published>2008-11-06T19:12:00.000-08:00</published><updated>2009-01-02T07:44:56.012-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='browser incompatable'/><category scheme='http://www.blogger.com/atom/ns#' term='ontario ministry of transport'/><title type='text'>Are you kidding me?</title><content type='html'>I recently tried to change my address on the Ontario Ministry of Transportations website and was directed to 'Service Ontario' in order to proceed with these changes.&lt;br /&gt;&lt;br /&gt;Sadly, because I'm using Linux and Firefox as my web browser, I am not allowed the convenience of changing my personal information online as is given to all other residents of Ontario (who happen to use Internet Explorer I assume).&lt;br /&gt;&lt;br /&gt;As soon as I tried to change my address I got this message:&lt;br /&gt;&lt;br /&gt;The following error(s) occurred:&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;span style="font-size:70;"&gt;E_COM_62&lt;/span&gt;  The ServiceOntario address change cannot be accessed with your browser or browser version.&lt;/p&gt; &lt;p&gt;Please select the ServiceOntario Welcome Page link below to review the minimum browser requirements or other ways to upgrade your browser.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;What a shame.. How lame is that? I'm glad to see that Ontario is spending it's money on top notch software development.&lt;br /&gt;&lt;br /&gt;UPDATE (Fri Nov 7, 08): I received an email from a senior official with Service Ontario who happened to come across this post, indicating that some action will be taken to look into this matter. That was really quick and I'm impressed.&lt;br /&gt;&lt;br /&gt;UPDATE (Fri Jan 2, 09): I'm still waiting for them to remedy this issue. I am no longer impressed and am still having the same problem changing my address with Firefox. How unfortunate.. I guess they aren't very agile there!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-5739837928630266973?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/5739837928630266973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=5739837928630266973' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/5739837928630266973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/5739837928630266973'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2008/11/are-you-kidding-me.html' title='Are you kidding me?'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-5470410089757152377</id><published>2008-10-23T18:38:00.000-07:00</published><updated>2008-10-23T18:58:15.577-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='quality'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><title type='text'>Living in a healthy code base</title><content type='html'>I've recently put a few minutes of thought into how every developer on a team can/should live in a "healthy" code base. By that I mean one which is well designed, easy to extend, easy to test and isn't fragile like a house of cards. Obviously this is the ideal. Such a code base will save an organization a ton of money in the long run. Developers will be more enthusiastic about their work, changes will be made faster, verified faster and so on. The entire software development process, all the way to delivery will be shorter overall, saving an organization enormous amounts of cash.. Developers aren't cheap, so, all development work should be done as efficiently as possible.&lt;br /&gt;&lt;br /&gt;Anyway, there's plenty written about quality code out there, and it's not my intent here to re-enforce the principles of good software design. The point I just want to re-enforce, or express is that good design in an organization requires significant cultural change, if you've inherited, or are now working in an unhealthy code base. We as developers and managers, simply cannot just devote X% of our time to code improvements, refactoring or what have you.. The attention to quality, good design and refactoring has to be ongoing and continuous.. If it isn't something you have in mind and practice at all times, the amount of bad, poorly written, fragile, untestable code will grow at a rate that exceeds the rate at which quality spreads, and we'll end up nowhere. Crap code is like a cancer, it needs to neutralized immediately, or poor quality will inevitably spread.&lt;br /&gt;&lt;br /&gt;In the Pragmatic Programmer, by Andy Hunt and Dave Thomas (not the Wendy's guy) there's an entire section; "Don't live with broken windows".. This idea needs to be understood and accepted by everyone on a team, so that they quickly acknowledge this and develop an enormous distaste for poor quality. Only then, will developers on your team begin to make it an ongoing habit to ALWAYS pay attention to quality and continuously refactor. It never ends.. And it shouldn't, it's just something that I have come to accept and see much value in.. Now another quote comes to mind, I can't remember who stated it, nor do I feel like looking it up right now, but anyway.. Someone said that "Software is all maintenance" .. Or something roughly around those lines. This is absolutely true, and we as developers (developers who actually care) should embrace that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-5470410089757152377?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/5470410089757152377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=5470410089757152377' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/5470410089757152377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/5470410089757152377'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2008/10/living-in-healthy-code-base.html' title='Living in a healthy code base'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-6220358321828373824</id><published>2008-10-12T08:44:00.000-07:00</published><updated>2008-10-12T08:53:30.969-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Viewsonic VX2262WM'/><category scheme='http://www.blogger.com/atom/ns#' term='xorg.conf'/><category scheme='http://www.blogger.com/atom/ns#' term='t61'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>External Monitor xorg.conf for Lenovo t61p</title><content type='html'>If there's one thing I dislike about Linux, it's setting up displays, that don't quite work right away. I find it really frustrating and don't particularly enjoy tweaking things that should just work!&lt;br /&gt;&lt;br /&gt;My PC is a Lenovo t61p running Ubuntu 8.X.. The laptop is equipped with a 1680x1050 display (15.4 WSXGA+ TFT), which works fine after initial installation and setup of the nvidia drivers for the NVIDIA Quadro NVS 140M 128MB.&lt;br /&gt;&lt;br /&gt;I decided to purchase an external display, since I don't particularly enjoy using 1680x1050 on a 15.4 inch monitor for lengthier periods of time. I ended up buying a Viewsonic VX2262WM that does 1680x1050.&lt;br /&gt;&lt;br /&gt;After much hassle and frustration (including numerous Xserver restarts and xorg.conf restorations), I finally got it to work properly, connected to the VGA port of the laptop. Below is my working xorg.conf for this configuration:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;Section "InputDevice"&lt;br /&gt; Identifier    "Generic Keyboard"&lt;br /&gt; Driver        "kbd"&lt;br /&gt; Option        "XkbRules"    "xorg"&lt;br /&gt; Option        "XkbModel"    "pc105"&lt;br /&gt; Option        "XkbLayout"    "us"&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;Section "InputDevice"&lt;br /&gt; Identifier    "Configured Mouse"&lt;br /&gt; Driver        "mouse"&lt;br /&gt; Option        "CorePointer"&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;Section "InputDevice"&lt;br /&gt; Identifier    "Synaptics Touchpad"&lt;br /&gt; Driver        "synaptics"&lt;br /&gt; Option        "SendCoreEvents"    "true"&lt;br /&gt; Option        "Device"    "/dev/psaux"&lt;br /&gt; Option        "Protocol"    "auto-dev"&lt;br /&gt; Option        "HorizEdgeScroll"    "0"&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;Section "Device"&lt;br /&gt; Identifier    "Configured Video Device"&lt;br /&gt; Boardname    "nvidia"&lt;br /&gt; Busid        "PCI:1:0:0"&lt;br /&gt; Driver        "nvidia"&lt;br /&gt; Screen    0&lt;br /&gt; Option        "TwinView"    "on"&lt;br /&gt; Option        "TwinViewOrientation"    "clone"&lt;br /&gt; Option        "SecondMonitorHorizSync"    "31.5-65.5"&lt;br /&gt; Option        "SecondMonitorVertRefresh"    "56.0 - 65.0"&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;Section "Monitor"&lt;br /&gt; Identifier    "Configured Monitor"&lt;br /&gt; Vendorname    "Plug 'n' Play"&lt;br /&gt; Modelname    "Plug 'n' Play"&lt;br /&gt;modeline  "1680x1050@52" 147.14 1680 1784 1968 2256 1050 1051 1054 1087 -hsync +vsync&lt;br /&gt;&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;Section "Screen"&lt;br /&gt; Identifier    "Default Screen"&lt;br /&gt; Monitor        "Configured Monitor"&lt;br /&gt; Device        "Configured Video Device"&lt;br /&gt; Defaultdepth    24&lt;br /&gt; SubSection "Display"&lt;br /&gt;     Depth    24&lt;br /&gt;     Virtual    1680    1050&lt;br /&gt;     Modes        "1680x1050@52"&lt;br /&gt; EndSubSection&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;Section "ServerLayout"&lt;br /&gt; Identifier    "Default Layout"&lt;br /&gt;screen 0 "Default Screen" 0 0&lt;br /&gt; Inputdevice    "Synaptics Touchpad"&lt;br /&gt;EndSection&lt;br /&gt;Section "Module"&lt;br /&gt; Load        "glx"&lt;br /&gt; Load        "v4l"&lt;br /&gt;EndSection&lt;br /&gt;Section "device" #&lt;br /&gt; Identifier    "device1"&lt;br /&gt; Boardname    "nvidia"&lt;br /&gt; Busid        "PCI:1:0:0"&lt;br /&gt; Driver        "nvidia"&lt;br /&gt; Screen    1&lt;br /&gt; Option        "TwinView"    "on"&lt;br /&gt; Option        "TwinViewOrientation"    "clone"&lt;br /&gt; Option        "SecondMonitorHorizSync"    "31.5-65.5"&lt;br /&gt; Option        "SecondMonitorVertRefresh"    "56.0 - 65.0"&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;Section "screen" #&lt;br /&gt; Identifier    "screen1"&lt;br /&gt; Device        "device1"&lt;br /&gt; Defaultdepth    24&lt;br /&gt; Monitor        "monitor1"&lt;br /&gt; SubSection "Display"&lt;br /&gt;     Depth    24&lt;br /&gt;     Modes        "1680x1050@52"    "1600x1024@60"    "1440x900@60"    "1280x800@60"    "1280x720@60"    "1280x768@60"    "800x600@60"    "800x600@56"&lt;br /&gt; EndSubSection&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;Section "monitor" #&lt;br /&gt; Identifier    "monitor1"&lt;br /&gt; Vendorname    "Generic LCD Display"&lt;br /&gt; Modelname    "LCD Panel 1680x1050"&lt;br /&gt; Horizsync    31.5-65.5&lt;br /&gt; Vertrefresh    56.0 - 65.0&lt;br /&gt;modeline  "1680x1050@60" 147.14 1680 1784 1968 2256 1050 1051 1054 1087 -hsync +vsync&lt;br /&gt; Gamma    1.0&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;Section "ServerFlags"&lt;br /&gt;EndSection&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Hope this helps anyone facing a similar problem&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-6220358321828373824?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/6220358321828373824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=6220358321828373824' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/6220358321828373824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/6220358321828373824'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2008/10/external-monitor-xorgconf-for-lenovo.html' title='External Monitor xorg.conf for Lenovo t61p'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-51945502919580579</id><published>2008-10-07T18:53:00.000-07:00</published><updated>2008-10-08T06:45:33.372-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='proguard'/><category scheme='http://www.blogger.com/atom/ns#' term='obfuscation'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><category scheme='http://www.blogger.com/atom/ns#' term='assembly'/><title type='text'>Creating an obfuscated jar with its external dependencies by using the proguard maven plugin and maven assembly plugin</title><content type='html'>Today I was experimenting with the proguard maven plugin (2.0.2) and the maven assembly plugin (2.2-beta-2), using maven 2.0.9 and I discovered a bit of a problem.&lt;br /&gt;&lt;br /&gt;I was trying to obfuscate the classes from one project call it A, which is dependent on another artifact/project call it B (which is not obfuscated). At the same time, I wanted the output from all of this to be a jar file which included the obfuscated classes from A and the non-obfuscated classes from B.&lt;br /&gt;&lt;br /&gt;So my solution to this problem was to use the proguard maven plugin to obfuscate the classes from A, and the maven assembly plugin (configured in A's pom) to create one jar containing all of the classes in one. That is, using the jar-with-dependencies assembly configuraiton.&lt;br /&gt;&lt;br /&gt;So, after thinking about it and reading the proguard and assembly docs, I came up with this POM.xml for Project A:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&amp;lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&amp;gt;&lt;br /&gt;&amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;js&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;A&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;packaging&amp;gt;jar&amp;lt;/packaging&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;1.0-SNAPSHOT&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;name&amp;gt;obfuscatedJar&amp;lt;/name&amp;gt;&lt;br /&gt;&amp;lt;url&amp;gt;http://maven.apache.org&amp;lt;/url&amp;gt;&lt;br /&gt;&amp;lt;build&amp;gt;&lt;br /&gt;&amp;lt;plugins&amp;gt;&lt;br /&gt;   &amp;lt;plugin&amp;gt;&lt;br /&gt;       &amp;lt;groupId&amp;gt;com.pyx4me&amp;lt;/groupId&amp;gt;&lt;br /&gt;       &amp;lt;artifactId&amp;gt;proguard-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;       &amp;lt;executions&amp;gt;&lt;br /&gt;           &amp;lt;execution&amp;gt;&lt;br /&gt;               &amp;lt;phase&amp;gt;package&amp;lt;/phase&amp;gt;&lt;br /&gt;               &amp;lt;goals&amp;gt;&lt;br /&gt;                   &amp;lt;goal&amp;gt;proguard&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;options&amp;gt;&lt;br /&gt;               &amp;lt;option&amp;gt;-dontshrink&amp;lt;/option&amp;gt;&lt;br /&gt;               &amp;lt;option&amp;gt;-dontoptimize&amp;lt;/option&amp;gt;&lt;br /&gt;               &amp;lt;option&amp;gt;-allowaccessmodification&amp;lt;/option&amp;gt;&lt;br /&gt;               &amp;lt;option&amp;gt;-keep class js.Main { *; }&amp;lt;/option&amp;gt;&lt;br /&gt;           &amp;lt;/options&amp;gt;&lt;br /&gt;           &amp;lt;libs&amp;gt;&lt;br /&gt;               &amp;lt;lib&amp;gt;${env.JAVA_HOME}/jre/lib/rt.jar&amp;lt;/lib&amp;gt;&lt;br /&gt;           &amp;lt;/libs&amp;gt;&lt;br /&gt;       &amp;lt;/configuration&amp;gt;&lt;br /&gt;   &amp;lt;/plugin&amp;gt;&lt;br /&gt;   &amp;lt;plugin&amp;gt;&lt;br /&gt;       &amp;lt;artifactId&amp;gt;maven-assembly-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;       &amp;lt;configuration&amp;gt;&lt;br /&gt;           &amp;lt;descriptorRefs&amp;gt;&lt;br /&gt;               &amp;lt;descriptorRef&amp;gt;jar-with-dependencies&amp;lt;/descriptorRef&amp;gt;&lt;br /&gt;           &amp;lt;/descriptorRefs&amp;gt;&lt;br /&gt;           &amp;lt;archive&amp;gt;&lt;br /&gt;               &amp;lt;manifest&amp;gt;&lt;br /&gt;                   &amp;lt;mainClass&amp;gt;js.Main&amp;lt;/mainClass&amp;gt;&lt;br /&gt;               &amp;lt;/manifest&amp;gt;&lt;br /&gt;           &amp;lt;/archive&amp;gt;&lt;br /&gt;       &amp;lt;/configuration&amp;gt;&lt;br /&gt;       &amp;lt;executions&amp;gt;&lt;br /&gt;           &amp;lt;execution&amp;gt;&lt;br /&gt;               &amp;lt;id&amp;gt;make-assembly&amp;lt;/id&amp;gt;&lt;br /&gt;               &amp;lt;phase&amp;gt;package&amp;lt;/phase&amp;gt;&lt;br /&gt;               &amp;lt;goals&amp;gt;&lt;br /&gt;                   &amp;lt;goal&amp;gt;assembly&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;/plugin&amp;gt;&lt;br /&gt;&amp;lt;/plugins&amp;gt;&lt;br /&gt;&amp;lt;/build&amp;gt;&lt;br /&gt;&amp;lt;dependencies&amp;gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;   &amp;lt;groupId&amp;gt;js&amp;lt;/groupId&amp;gt;&lt;br /&gt;   &amp;lt;artifactId&amp;gt;B&amp;lt;/artifactId&amp;gt;&lt;br /&gt;   &amp;lt;version&amp;gt;1.0-SNAPSHOT&amp;lt;/version&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;junit&amp;lt;/groupId&amp;gt;&lt;br /&gt;   &amp;lt;artifactId&amp;gt;junit&amp;lt;/artifactId&amp;gt;&lt;br /&gt;   &amp;lt;version&amp;gt;3.8.1&amp;lt;/version&amp;gt;&lt;br /&gt;   &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;lt;/dependencies&amp;gt;&lt;br /&gt;&amp;lt;/project&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;As you can see by the proguard configuration, project A contained a class called Main that I didn't want obfuscated.. It was just the entry point into the application.. But not terribly important here..&lt;br /&gt;&lt;br /&gt;However, what I found was, Main.class was showing up twice in the final output jar.. For a while I was wondering what the heck was going on and after some frustration I decided to do a bit of digging.&lt;br /&gt;&lt;br /&gt;I pulled up the assembly descriptor (for the jar-with-dependencies assembly)  and found that in its definition,&lt;br /&gt;that it copies files from target/classes into the final jar.  See the jar-with-dependencies xml below:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&amp;lt;assembly&amp;gt;&lt;br /&gt;&amp;lt;id&amp;gt;jar-with-dependencies&amp;lt;/id&amp;gt;&lt;br /&gt;&amp;lt;formats&amp;gt;&lt;br /&gt;&amp;lt;format&amp;gt;jar&amp;lt;/format&amp;gt;&lt;br /&gt;&amp;lt;/formats&amp;gt;&lt;br /&gt;&amp;lt;includeBaseDirectory&amp;gt;false&amp;lt;/includeBaseDirectory&amp;gt;&lt;br /&gt;&amp;lt;dependencySets&amp;gt;&lt;br /&gt;&amp;lt;dependencySet&amp;gt;&lt;br /&gt;&amp;lt;outputDirectory&amp;gt;&amp;lt;/outputDirectory&amp;gt;&lt;br /&gt;&amp;lt;outputFileNameMapping&amp;gt;&amp;lt;/outputFileNameMapping&amp;gt;&lt;br /&gt;&amp;lt;unpack&amp;gt;true&amp;lt;/unpack&amp;gt;&lt;br /&gt;&amp;lt;scope&amp;gt;runtime&amp;lt;/scope&amp;gt;&lt;br /&gt;&amp;lt;/dependencySet&amp;gt;&lt;br /&gt;&amp;lt;/dependencySets&amp;gt;&lt;br /&gt;&amp;lt;fileSets&amp;gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&amp;lt;fileSet&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  &amp;lt;directory&amp;gt;target/classes&amp;lt;/directory&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  &amp;lt;outputDirectory&amp;gt;&amp;lt;/outputDirectory&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&amp;lt;/fileSet&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;/fileSets&amp;gt;&lt;br /&gt;&amp;lt;/assembly&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The solution to my problem was to create an assembly.xml file at project A's root level, and comment out the fileset pointing to target/classes.. Simple enough, you can see the change below -- assembly.xml:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&amp;lt;assembly&amp;gt;&lt;br /&gt;&amp;lt;id&amp;gt;jar-with-dependencies&amp;lt;/id&amp;gt;&lt;br /&gt;&amp;lt;formats&amp;gt;&lt;br /&gt;&amp;lt;format&amp;gt;jar&amp;lt;/format&amp;gt;&lt;br /&gt;&amp;lt;/formats&amp;gt;&lt;br /&gt;&amp;lt;includeBaseDirectory&amp;gt;false&amp;lt;/includeBaseDirectory&amp;gt;&lt;br /&gt;&amp;lt;dependencySets&amp;gt;&lt;br /&gt;&amp;lt;dependencySet&amp;gt;&lt;br /&gt;&amp;lt;outputDirectory&amp;gt;&amp;lt;/outputDirectory&amp;gt;&lt;br /&gt;&amp;lt;outputFileNameMapping&amp;gt;&amp;lt;/outputFileNameMapping&amp;gt;&lt;br /&gt;&amp;lt;unpack&amp;gt;true&amp;lt;/unpack&amp;gt;&lt;br /&gt;&amp;lt;scope&amp;gt;runtime&amp;lt;/scope&amp;gt;&lt;br /&gt;&amp;lt;/dependencySet&amp;gt;&lt;br /&gt;&amp;lt;/dependencySets&amp;gt;&lt;br /&gt;&amp;lt;fileSets&amp;gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&amp;lt;!--&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; &amp;lt;fileSet&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   &amp;lt;directory&amp;gt;target/classes&amp;lt;/directory&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   &amp;lt;outputDirectory&amp;gt;&amp;lt;/outputDirectory&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; &amp;lt;/fileSet&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;--&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;/fileSets&amp;gt;&lt;br /&gt;&amp;lt;/assembly&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Now, one final change, I just configured the assembly plugin to point to the new descriptor.. Nothing crazy here, it's quite typical to write your own assembly descriptors.. In this case though, I just modified a canned descriptor.. Here is my resulting pom.xml from project A:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&amp;lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&amp;gt;&lt;br /&gt;&amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;js&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;A&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;packaging&amp;gt;jar&amp;lt;/packaging&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;1.0-SNAPSHOT&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;name&amp;gt;obfuscatedJar&amp;lt;/name&amp;gt;&lt;br /&gt;&amp;lt;url&amp;gt;http://maven.apache.org&amp;lt;/url&amp;gt;&lt;br /&gt;&amp;lt;build&amp;gt;&lt;br /&gt;  &amp;lt;plugins&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;      &amp;lt;plugin&amp;gt;&lt;br /&gt;          &amp;lt;groupId&amp;gt;com.pyx4me&amp;lt;/groupId&amp;gt;&lt;br /&gt;          &amp;lt;artifactId&amp;gt;proguard-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;          &amp;lt;executions&amp;gt;&lt;br /&gt;              &amp;lt;execution&amp;gt;&lt;br /&gt;                  &amp;lt;phase&amp;gt;package&amp;lt;/phase&amp;gt;&lt;br /&gt;                  &amp;lt;goals&amp;gt;&lt;br /&gt;                      &amp;lt;goal&amp;gt;proguard&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;options&amp;gt;&lt;br /&gt;                  &amp;lt;option&amp;gt;-dontshrink&amp;lt;/option&amp;gt;&lt;br /&gt;                  &amp;lt;option&amp;gt;-dontoptimize&amp;lt;/option&amp;gt;&lt;br /&gt;                  &amp;lt;option&amp;gt;-allowaccessmodification&amp;lt;/option&amp;gt;&lt;br /&gt;                  &amp;lt;option&amp;gt;-keep class js.Main { *; }&amp;lt;/option&amp;gt;&lt;br /&gt;              &amp;lt;/options&amp;gt;&lt;br /&gt;              &amp;lt;libs&amp;gt;&lt;br /&gt;                  &amp;lt;lib&amp;gt;${env.JAVA_HOME}/jre/lib/rt.jar&amp;lt;/lib&amp;gt;&lt;br /&gt;              &amp;lt;/libs&amp;gt;&lt;br /&gt;          &amp;lt;/configuration&amp;gt;&lt;br /&gt;      &amp;lt;/plugin&amp;gt;&lt;br /&gt;&lt;br /&gt;      &amp;lt;plugin&amp;gt;&lt;br /&gt;          &amp;lt;artifactId&amp;gt;maven-assembly-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;          &amp;lt;configuration&amp;gt;&lt;br /&gt;              &lt;span style="font-weight: bold;"&gt;&amp;lt;descriptors&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;                      &amp;lt;descriptor&amp;gt;assembly.xml&amp;lt;/descriptor&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;                    &amp;lt;/descriptors&amp;gt;&lt;/span&gt;&lt;br /&gt;              &amp;lt;archive&amp;gt;&lt;br /&gt;                  &amp;lt;manifest&amp;gt;&lt;br /&gt;                      &amp;lt;mainClass&amp;gt;js.Main&amp;lt;/mainClass&amp;gt;&lt;br /&gt;                  &amp;lt;/manifest&amp;gt;&lt;br /&gt;              &amp;lt;/archive&amp;gt;&lt;br /&gt;          &amp;lt;/configuration&amp;gt;&lt;br /&gt;          &amp;lt;executions&amp;gt;&lt;br /&gt;              &amp;lt;execution&amp;gt;&lt;br /&gt;                  &amp;lt;id&amp;gt;make-assembly&amp;lt;/id&amp;gt;&lt;br /&gt;                  &amp;lt;phase&amp;gt;package&amp;lt;/phase&amp;gt;&lt;br /&gt;                  &amp;lt;goals&amp;gt;&lt;br /&gt;                      &amp;lt;goal&amp;gt;assembly&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;/plugin&amp;gt;&lt;br /&gt;  &amp;lt;/plugins&amp;gt;&lt;br /&gt;&amp;lt;/build&amp;gt;&lt;br /&gt;&amp;lt;dependencies&amp;gt;&lt;br /&gt;  &amp;lt;dependency&amp;gt;&lt;br /&gt;      &amp;lt;groupId&amp;gt;js&amp;lt;/groupId&amp;gt;&lt;br /&gt;      &amp;lt;artifactId&amp;gt;B&amp;lt;/artifactId&amp;gt;&lt;br /&gt;      &amp;lt;version&amp;gt;1.0-SNAPSHOT&amp;lt;/version&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;junit&amp;lt;/groupId&amp;gt;&lt;br /&gt;      &amp;lt;artifactId&amp;gt;junit&amp;lt;/artifactId&amp;gt;&lt;br /&gt;      &amp;lt;version&amp;gt;3.8.1&amp;lt;/version&amp;gt;&lt;br /&gt;      &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;&lt;br /&gt;  &amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;lt;/dependencies&amp;gt;&lt;br /&gt;&amp;lt;/project&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;So, with these changes I can successfuly now produce a jar containing obfuscated code from project A that includes packages and classes from project B.. Have a look at the executions sections in the pom. you'll see that all of this is done during the packaging phase.&lt;br /&gt;&lt;br /&gt;Cheers&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-51945502919580579?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/51945502919580579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=51945502919580579' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/51945502919580579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/51945502919580579'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2008/10/creating-obfuscated-jar-with-its.html' title='Creating an obfuscated jar with its external dependencies by using the proguard maven plugin and maven assembly plugin'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-7913488221065115495</id><published>2008-10-07T18:33:00.000-07:00</published><updated>2009-01-01T18:34:09.423-08:00</updated><title type='text'>Problem with using proguard-maven-plugin and maven-assembly-plugin</title><content type='html'>Today I was experimenting with the proguard maven plugin and the maven assembly plugin and I discovered a bit of a problem.&lt;br /&gt;&lt;br /&gt;I was trying to obfuscate the classes from one project call it A, which is dependent on another artifact/project call it B (which is not obfuscated). At the same time, I wanted the output from all of this to be a jar file which included the obfuscated classes from A and the non-obfuscated classes from B.&lt;br /&gt;&lt;br /&gt;So my solution to this problem was to use the proguard maven plugin to obfuscate the classes from A, and the maven assembly plugin (configured in A's pom) to create one jar containing all of the classes in one. That is, using the jar-with-dependencies assembly configuraiton.&lt;br /&gt;&lt;br /&gt;So, after thinking about it and reading the proguard and assembly docs, I came up with this POM.xml for Project A:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&amp;lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&amp;gt;&lt;br /&gt;&amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;js&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;A&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;packaging&amp;gt;jar&amp;lt;/packaging&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;1.0-SNAPSHOT&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;name&amp;gt;obfuscatedJar&amp;lt;/name&amp;gt;&lt;br /&gt;&amp;lt;url&amp;gt;http://maven.apache.org&amp;lt;/url&amp;gt;&lt;br /&gt;&amp;lt;build&amp;gt;&lt;br /&gt;  &amp;lt;plugins&amp;gt;&lt;br /&gt;      &amp;lt;plugin&amp;gt;&lt;br /&gt;          &amp;lt;groupId&amp;gt;com.pyx4me&amp;lt;/groupId&amp;gt;&lt;br /&gt;          &amp;lt;artifactId&amp;gt;proguard-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;          &amp;lt;executions&amp;gt;&lt;br /&gt;              &amp;lt;execution&amp;gt;&lt;br /&gt;                  &amp;lt;phase&amp;gt;package&amp;lt;/phase&amp;gt;&lt;br /&gt;                  &amp;lt;goals&amp;gt;&lt;br /&gt;                      &amp;lt;goal&amp;gt;proguard&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;options&amp;gt;&lt;br /&gt;                  &amp;lt;option&amp;gt;-dontshrink&amp;lt;/option&amp;gt;&lt;br /&gt;                  &amp;lt;option&amp;gt;-dontoptimize&amp;lt;/option&amp;gt;&lt;br /&gt;                  &amp;lt;option&amp;gt;-allowaccessmodification&amp;lt;/option&amp;gt;&lt;br /&gt;                  &amp;lt;option&amp;gt;-keep class js.Main { *; }&amp;lt;/option&amp;gt;&lt;br /&gt;              &amp;lt;/options&amp;gt;&lt;br /&gt;              &amp;lt;libs&amp;gt;&lt;br /&gt;                  &amp;lt;lib&amp;gt;${env.JAVA_HOME}/jre/lib/rt.jar&amp;lt;/lib&amp;gt;&lt;br /&gt;              &amp;lt;/libs&amp;gt;&lt;br /&gt;          &amp;lt;/configuration&amp;gt;&lt;br /&gt;      &amp;lt;/plugin&amp;gt;&lt;br /&gt;      &amp;lt;plugin&amp;gt;&lt;br /&gt;          &amp;lt;artifactId&amp;gt;maven-assembly-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;          &amp;lt;configuration&amp;gt;&lt;br /&gt;              &amp;lt;descriptorRefs&amp;gt;&lt;br /&gt;                  &amp;lt;descriptorRef&amp;gt;jar-with-dependencies&amp;lt;/descriptorRef&amp;gt;&lt;br /&gt;              &amp;lt;/descriptorRefs&amp;gt;&lt;br /&gt;              &amp;lt;archive&amp;gt;&lt;br /&gt;                  &amp;lt;manifest&amp;gt;&lt;br /&gt;                      &amp;lt;mainClass&amp;gt;js.Main&amp;lt;/mainClass&amp;gt;&lt;br /&gt;                  &amp;lt;/manifest&amp;gt;&lt;br /&gt;              &amp;lt;/archive&amp;gt;&lt;br /&gt;          &amp;lt;/configuration&amp;gt;&lt;br /&gt;          &amp;lt;executions&amp;gt;&lt;br /&gt;              &amp;lt;execution&amp;gt;&lt;br /&gt;                  &amp;lt;id&amp;gt;make-assembly&amp;lt;/id&amp;gt;&lt;br /&gt;                  &amp;lt;phase&amp;gt;package&amp;lt;/phase&amp;gt;&lt;br /&gt;                  &amp;lt;goals&amp;gt;&lt;br /&gt;                      &amp;lt;goal&amp;gt;assembly&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;/plugin&amp;gt;&lt;br /&gt;  &amp;lt;/plugins&amp;gt;&lt;br /&gt;&amp;lt;/build&amp;gt;&lt;br /&gt;&amp;lt;dependencies&amp;gt;&lt;br /&gt;  &amp;lt;dependency&amp;gt;&lt;br /&gt;      &amp;lt;groupId&amp;gt;js&amp;lt;/groupId&amp;gt;&lt;br /&gt;      &amp;lt;artifactId&amp;gt;B&amp;lt;/artifactId&amp;gt;&lt;br /&gt;      &amp;lt;version&amp;gt;1.0-SNAPSHOT&amp;lt;/version&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;junit&amp;lt;/groupId&amp;gt;&lt;br /&gt;      &amp;lt;artifactId&amp;gt;junit&amp;lt;/artifactId&amp;gt;&lt;br /&gt;      &amp;lt;version&amp;gt;3.8.1&amp;lt;/version&amp;gt;&lt;br /&gt;      &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;&lt;br /&gt;  &amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;lt;/dependencies&amp;gt;&lt;br /&gt;&amp;lt;/project&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;As you can see by the proguard configuration, project A contained a class called Main that I didn't want obfuscated.. It was just the entry point into the application.. But not terribly important here..&lt;br /&gt;&lt;br /&gt;However, what I found was, Main.class was showing up twice in the final output jar.. For a while I was wondering what the heck was going on and after some frustration I decided to do a bit of digging.&lt;br /&gt;&lt;br /&gt;I pulled up the assembly descriptor (for the jar-with-dependencies assembly)  and found that in its definition,&lt;br /&gt;that it copies files from target/classes into the final jar.  See the jar-with-dependencies xml below:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&amp;lt;assembly&amp;gt;&lt;br /&gt;&amp;lt;id&amp;gt;jar-with-dependencies&amp;lt;/id&amp;gt;&lt;br /&gt;&amp;lt;formats&amp;gt;&lt;br /&gt;&amp;lt;format&amp;gt;jar&amp;lt;/format&amp;gt;&lt;br /&gt;&amp;lt;/formats&amp;gt;&lt;br /&gt;&amp;lt;includeBaseDirectory&amp;gt;false&amp;lt;/includeBaseDirectory&amp;gt;&lt;br /&gt;&amp;lt;dependencySets&amp;gt;&lt;br /&gt;&amp;lt;dependencySet&amp;gt;&lt;br /&gt; &amp;lt;outputDirectory&amp;gt;&amp;lt;/outputDirectory&amp;gt;&lt;br /&gt; &amp;lt;outputFileNameMapping&amp;gt;&amp;lt;/outputFileNameMapping&amp;gt;&lt;br /&gt; &amp;lt;unpack&amp;gt;true&amp;lt;/unpack&amp;gt;&lt;br /&gt; &amp;lt;scope&amp;gt;runtime&amp;lt;/scope&amp;gt;&lt;br /&gt;&amp;lt;/dependencySet&amp;gt;&lt;br /&gt;&amp;lt;/dependencySets&amp;gt;&lt;br /&gt;&amp;lt;fileSets&amp;gt;&lt;br /&gt;&amp;lt;fileSet&amp;gt;&lt;br /&gt; &amp;lt;directory&amp;gt;target/classes&amp;lt;/directory&amp;gt;&lt;br /&gt; &amp;lt;outputDirectory&amp;gt;&amp;lt;/outputDirectory&amp;gt;&lt;br /&gt;&amp;lt;/fileSet&amp;gt;&lt;br /&gt;&amp;lt;/fileSets&amp;gt;&lt;br /&gt;&amp;lt;/assembly&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The solution to my problem was to create an assembly.xml file at project A's root level, and comment out the fileset pointing to target/classes.. Simple enough, you can see the change below -- assembly.xml:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&amp;lt;assembly&amp;gt;&lt;br /&gt;&amp;lt;id&amp;gt;jar-with-dependencies&amp;lt;/id&amp;gt;&lt;br /&gt;&amp;lt;formats&amp;gt;&lt;br /&gt;&amp;lt;format&amp;gt;jar&amp;lt;/format&amp;gt;&lt;br /&gt;&amp;lt;/formats&amp;gt;&lt;br /&gt;&amp;lt;includeBaseDirectory&amp;gt;false&amp;lt;/includeBaseDirectory&amp;gt;&lt;br /&gt;&amp;lt;dependencySets&amp;gt;&lt;br /&gt;&amp;lt;dependencySet&amp;gt;&lt;br /&gt;  &amp;lt;outputDirectory&amp;gt;&amp;lt;/outputDirectory&amp;gt;&lt;br /&gt;  &amp;lt;outputFileNameMapping&amp;gt;&amp;lt;/outputFileNameMapping&amp;gt;&lt;br /&gt;  &amp;lt;unpack&amp;gt;true&amp;lt;/unpack&amp;gt;&lt;br /&gt;  &amp;lt;scope&amp;gt;runtime&amp;lt;/scope&amp;gt;&lt;br /&gt;&amp;lt;/dependencySet&amp;gt;&lt;br /&gt;&amp;lt;/dependencySets&amp;gt;&lt;br /&gt;&amp;lt;fileSets&amp;gt;&lt;br /&gt;&amp;lt;!--&lt;br /&gt;&amp;lt;fileSet&amp;gt;&lt;br /&gt;  &amp;lt;directory&amp;gt;target/classes&amp;lt;/directory&amp;gt;&lt;br /&gt;  &amp;lt;outputDirectory&amp;gt;&amp;lt;/outputDirectory&amp;gt;&lt;br /&gt;&amp;lt;/fileSet&amp;gt;&lt;br /&gt;--&amp;gt;&lt;br /&gt;&amp;lt;/fileSets&amp;gt;&lt;br /&gt;&amp;lt;/assembly&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Now, one final change, I just configured the assembly plugin to point to the new descriptor.. Nothing crazy here, it's quite typical to write your own assembly descriptors.. In this case though, I just modified a canned descriptor.. Here is my resulting pom.xml from project A:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&amp;lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&amp;gt;&lt;br /&gt; &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;&lt;br /&gt; &amp;lt;groupId&amp;gt;js&amp;lt;/groupId&amp;gt;&lt;br /&gt; &amp;lt;artifactId&amp;gt;A&amp;lt;/artifactId&amp;gt;&lt;br /&gt; &amp;lt;packaging&amp;gt;jar&amp;lt;/packaging&amp;gt;&lt;br /&gt; &amp;lt;version&amp;gt;1.0-SNAPSHOT&amp;lt;/version&amp;gt;&lt;br /&gt; &amp;lt;name&amp;gt;obfuscatedJar&amp;lt;/name&amp;gt;&lt;br /&gt; &amp;lt;url&amp;gt;http://maven.apache.org&amp;lt;/url&amp;gt;&lt;br /&gt; &amp;lt;build&amp;gt;&lt;br /&gt;     &amp;lt;plugins&amp;gt;&lt;br /&gt;      &lt;br /&gt;      &lt;br /&gt;         &amp;lt;plugin&amp;gt;&lt;br /&gt;             &amp;lt;groupId&amp;gt;com.pyx4me&amp;lt;/groupId&amp;gt;&lt;br /&gt;             &amp;lt;artifactId&amp;gt;proguard-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;             &amp;lt;executions&amp;gt;&lt;br /&gt;                 &amp;lt;execution&amp;gt;&lt;br /&gt;                     &amp;lt;phase&amp;gt;package&amp;lt;/phase&amp;gt;&lt;br /&gt;                     &amp;lt;goals&amp;gt;&lt;br /&gt;                         &amp;lt;goal&amp;gt;proguard&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;options&amp;gt;&lt;br /&gt;                     &amp;lt;option&amp;gt;-dontshrink&amp;lt;/option&amp;gt;&lt;br /&gt;                     &amp;lt;option&amp;gt;-dontoptimize&amp;lt;/option&amp;gt;&lt;br /&gt;                     &amp;lt;option&amp;gt;-allowaccessmodification&amp;lt;/option&amp;gt;&lt;br /&gt;                     &amp;lt;option&amp;gt;-keep class js.Main { *; }&amp;lt;/option&amp;gt;&lt;br /&gt;                 &amp;lt;/options&amp;gt;&lt;br /&gt;                 &amp;lt;libs&amp;gt;&lt;br /&gt;                     &amp;lt;lib&amp;gt;${env.JAVA_HOME}/jre/lib/rt.jar&amp;lt;/lib&amp;gt;&lt;br /&gt;                 &amp;lt;/libs&amp;gt;&lt;br /&gt;             &amp;lt;/configuration&amp;gt;&lt;br /&gt;         &amp;lt;/plugin&amp;gt;&lt;br /&gt;      &lt;br /&gt;         &amp;lt;plugin&amp;gt;&lt;br /&gt;             &amp;lt;artifactId&amp;gt;maven-assembly-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;             &amp;lt;configuration&amp;gt;&lt;br /&gt;                 &amp;lt;descriptors&amp;gt;&lt;br /&gt;                     &amp;lt;descriptor&amp;gt;assembly.xml&amp;lt;/descriptor&amp;gt;&lt;br /&gt;                   &amp;lt;/descriptors&amp;gt;&lt;br /&gt;                 &amp;lt;archive&amp;gt;&lt;br /&gt;                     &amp;lt;manifest&amp;gt;&lt;br /&gt;                         &amp;lt;mainClass&amp;gt;js.Main&amp;lt;/mainClass&amp;gt;&lt;br /&gt;                     &amp;lt;/manifest&amp;gt;&lt;br /&gt;                 &amp;lt;/archive&amp;gt;&lt;br /&gt;             &amp;lt;/configuration&amp;gt;&lt;br /&gt;             &amp;lt;executions&amp;gt;&lt;br /&gt;                 &amp;lt;execution&amp;gt;&lt;br /&gt;                     &amp;lt;id&amp;gt;make-assembly&amp;lt;/id&amp;gt;&lt;br /&gt;                     &amp;lt;phase&amp;gt;package&amp;lt;/phase&amp;gt;&lt;br /&gt;                     &amp;lt;goals&amp;gt;&lt;br /&gt;                         &amp;lt;goal&amp;gt;assembly&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;/plugin&amp;gt;&lt;br /&gt;     &amp;lt;/plugins&amp;gt;&lt;br /&gt; &amp;lt;/build&amp;gt;&lt;br /&gt; &amp;lt;dependencies&amp;gt;&lt;br /&gt;     &amp;lt;dependency&amp;gt;&lt;br /&gt;         &amp;lt;groupId&amp;gt;js&amp;lt;/groupId&amp;gt;&lt;br /&gt;         &amp;lt;artifactId&amp;gt;B&amp;lt;/artifactId&amp;gt;&lt;br /&gt;         &amp;lt;version&amp;gt;1.0-SNAPSHOT&amp;lt;/version&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;junit&amp;lt;/groupId&amp;gt;&lt;br /&gt;         &amp;lt;artifactId&amp;gt;junit&amp;lt;/artifactId&amp;gt;&lt;br /&gt;         &amp;lt;version&amp;gt;3.8.1&amp;lt;/version&amp;gt;&lt;br /&gt;         &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;&lt;br /&gt;     &amp;lt;/dependency&amp;gt;&lt;br /&gt; &amp;lt;/dependencies&amp;gt;&lt;br /&gt;&amp;lt;/project&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;So, with these changes I can successfuly now produce a jar containing obfuscated code from project A that includes packages and classes from project B.. Have a look at the executions sections in the pom. you'll see that all of this is done during the packaging phase.&lt;br /&gt;&lt;br /&gt;Cheers&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-7913488221065115495?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/7913488221065115495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=7913488221065115495' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/7913488221065115495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/7913488221065115495'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2008/10/problem-with-using-proguard-maven.html' title='Problem with using proguard-maven-plugin and maven-assembly-plugin'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-4574643995028995121</id><published>2008-10-05T18:59:00.000-07:00</published><updated>2008-10-07T19:01:29.175-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='repository'/><category scheme='http://www.blogger.com/atom/ns#' term='artifactory'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><title type='text'>5 minute Artifactory HOWTO</title><content type='html'>If you're using maven to manage your project construction and life-cycle, chances are that your organization maintains it's own internal artifact repository. You'll likely maintain a repository which is in sync with ibiblio and also have repositories for storing internal snapshots and versioned releases of your software.&lt;br /&gt;&lt;br /&gt;Setting up a repository can be accomplished without much of a challenge using &lt;a href="http://www.jfrog.org/sites/artifactory/latest/index.html"&gt;Artifactory. &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In this post i'll quickly  show you how to setup an internal repository using usable default settings, as  I first did when I began experimenting with Artifactory.  Following, is a basic set of instructions so that you can get on your feet within 5 minutes.&lt;br /&gt;&lt;br /&gt;Once you're finished, you'll have your own internal organizational repository for mirroring ibiblio, storing internal snapshots and storing internal releases.&lt;br /&gt;&lt;br /&gt;First, download Artifactory. Easy enough. Grab the zip distribution and unpack it somewhere.&lt;br /&gt;You'll want to set an environment variable ARTIFACTORY_HOME to point to the location you unpacked it in.&lt;br /&gt;&lt;br /&gt;If you have tomcat or jetty running (or some other servlet container) copy $ARTIFACTORY_HOME/webapps/artifactory.war to the deployment directory of your web container. Start up your webcontainer, and you'll have artifactory running! The default settings are pretty good, and you can pretty much use these out of the box. However, if you'd like to tweak them, you can edit $ARTIFACTORY_HOME/artifactory.config.xml to change repository configuration.&lt;br /&gt;&lt;br /&gt;Now, that was pretty easy.. Artifactory is up and running.. You'll now need to configure maven to use your new repository.&lt;br /&gt;&lt;br /&gt;I created a maven project just to test it out.. Here's a snippet from my pom.xml which contains configuration required to use my new repository:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;    &amp;lt;repositories&amp;gt;&lt;br /&gt;    &amp;lt;repository&amp;gt;&lt;br /&gt;        &amp;lt;id&amp;gt;central&amp;lt;/id&amp;gt;&lt;br /&gt;        &amp;lt;url&amp;gt;http://localhost:8080/artifactory/repo&amp;lt;/url&amp;gt;&lt;br /&gt;        &amp;lt;snapshots&amp;gt;&lt;br /&gt;            &amp;lt;enabled&amp;gt;false&amp;lt;/enabled&amp;gt;&lt;br /&gt;        &amp;lt;/snapshots&amp;gt;&lt;br /&gt;    &amp;lt;/repository&amp;gt;&lt;br /&gt;    &amp;lt;repository&amp;gt;&lt;br /&gt;        &amp;lt;id&amp;gt;snapshots&amp;lt;/id&amp;gt;&lt;br /&gt;        &amp;lt;url&amp;gt;http://localhost:8080/artifactory/repo&amp;lt;/url&amp;gt;&lt;br /&gt;        &amp;lt;releases&amp;gt;&lt;br /&gt;            &amp;lt;enabled&amp;gt;false&amp;lt;/enabled&amp;gt;&lt;br /&gt;        &amp;lt;/releases&amp;gt;&lt;br /&gt;    &amp;lt;/repository&amp;gt;&lt;br /&gt;    &amp;lt;repository&amp;gt;&lt;br /&gt;        &amp;lt;id&amp;gt;releases&amp;lt;/id&amp;gt;&lt;br /&gt;        &amp;lt;url&amp;gt;http://localhost:8080/artifactory/repo&amp;lt;/url&amp;gt;&lt;br /&gt;        &amp;lt;releases&amp;gt;&lt;br /&gt;            &amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;&lt;br /&gt;        &amp;lt;/releases&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;Now unfortunately that's not all ;) You'll need to add a distribution management piece to your pom.xml so that you can deploy snapshots and releases into your repo.. So add this to your pom.xml as well:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;    &amp;lt;distributionManagement&amp;gt;&lt;br /&gt;     &amp;lt;snapshotRepository&amp;gt;&lt;br /&gt;         &amp;lt;id&amp;gt;snapshots&amp;lt;/id&amp;gt;&lt;br /&gt;         &amp;lt;url&amp;gt;dav:http://localhost:8080/artifactory/libs-snapshots-local&amp;lt;/url&amp;gt;&lt;br /&gt;     &amp;lt;/snapshotRepository&amp;gt;&lt;br /&gt;     &amp;lt;repository&amp;gt;&lt;br /&gt;         &amp;lt;id&amp;gt;releases&amp;lt;/id&amp;gt;&lt;br /&gt;         &amp;lt;url&amp;gt;dav:http://localhost:8080/artifactory/libs-releases-local&amp;lt;/url&amp;gt;&lt;br /&gt;     &amp;lt;/repository&amp;gt;&lt;br /&gt; &amp;lt;/distributionManagement&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Now, the last bit to get all set up, a bit nasty in my opinion.. You'll have to edit your maven settingx.xml file located at $MAVEN_HOME/conf/settings.xml. We'll need to add server entries that match the id's of the snapshot and release entries we've added to the distribution management section. This is required for authentication, so that artifacts can be deployed to your repository. Add the following to settings.xml:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;    &amp;lt;server&amp;gt;&lt;br /&gt;      &amp;lt;id&amp;gt;snapshots&amp;lt;/id&amp;gt;&lt;br /&gt;      &amp;lt;username&amp;gt;admin&amp;lt;/username&amp;gt;&lt;br /&gt;      &amp;lt;password&amp;gt;password&amp;lt;/password&amp;gt;&lt;br /&gt;  &amp;lt;/server&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;server&amp;gt;&lt;br /&gt;      &amp;lt;id&amp;gt;releases&amp;lt;/id&amp;gt;&lt;br /&gt;      &amp;lt;username&amp;gt;admin&amp;lt;/username&amp;gt;&lt;br /&gt;      &amp;lt;password&amp;gt;password&amp;lt;/password&amp;gt;&lt;br /&gt;  &amp;lt;/server&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The user name and password are out of the box artifactory credentials.&lt;br /&gt;&lt;br /&gt;You're all good to go.. Now you have artifactory up and running, and a maven project configured to use that repository to retrieve artifacts, and to deploy snapshots and releases that your project produces.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.jfrog.org/sites/artifactory/latest/index.html"&gt;&lt;span style="display: block;" id="formatbar_Buttons"&gt;&lt;span class="on down" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-4574643995028995121?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/4574643995028995121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=4574643995028995121' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/4574643995028995121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/4574643995028995121'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2008/10/5-minute-artifactory-howto.html' title='5 minute Artifactory HOWTO'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-8980686065630389753</id><published>2008-09-17T19:40:00.000-07:00</published><updated>2008-09-17T19:54:08.847-07:00</updated><title type='text'>Old School</title><content type='html'>So I'm workin' on a new project. Getting used to the new project the last little while and intently reading "Cryptonomicon" by Neil Stevenson in my spare time. So haven't had much time to post anything here lately.&lt;br /&gt;&lt;br /&gt;Due to some limitations on my current project, I am back to using Java 1.4 .. Takes some getting used to after using 1.5 for what seems like forever now. Oh man, and that means Junit 3 as well :( Kickin' er oldschool!&lt;br /&gt;&lt;br /&gt;I've also started working with a new continuous integration system called &lt;a href="https://hudson.dev.java.net/"&gt;Hudson&lt;/a&gt;. It's an open source project that's surprisingly simple to use. It doesn't seem to have as many features as &lt;a href="http://www.atlassian.com/software/bamboo/"&gt;Bamboo&lt;/a&gt; which I have been using for over a year now, but the setup is extremely quick and simple.. ohh and yeah, unlike Bamboo it's free..  Anyone can get CI going on their project in no time! I seriously spent only like 10 mins downloading it, setting it up to run on &lt;a href="http://www.mortbay.org/jetty/"&gt;Jetty &lt;/a&gt;and getting an automated build going..&lt;br /&gt;&lt;br /&gt;yawn.. Feeling a bit lazy.. Back to reading Cryptonomicon!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-8980686065630389753?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/8980686065630389753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=8980686065630389753' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/8980686065630389753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/8980686065630389753'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2008/09/old-school.html' title='Old School'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-3142453897141877138</id><published>2008-08-22T11:41:00.000-07:00</published><updated>2008-08-22T12:13:44.614-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><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='multiple tables'/><title type='text'>Mapping entities to multiple tables with hibernate + JPA</title><content type='html'>I wanted to make a post about an issue that I solved this week relating to Hibernate entities. Not sure if this was the most perfect solution, but it worked well.&lt;br /&gt;&lt;br /&gt;A bit of background.. I was working on a casino gaming platform and one particular game i was working on required persistence. A number of entities were being mapped to relational database tables with Hibernate, using Spring's &lt;a href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/orm/hibernate3/annotation/AnnotationSessionFactoryBean.html"&gt;org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean&lt;/a&gt;. We were using JPA annotations, where each entity class declared the table it was to be mapped to. This is great, if you're only mapping the entity to one table!&lt;br /&gt;&lt;br /&gt;We were going to build a 'mini' version of this particular game, with slightly different behavior and there was a requirement for reporting purposes that all persistent entities for the game be mapped to new tables of the exact same structure. So for that reason, we were able to recycle the entity classes without any changes made to them.&lt;br /&gt;&lt;br /&gt;The first problem I had to solve was the fact that the JPA annotations bound these entity classes to a particular table because of the table name declared in their definitions. So I removed all of the annotations and replaced the mapping declarations with JPA XML.&lt;br /&gt;&lt;br /&gt;All of the table names in the JPA XML were replaced with tokens, ${some.table}, ${someother.table} for example. My idea was that at runtime -- during the creation of the hibernate session factory, I could perform a runtime, in memory replacement of these table names based on context and then pass in a generic &lt;a href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/core/io/Resource.html"&gt;org.springframework.core.io.Resource&lt;/a&gt;. So my solution was to create a new spring &lt;a href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/beans/factory/FactoryBean.html"&gt;FactoryBean &lt;/a&gt;implementation which took two parameters one, an input file containing tokens to be replaced (The JPA XML mapping definition file) and 2. a file containing the properties which would be used to replace these tokens.&lt;br /&gt;&lt;br /&gt;So I created a &lt;a href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/beans/factory/FactoryBean.html"&gt;FactoryBean &lt;/a&gt;implementation taking the two parameters, which performs an in memory replacement of the table name tokens. In the Spring XML definition of the AnnotationSessionFactoryBean, I simple set the factory bean on the mappingLocations property.. The FactoryBean then performs the work of the replacement in memory, and sets a Resource on the AnnotationSessionFactoryBean.. The reasource returned by the token replacement FactoryBean I created was a &lt;a href="http://static.springframework.org/spring/docs/2.5.x/api/index.html?org/springframework/core/io/%5Cclass-useByteArrayResource.html"&gt;org.springframework.core.io.ByteArrayResource&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This solved the problem, and I was now able to create as many org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean's as I wanted, each mapping the exact same entity classes to different tables. All I had to do was provide a property file to my Factory bean containing the table names when creating the AnnotationSessionFactoryBean.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Kind of funny -- when i was first working on this, I tried passing the ByteArrayResource to the session factories configLocation setter. The problem i encountered was that this setter couldn't accept generic resources so I acted too fast and created a bug against spring, which Juergen Hoeller later invalidated - &lt;a href="http://jira.springframework.org/browse/SPR-5108"&gt;http://jira.springframework.org/browse/SPR-5108&lt;/a&gt; . The reason for this is because you can actually pass generic resources to the mappingLocations setter, which worked just fine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-3142453897141877138?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/3142453897141877138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=3142453897141877138' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/3142453897141877138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/3142453897141877138'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2008/08/mapping-entities-to-multiple-tables.html' title='Mapping entities to multiple tables with hibernate + JPA'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-7071130229827902126</id><published>2008-08-19T08:39:00.000-07:00</published><updated>2008-08-19T12:22:25.341-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='scalability'/><title type='text'>Vertical Scalability of Java Applications</title><content type='html'>I recently read an article by Yang Wu of Sun Microsystems on the subject of vertically scaling Java applications. The original article was published on The Server Side and can be found &lt;a href="http://www.theserverside.com/tt/articles/article.tss?l=ScalingYourJavaEEApplications"&gt;here&lt;/a&gt;.&lt;br /&gt;I found the article to be quite informative and wanted to provide a summary, illustrating the salient points.&lt;br /&gt;&lt;br /&gt;First of all, &lt;span style="font-weight: bold;"&gt;vertical scaling&lt;/span&gt; refers to improving the performance of a single node of an application.  This is typically done by optimization or adding hardware resources such as additional memory or additional CPU resources. Horizontal scaling, typically involves distributing computational load amongst a cluster of machines. I'll likely add a blog entry about this in the future.&lt;br /&gt;&lt;br /&gt;Below is a summary of the various sections covered in Mr. Wu's article..&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Synchronized &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The synchronized keyword in java is the primary method of control over critical sections in Java. However, using synchronized does have some performance implications. Executing a method which is synchronized in a system with just one thread will lead to decreased performance by comparing to executing the same method logic in an unsynchronized fashion.&lt;br /&gt;&lt;br /&gt;* calls to synchronized methods are serialized, and only one thread may enter a synchronized region at a time. If many threads are contending for the same synchronized region, processing may seem to come to a complete halt. Adding additional cpu resources won't help in this situation.&lt;br /&gt;&lt;br /&gt;* synchronized over critical areas must be used very judiciously in order to optimize performance.&lt;br /&gt;&lt;br /&gt;* You should only synchronize regions of code that absolutely must be executed in a thread safe fashion. In many cases you'll find that you can factor out significant portions of logic into unsynchronized regions.&lt;br /&gt;&lt;br /&gt;* keep in mind, that if you're using method level synchronization, you are implicitly synchronizing on 'this', that being the object itself, which will cause the entire object to be locked preventing access to other synchronized methods. Is this always necessary?&lt;br /&gt;&lt;br /&gt;* Always avoid synchronizing static methods. This will lock all instances of the class.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Lock Free Data Structures available since Java 5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;* The &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/atomic/package-summary.html"&gt;java.util.concurrent.atomic&lt;/a&gt; package makes use of hardware primitives to implement  concurrency mechanisms. Uses the fastest available operations on the native platform.&lt;br /&gt;&lt;br /&gt;* AtomicInteger; AtomicLong; AtomicReference; AtomicBoolean are some of the classes provided in this package, and they form the basis for the implementations of classes in the &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/package-summary.html"&gt;java.util.concurrent&lt;/a&gt; package.&lt;br /&gt;&lt;br /&gt;* Where it makes sense, you should choose to use java.util.concurrent.atomic and &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/package-summary.html"&gt;java.util.concurrent&lt;/a&gt; classes over classic java synchronization.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Blocking v.s. Non-Blocking I/O&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;* java &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/nio/package-summary.html"&gt;java.nio&lt;/a&gt; package available since Java 1.4&lt;br /&gt;&lt;br /&gt;* Designed to give better performance and scalability, similar to facilities available in other languages C.&lt;br /&gt;&lt;br /&gt;* The blocking i/o paradigm uses one thread per request. The thread will remain bound to that particular request until all computation server side is complete. Only after that's done, and a response is written to the user, will the thread be returned to the pool. During this time, the thread can't be used to service any other requests. This is the model employed in Tomcat 5. Note that &lt;a href="http://tomcat.apache.org/tomcat-6.0-doc/index.html"&gt;Tomcat 6&lt;/a&gt; will make use of non-blocking i/o. Currently &lt;a href="https://glassfish.dev.java.net/"&gt;Glassfish&lt;/a&gt; also makes use of non-blocking i/o.&lt;br /&gt;&lt;br /&gt;* A much better approach is to allow that thread handling the request to handle other incoming requests, while the initial request associated with it has kicked off a number of server side operations. It's been found that when requests are complex, involving alot of server side processing and perhaps additional i/o operations, such as disk activity, database access or interaction with a MOM layer, non-blocking i/o far outperforms traditional blocking techniques.&lt;br /&gt;&lt;br /&gt;* For simpler applications, such as JSP processing or static content serving, traditional Tomcat-5 Style blocking I/O performs reasonably well in comparison to the non-blocking method.&lt;br /&gt;&lt;br /&gt;* Related to this topic of non-blocking i/o and asynchronous processing is SEDA architecture, which stands for Staged Event Driven Architecture in which a server is broken down into logical units, each of which communicate by passing events between each other in an asynchronous fasion. See a blog post by Nick Zhu for an introduction to &lt;a href="http://www.zoochee.com/2008/07/seda.html"&gt;SEDA&lt;/a&gt;.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;The "Single Threaded Task Problem"&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;* single threaded task performance a function of cpu frequency&lt;br /&gt;* if large tasks are single threaded, no benefit in running on an SMP system.&lt;br /&gt;* problems need to be broken down in such a way that they can be split up amongst multiple&lt;br /&gt;threads.&lt;br /&gt;&lt;br /&gt;Parallelization tools:&lt;br /&gt;&lt;br /&gt;* &lt;a href="http://www2.epcc.ed.ac.uk/computing/research_activities/jomp/index_1.html"&gt;&lt;span style="font-weight: bold;"&gt;JOMP&lt;/span&gt;&lt;/a&gt;: A java api for thread based smp parallel programming. Not easy to use, but if used correctly can give you major performance gains on SMP systems. Based on OpenMP. Uses directives that are processed in a precompilation stage.&lt;br /&gt;&lt;br /&gt;* &lt;a href="http://www.cs.rit.edu/%7Eark/pj.shtml"&gt;&lt;span style="font-weight: bold;"&gt;ParallelJava&lt;/span&gt;&lt;/a&gt;. Works much like JOMP but not implemented using directives. The parallel constructs are obtained through API calls and the use of various classes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Scale Up to More Memory&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;* not having enough memory on the system can lead to performance problems.&lt;br /&gt;* garbage collection a huge productivity boost to the programming paradigm.&lt;br /&gt;* but garbage collection process can lock up the JVM when it's happening. Negative impact on&lt;br /&gt;applications requiring a real time execution environment.&lt;br /&gt;&lt;br /&gt;* providing more memory will allow garbage collection to take place less frequently.&lt;br /&gt;* however, given too much memory, the garbage collection process may take far too long as has been demonstrated in lab experiments.&lt;br /&gt;&lt;br /&gt;* A real time JVM has been proposed in &lt;a href="http://jcp.org/aboutJava/communityprocess/first/jsr001/rtj.pdf"&gt;&lt;span style="font-weight: bold;"&gt;JSR001&lt;/span&gt;&lt;/a&gt;. This will give developers control over what should and should not be garbage collected, allowing them the option of managing this themselves.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Other scalability problems&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;* in some cases scalability issues not caused by java itself.&lt;br /&gt;* pay attention the the RDBMS .. The txn isolation levels you're using can greatly affect performance.&lt;br /&gt;&lt;br /&gt;* Other areas to pay attention to: disk io, network io, synchronous logging,&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-7071130229827902126?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/7071130229827902126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=7071130229827902126' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/7071130229827902126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/7071130229827902126'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2008/08/vertical-scalability-of-java.html' title='Vertical Scalability of Java Applications'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-211517413574492699</id><published>2008-08-18T12:04:00.000-07:00</published><updated>2008-08-18T17:53:39.056-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><title type='text'>Remote Debugging Java Applications</title><content type='html'>I've noticed that quite a few new guys entering the Java realm aren't familiar with remote debugging Java applications.&lt;br /&gt;&lt;br /&gt;Something that every java dev should be aware of -- you can use your IDE (Eclipse in my case) to connect to your VM on a port you specify, to perform debugging of your application line by line.&lt;br /&gt;&lt;br /&gt;When starting up the VM you'll need to specify:&lt;br /&gt;&lt;br /&gt;-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4005,server=y,suspend=y&lt;br /&gt;&lt;br /&gt;on the command line, as parameters to 'java'.&lt;br /&gt;&lt;br /&gt;There are other ways you can specify these parameters, for example, if launching an application with maven's jetty plugin, you can add these params to the MAVEN_OPTS environment variable. Alot of flexibility here.&lt;br /&gt;&lt;br /&gt;IBM offers an introduction to &lt;a href="http://www.ibm.com/developerworks/library/os-ecbug/"&gt;java debugging with eclipse&lt;/a&gt;.&lt;br /&gt;enjoy&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-211517413574492699?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/211517413574492699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=211517413574492699' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/211517413574492699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/211517413574492699'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2008/08/remote-debugging-java-applications.html' title='Remote Debugging Java Applications'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-62292110885763376</id><published>2008-08-11T06:51:00.000-07:00</published><updated>2008-08-11T22:30:08.603-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='transaction'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='rollback'/><category scheme='http://www.blogger.com/atom/ns#' term='exception'/><title type='text'>Rolling Back Transactions with Spring - Beginners mistakes</title><content type='html'>So as I mentioned in a previous blog entry, I've been working on a new project. I was working late this weekend and discovered a pretty critical error in the applications transaction processing capabilities. A very common error often made by those new to Spring transactions, is the belief that by default, any derivative of Exception will roll back transactions. However, this is far from the truth. Out of the box,  only derivatives of RuntimException that pass through the transactional boundaries will trigger a rollback of any database changes which were performed. As it turned out the system I was working on wasn't really transactional because all of the critical errors thrown by the app were checked exceptions! Lucikly another issue brought this to my attention and I was able to quickly resolve the problem. Phew.&lt;br /&gt;&lt;br /&gt;So, there are a few ways of handling transactions in Spring. First of all, critical errors, should probably derive from RuntimeException. An application usually can't recover from a RuntimeException (such as a NullPointerException) so it would make sense that this situation should trigger a rollback.&lt;br /&gt;&lt;br /&gt;However, if you still for some reason want transactional methods to throw checked exceptions and also to cause a rollback, you'll need to explicitly specify that these exceptions should cause a rollback.&lt;br /&gt;&lt;br /&gt;If you're using XML using style transaction configuration, you can modify your &amp;lt;tx:advice&amp;gt; elemements to specify the Exceptions which must cause rollback. See &lt;a href="http://static.springframework.org/spring/docs/2.5.x/reference/transaction.html#transaction-declarative-rolling-back"&gt;'rolling back declarative transactions' &lt;/a&gt;for an example on how to do this.&lt;br /&gt;&lt;br /&gt;In annotation based transactions, you can provide a parameter to the annotation 'rollbackFor' which can list a series of Exceptions that will force a rollback, @Transactional(rollbackFor={SomeException.class,SomeOtherException.class }) for example.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-62292110885763376?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/62292110885763376/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=62292110885763376' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/62292110885763376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/62292110885763376'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2008/08/rolling-back-transactions-with-spring.html' title='Rolling Back Transactions with Spring - Beginners mistakes'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-4723815043134540330</id><published>2008-07-31T07:01:00.000-07:00</published><updated>2008-08-01T07:37:24.269-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='style'/><title type='text'>Style</title><content type='html'>So I'm on a new project, entering the a new code base, trying to figure out how it all works.&lt;br /&gt;I just thought I'd make a post about my stylistic preferences.&lt;br /&gt;&lt;br /&gt;1. I don't like the overuse of anonymous classes in Java, especially if you have definitions that are nested within other anonymous classes. I find this to be very difficult to read.&lt;br /&gt;&lt;br /&gt;2. You'll find alot of code is wrapped at 80 characters. are you kidding me? I haven't seen anyone using a green screen dummy terminal in a while.. Wrap your code within reason.&lt;br /&gt;&lt;br /&gt;3. Too many method parameters! I don't like methods that take more than a few parameters.. Especially if they're similar in type.. This even gets worse with overloading.. A nightmare.. Same goes for constructors.&lt;br /&gt;&lt;br /&gt;4. AOP &amp;amp; Golden hammers. AOP definately has it's place on object oriented design as a savior where traditional object oriented methods don't cut it.. If you have massive cross cutting concerns, transactional concerns, security that cover wide portions of the application, it certainly makes a lot of sense. But it seems some people, discover a tool and attempt to apply it to everything. Overuse of AOP technology can make code difficult to maintain and debug, since typically configuration is hidden away in some xml file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-4723815043134540330?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/4723815043134540330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=4723815043134540330' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/4723815043134540330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/4723815043134540330'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2008/07/style.html' title='Style'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-6998557156129557619</id><published>2008-07-28T19:18:00.000-07:00</published><updated>2008-08-01T07:37:04.945-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='search'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='webapp'/><title type='text'>Cuil -- cool.. i guess</title><content type='html'>So today, I noticed that the most news sources were completely saturated with stories about &lt;a href="http://www.cuil.com/"&gt;Cuil&lt;/a&gt; a some new search engine that was apparently devised by a number of former Google engineers. Their claim is that they've come up with a method that allows them to index far more content than Google's own system and thus provide better search results.&lt;br /&gt;&lt;br /&gt;So, the media in my opinion, is completely overhyping this new site (I don't even know how to pronounce it correctly just by looking at the name -- although it's apparently pronounced as 'cool). I was obviously curious because of the massive perceived hype surrounding this site, so I gave it a shot. I performed a number of searches that I could compare against the Google search engine... Well not much luck, so far it seems that Google is far more effective in returning relevant content -- even though Cuil claims that their improved algorithm should beat google at this.. Oh well, I wonder what others think about this hype, but as someone else said "I would find it hard to believe that the folks at google are loosing any sleep over this new site"... They by the way are working with only about 20 million in startup capital... Ouch. good luck.&lt;br /&gt;&lt;br /&gt;"Rather than rely on superficial popularity metrics, Cuil searches for and ranks pages based on their content and relevance." Source: &lt;a href="http://www.cuil.com/info/"&gt;http://www.cuil.com/info/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-6998557156129557619?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/6998557156129557619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=6998557156129557619' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/6998557156129557619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/6998557156129557619'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2008/07/cuil-cool-i-guess.html' title='Cuil -- cool.. i guess'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-3655515697211499384</id><published>2008-07-28T18:59:00.001-07:00</published><updated>2008-09-29T19:42:12.041-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='operating systems'/><category scheme='http://www.blogger.com/atom/ns#' term='micro controllers'/><title type='text'>Avros - Multi programmed OS for 8 bit RISC cpu</title><content type='html'>I just came across an old web page that I put up over 4 years ago, for a 4th year university project course that I decided to take at the University of Toronto. I thought I'd&lt;a href="http://www.cdf.toronto.edu/%7Eg2justin/avros.html"&gt; post it here and share&lt;/a&gt; with anyone interested.&lt;br /&gt;&lt;br /&gt;** UPDATE -- Source code is available on Sourceforge.. Here is the &lt;a href="https://avr-os.svn.sourceforge.net/svnroot/avr-os"&gt;Subversion project&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.cdf.toronto.edu/%7Eg2justin/avros.html"&gt;AVROS&lt;/a&gt; was an operating system I wrote in C and Atmel AVR assembler to be installed on &lt;a href="http://www.atmel.com/"&gt;Atmel Corporations&lt;/a&gt; 8 bit RISC cpu, the ATMega 128.&lt;br /&gt;&lt;br /&gt;I had taken a number of courses on operating systems design and real time theory and decided that I had enough knowledge to write my own multi process general purpose operating system. I initially wanted to write a basic OS for the x86 architecture, but was urged not to by my project supervisor &lt;a href="http://en.wikipedia.org/wiki/Steve_Mann"&gt;Steve Mann&lt;/a&gt;. He insisted that thanks to the advent of Linux, there was no point hehe. So, on his advise, I began studying the Atmel RISC architecture and it's instruction set and decided to begin my journey in devising a general purpose operating system for this tiny device! It was a major challenge, but well worth the effort. Also at Prof. Mann's urging, I released the source code under the GNU GPL. So if anyone finds it useful, be my guest.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-3655515697211499384?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/3655515697211499384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=3655515697211499384' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/3655515697211499384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/3655515697211499384'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2008/07/avros-multi-programmed-os-for-8-bit.html' title='Avros - Multi programmed OS for 8 bit RISC cpu'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-5734706749251788739</id><published>2008-07-23T08:07:00.001-07:00</published><updated>2008-07-23T17:37:36.905-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dwr'/><category scheme='http://www.blogger.com/atom/ns#' term='jsp'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='session'/><title type='text'>DWR, spring creators and jsp</title><content type='html'>I ran into some issues when using DWR 2.0.1 and the Spring DWR bean creator. I have a class which needs to be DWR enabled and should be associated with a users web session. The views in the application, declare this class using &amp;lt;jsp:usebean&amp;gt; tags (with session scope), since apart from dwr calls updating the state of the bean, the JSP's require this bean for displaying data to the user. So we have a bit of a contention issue.. The container will create this bean because of the declared dependency via &amp;lt;jsp:usebean&amp;gt; and inject it into the session. However, we need spring to configure the dependencies required by this class, so when the container ends up creating a new instance of this bean, it's in an unconfigured state.. And worse, spring won't place it into the session because it's already in there created by the container.&lt;br /&gt;&lt;br /&gt;A solution I came up with, in the context of an MVC framework, was to remove the &amp;lt;jsp:usebean&amp;gt; tags, and then have a controller provide the spring configured, DWR exposed session bean to the view. This way, spring will have complete control over instantiation and configuration of the bean without any interference from the jsp's.&lt;br /&gt;&lt;br /&gt;Update: A former colleague of mine mentioned that another solution to this issue is by using Spring's AspectJ support and the @Configurable annotation. The idea here is that we can annotate the class I want exposed by dwr with @Configurable, perform aspectJ build time weaving. I can then use spring annotations for autowiring of the bean. -- As a result, it'll be possible to keep the jsp:useBean tags in place.. At instantiation time, Spring will then autowire the dwr exposed bean injecting any service dependencies that are required. -- Thanks to Adrian Sampaleanu for pointing this out.&lt;br /&gt;&lt;br /&gt;See &lt;a href="http://static.springframework.org/spring/docs/2.5.x/reference/aop.html#aop-using-aspectj"&gt;Spring documentation: 6.8. Using AspectJ with Spring applications&lt;/a&gt; for more details on the aspectj + autowiring solution.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-5734706749251788739?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/5734706749251788739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=5734706749251788739' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/5734706749251788739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/5734706749251788739'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2008/07/dwr-spring-creators-and.html' title='DWR, spring creators and jsp'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-5461075001709624020</id><published>2008-07-22T08:30:00.000-07:00</published><updated>2008-07-23T18:27:47.277-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='caching'/><category scheme='http://www.blogger.com/atom/ns#' term='functional decomposition'/><category scheme='http://www.blogger.com/atom/ns#' term='asynchronous processing'/><category scheme='http://www.blogger.com/atom/ns#' term='scalability'/><title type='text'>Ebay's Scalability Tactics</title><content type='html'>&lt;span style="font-size:85%;"&gt;Have you ever wondered how EBay and other massive sites manage scalability?  A colleague of mine emailed us an article written by an Architect at Ebay which nicely describes the scalability strategy employed. You may be surprised by the amount of thought put into such concerns, especially if  you haven't worked on such massive systems. For example, Ebay makes use of  16,000 application servers and roughly 400 database machines! That's only the beginning..&lt;br /&gt;&lt;br /&gt;The article below outlines 7 Best practices for scalability:&lt;br /&gt;&lt;br /&gt;Best Practice #1: Partition by Function&lt;br /&gt;Best Practice #2: Split Horizontally&lt;br /&gt;Best Practice #3: Avoid Distributed Transactions&lt;br /&gt;Best Practice #4: Decouple Functions Asynchronously&lt;br /&gt;Best Practice #5: Move Processing To Asynchronous Flows&lt;br /&gt;Best Practice #6: Virtualize At All Levels&lt;br /&gt;Best Practice #7: Cache Appropriately&lt;br /&gt;&lt;br /&gt;See the article for more details.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.infoq.com/articles/ebay-scalability-best-practices"&gt;Scalability Best Practices: Lessons from eBay&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-5461075001709624020?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/5461075001709624020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=5461075001709624020' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/5461075001709624020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/5461075001709624020'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2008/07/ebays-scalability-tactics.html' title='Ebay&apos;s Scalability Tactics'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-2315362820094209102</id><published>2008-07-16T16:59:00.000-07:00</published><updated>2009-01-11T19:19:21.162-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jetty'/><category scheme='http://www.blogger.com/atom/ns#' term='webapp'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><title type='text'>Multiple Web Applications with the maven jetty plugin (6.1.7)</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;br /&gt;Today I ran into an issue, in which I needed to use &lt;a href="http://www.mortbay.org/jetty-6/"&gt;Jetty&lt;/a&gt; to host more than one web application, through the &lt;a href="http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin"&gt;maven jetty plugin&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I was using the maven jetty plugin for the development of a web application, using the plugin is easy enough, and really allows you to rapidly develop and test web applications. The problem I encountered was that the application is not deployed in a jetty container,  I was solely using this for development. The target platform was actually jboss with apache, and this particular application had a dependency on a piece of functionality in the Jboss/Apache environment that wasn't available in a stand alone jetty deployment.&lt;br /&gt;&lt;br /&gt;Running my app standalone is as easy as mvn jetty:run .. The plugin deploys my application to the jetty container, and it's running within seconds. However, under these circumstances, I had a dependency on another web application that had to also be deployed to jetty, but in another context.&lt;br /&gt;&lt;br /&gt;So, my problem is that I have my main application, call it mainApp deployed at context root /mainApp .. And I need to get a secondary web app, which mainApp is dependant on running as well, using the jetty plugin. Let's call this second app dependencyApp which must be rooted at /dependencyApp.&lt;br /&gt;&lt;br /&gt;So, as you can see, mainApp and dependencyApp are peers in the jetty container.&lt;br /&gt;/mainApp and&lt;br /&gt;/dependencyApp&lt;br /&gt;&lt;br /&gt;It's not immediately obvious, how I can get the maven jetty plugin to deploy dependencyApp alongside mainApp. .At least it wasn't to me until I started digging around the jetty site :P&lt;br /&gt;&lt;br /&gt;What I realized was, that there's an optional parameter you can pass to the plugin, an array of contextHandler's using the &lt;contexthandlers&gt;&lt;/contexthandlers&gt; element. See &lt;a href="http://jetty.mortbay.org/jetty-6/maven-plugin/run-mojo.html"&gt;maven jetty run config params&lt;/a&gt; for more details on this and other optional parameters.&lt;br /&gt;&lt;br /&gt;Anyway, you can specify as many additional context handlers as you wish. My requirement here was to provide an additional ContextHandler so that I could host the dependencyApp along side my main application. It turned out that the org.mortbay.jetty.webapp.WebAppContext handler does the trick.&lt;br /&gt;&lt;br /&gt;Using this handler, the jetty plugin deploys an additional web application rooted at a context that you specify:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;    &amp;lt;contextHandler implementation="org.mortbay.jetty.webapp.WebAppContext"&amp;gt;&lt;br /&gt;      &amp;lt;war&amp;gt;../dependencyApp/target/dependencyApp.war&amp;lt;/war&amp;gt;&lt;br /&gt;      &amp;lt;contextPath&amp;gt;/dependencyApp&amp;lt;/contextPath&amp;gt;&lt;br /&gt;  &amp;lt;/contextHandler&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;All you have to do is specify, where the other war is located, and give it a context root!&lt;br /&gt;&lt;br /&gt;The full XML describing my jetty plugin is below for reference:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;    &amp;lt;plugin&amp;gt;&lt;br /&gt;       &amp;lt;groupId&amp;gt;org.mortbay.jetty&amp;lt;/groupId&amp;gt;&lt;br /&gt;          &amp;lt;artifactId&amp;gt;maven-jetty-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;       &amp;lt;version&amp;gt;6.1.7&amp;lt;/version&amp;gt;&lt;br /&gt;       &amp;lt;configuration&amp;gt;&lt;br /&gt;           &amp;lt;scanIntervalSeconds&amp;gt;10&amp;lt;/scanIntervalSeconds&amp;gt;&lt;br /&gt;           &amp;lt;contextHandlers&amp;gt;&lt;br /&gt;               &amp;lt;contextHandler implementation="org.mortbay.jetty.webapp.WebAppContext"&amp;gt;&lt;br /&gt;                   &amp;lt;war&amp;gt;../dependencyApp/target/dependencyApp.war&amp;lt;/war&amp;gt;&lt;br /&gt;                   &amp;lt;contextPath&amp;gt;/dependencyApp&amp;lt;/contextPath&amp;gt;&lt;br /&gt;               &amp;lt;/contextHandler&amp;gt;&lt;br /&gt;           &amp;lt;/contextHandlers&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;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-2315362820094209102?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/2315362820094209102/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=2315362820094209102' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/2315362820094209102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/2315362820094209102'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2008/07/multiple-web-applications-with-maven.html' title='Multiple Web Applications with the maven jetty plugin (6.1.7)'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9106654920506442106.post-8001358214366669506</id><published>2008-07-16T16:56:00.001-07:00</published><updated>2008-07-16T16:59:00.481-07:00</updated><title type='text'>Introduction</title><content type='html'>This is my first entry.. I decided to start this blog because I have a terrible memory! I suppose it's primarily for myself.. I'd like to maintain a record of interesting software solutions and whatever else is on my mind.&lt;br /&gt;&lt;br /&gt;Anyway, a bit about myself I guess. My name is Justin and I'm a Software Developer from the Toronto area. I've been in the industry for over four years now, working mostly in the Java space. I've worked in J2me application and platform development, banking and j2ee enterprise software development.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9106654920506442106-8001358214366669506?l=jsimonelis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsimonelis.blogspot.com/feeds/8001358214366669506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9106654920506442106&amp;postID=8001358214366669506' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/8001358214366669506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9106654920506442106/posts/default/8001358214366669506'/><link rel='alternate' type='text/html' href='http://jsimonelis.blogspot.com/2008/07/introduction.html' title='Introduction'/><author><name>Justin Simonelis</name><uri>http://www.blogger.com/profile/17868529904806777091</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
