<?xml version="1.0" encoding="UTF-16"?>
<feed xmlns="http://purl.org/atom/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="0.3">
  <title>Code, Coffee : weblog</title>
  <link rel="alternate" href="http://www.joshlong.com" />
  <tagline>Full contact Java programming from the trenches.</tagline>
  <dc:creator>Josh Long</dc:creator>
  <entry>
    <title>A Walking Tour of Spring 3.1</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/a_walking_tour_of_spring_31.html" />
    <author>
      <name />
    </author>
    <modified>2012-03-08T00:00:00Z</modified>
    <issued>2012-03-08T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt; I put together a quick walking tour of Spring 3.1. The code is available on &lt;a href = "https://github.com/joshlong/a-walking-tour-of-spring-31"&gt;my GitHub account&lt;/A&gt;. It runs on a Servlet 3 container, and demonstrates how to build a completely XML free (no &lt;CODE&gt;persistence.xml&lt;/CODE&gt;, no &lt;CODE&gt;web.xml&lt;/CODE&gt;, no &lt;CODE&gt;orm.xml&lt;/CODE&gt;, etc.) application that uses Hibernate 4, Spring 3.1, and Spring MVC 3.1. It shows how to build everything from a transactional service to a RESTful endpoint. 
	
	 &lt;/P&gt;</summary>
    <dc:date>2012-03-08T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>My trip to JFokus, Vaadin Dev Day, and Spring I/O with my Dad</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/my_trip_to_jfokus_vaadin_dev_day_and_spring_io_with_my_dad.html" />
    <author>
      <name />
    </author>
    <modified>2012-02-21T00:00:00Z</modified>
    <issued>2012-02-21T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt; &lt;div style = "float:left;margin-right:10px;"&gt;
&lt;img src = "/jl/media/17485.jpeg" width="400" /&gt;&lt;br/&gt;&lt;img src = "/jl/media/17486.jpeg" width="400" /&gt;&lt;br/&gt;&lt;img src = "/jl/media/17487.jpeg" width="400"  /&gt; 
 &lt;div class= "caption" style = "margin-top:10px;"&gt;
 &lt;b&gt;Top&lt;/b&gt;:  &lt;a href = "http://www.twitter.com/sergialmar"&gt;@sergialmar&lt;/a&gt;, &lt;a href = "http://www.twitter.com/starbuxman"&gt;me&lt;/a&gt;, and &lt;a href ="http://www.twitter.com/neodevelop"&gt;@neodevelop&lt;/a&gt;.
 &lt;br/&gt;
  &lt;strong&gt;Bottom two&lt;/strong&gt;: beautiful Photos of Madrid! &lt;/div&gt;
&lt;/div&gt;
&lt;div style="float:right; margin-left:10px;"&gt;
 
&lt;img src="/jl/media/17488.jpeg" width = "400" /&gt;&lt;br/&gt;&lt;img src="/jl/media/17489.jpeg" width = "400" /&gt;&lt;br/&gt;&lt;img src="/jl/media/17484.jpeg" width = "400"   /&gt; 
 &lt;div class= "caption" style = "margin-top:10px;"&gt;
 &lt;strong&gt;All three photos:&lt;/strong&gt;  una manifestaci&amp;oacute;n!
 
&lt;/div&gt;
&lt;/div&gt;
 
This was my first time in Madrid, Spain, for the &lt;a href = "http://www.springio.net/"&gt;Spring IO conference&lt;/a&gt;. 
	I enjoyed the people, the culture (&lt;EM&gt;y las bebidas!&lt;/EM&gt;) and  more. I brought my dad with me on this trip, since he's never been abroad, and I wanted him to see Europe with me. We had talked about this when I went to &lt;a href = "http://www.javazone.no"&gt;JavaZone&lt;/A&gt;, last year, and I described to him that there were &lt;a href = "http://en.wikipedia.org/wiki/Fjord"&gt;&lt;EM&gt;fjords&lt;/EM&gt;&lt;/A&gt; and plenty of beautiful wildlife and vast expanses of nature's beauty. That trip, for reasons not that relevant here, never panned out for us (although I quite enjoyed it!). 
	JavaZone came and went, but he was still interested in Scandinavia and experiencing that type of culture. 
	When this trip (first to Stockholm, Sweden, for &lt;a href = "http://jfokus.com"&gt;JFokus&lt;/A&gt;, and then to Madrid, Spain, for &lt;a href = "http://www.springio.net"&gt;Spring I/O&lt;/A&gt;) materialized, dad jumped at the chance. I bought his tickets (a late birthday gift - we share the same birthday!) and I asked him to secure a passport, which he did. 
	&lt;/P&gt;&lt;p&gt;
 He was most looking forward to visiting Stockholm. Stockholm is every bit as lovely as he imagined it would be, having seen &lt;a href = "http://www.imdb.com/title/tt1132620/"&gt;&lt;EM&gt;The Girl with the Dragon Tatoo&lt;/EM&gt;&lt;/A&gt;.
	
	&lt;/P&gt;&lt;P&gt;
	But, dad fell ill - something he ate didn't agree with him (probably the airline food!) - and he was trapped in the hotel for a few days, and very weak. This made moving around a bit more problematic than it should have been as we made the subsequent trip to Madrid, Spain.     
	
	 One thing we &lt;em&gt;did&lt;/EM&gt; learn: getting sick in a hotel room's a good idea, especially in Stockholm.  
		The staff at the hotel we stayed at - the lovely &lt;a href="http://www.radissonblu.com/waterfronthotel-stockholm"&gt;Radisson Blu Waterfront&lt;/a&gt; in Stockholm, right next to the JFokus venue -
		treated him exceptionally.  
		
	 It seemed as though the staff was almost rooting for him to recover! Somebody even &lt;EM&gt;checked in&lt;/EM&gt; on him for me, while I was tending to my obligations as  a speaker at the conference! Talk about great service.  	
	&lt;/P&gt; 
    
    &lt;P&gt; During all of this, I took a quick jaunt (a train, then a flight, then a cab) from Stockholm, Sweden to Helsinki, Finland's port, where I jumped on a cruise headed &lt;EM&gt;back&lt;/EM&gt; to Stockholm! This cruise, in particular was the vessel on which the Vaadin Dev Days took place. It was an amazing, enthusiastic group of programmers, and you couldn't ask for a more interesting venue. I enjoyed everything, and particularly, I enjoyed giving a talk against the background sound of ice breaking as the ship plowed onward, through the frozen waters. Adding that to the list of things that I can't beleive I got to do... &lt;/P&gt;
    &lt;P&gt;
 We finally made it to  Madrid. By that point dad was on the mend, and  the temperature in Madrid was more favorable to people of, em,  superior years. It was a &lt;Em&gt; lot&lt;/EM&gt; warmer than in Stockholm. Madrid seems like it was realized from a story book  illustration: nice people, great food and - most manifestly for an American like my dear dad, never before abroad in his 75+ years of life -  full of &lt;EM&gt;beautiful&lt;/EM&gt; architecture!
	 Madrid ended up being his favorite city.  
	&lt;/p&gt;
&lt;P&gt;
		
		It didn't hurt that  the conference coincided with &lt;EM&gt;carnivale&lt;/EM&gt;, which was being celebrated in some form or another  in many different Catholic countries world-wide. The streets were abuzz with music, debauchery and crowds of people.  Dad and I went outside, took in some of the scenery and had to find a place to sit when one of the &lt;a href  = "http://es.wikipedia.org/wiki/Manifestaci%C3%B3n"&gt;&lt;em&gt;Manifestaci&amp;oacute;n&lt;/EM&gt;&lt;/A&gt;s &lt;a href = "http://www.ft.com/cms/s/3386ce2e-5b29-11e1-a2b3-00144feabdc0,Authorised=false.html?_i_location=http%3A%2F%2Fwww.ft.com%2Fcms%2Fs%2F0%2F3386ce2e-5b29-11e1-a2b3-00144feabdc0.html&amp;_i_referer="&gt;plowed&lt;/a&gt; &lt;a href = "http://latimesblogs.latimes.com/world_now/2012/02/hundreds-of-thousands-of-spaniards-protest-new-work-rules.html"&gt;through&lt;/A&gt; &lt;a href  = "https://news.google.com/news/story?ncl=dMYiSTv25wTOfTMZl-DHtPx4bvXCM"&gt;the center&lt;/A&gt; where we were! What an incredible thing to behold! We missed the memo, evidently, where it was announced that the entire walking population of Madrid would go on a walkabout! 
			
&lt;/P&gt;
    &lt;P&gt;I really enjoyed JFokus, the Vaadin Dev Days, and finally Spring IO both because they were great events with enthusiastic developers, but also because I got to go with my dad, who got to experience Europe for the first time with me. We learned a lot. I'll be back in Europe next month for &lt;a href = "http://2012.33degree.org/"&gt;33rd Degree&lt;/a&gt;, and I'll be in Sweden, &lt;EM&gt;again&lt;/EM&gt;(!), and in numerous other countries in April for &lt;a href = "http://www.scandevconf.se/"&gt;ScanDevConf&lt;/a&gt; and the &lt;a href="http://opentour.cloudfoundry.com/"&gt;Cloud Foundry Open Tour&lt;/a&gt; (which we'll talk about a bit later), respectively, and I'll be sure to approach those trips in the same  way as my dad did: full of a (renewed) curiousity. 
&lt;/P&gt;</summary>
    <dc:date>2012-02-21T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>JFokus and Vaadin 2012</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/jfokus_and_vaadin_2012.html" />
    <author>
      <name />
    </author>
    <modified>2012-02-17T00:00:00Z</modified>
    <issued>2012-02-17T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt; 
	&lt;img src = "/jl/media/17340.jpeg" width = "300" style = "float: left; margin-right:10px;" /&gt; 
	&lt;img src = "/jl/media/17339.png" width = "200" style = "float: right; margin-left:10px;" /&gt; 
	
	Hey guys, are you going to be at JFokus' &lt;a href = "http://www.jfokus.se/jfokus/page.jsp?lang=en&amp;id=tutorial"&gt;University day tomorrow&lt;/A&gt;? Come see &lt;a href = "http://www.springone2gx.com/conference/speaker/chris_richardson"&gt;Chris Richardson&lt;/A&gt; and &lt;a href = "http://www.springone2gx.com/conference/speaker/josh_long"&gt;I&lt;/a&gt; talk about building better Spring applications on Cloud Foundry at 9AM tomorrow morning. 
 
 If you're in Helsinki, might I recommend  &lt;a href = "https://vaadin.com/meetup/jfokus-2012"&gt;the JFokus with Vaadin&lt;/A&gt; cruise which leaves from Helsinki aboard the &lt;a href = "http://en.wikipedia.org/wiki/MS_Silja_Symphony"&gt;MS Silja Symphony&lt;/A&gt; at 17:00 EET, and then works it way to Stockholm, where of course you're then free to attend JFokus. I'll be there, giving a talk on getting to production quicker with technologies like &lt;a href = "http://www.cloudfoundry.org"&gt;Cloud Foundry&lt;/A&gt;, &lt;A href = "http://www.springframework.org"&gt;Spring&lt;/A&gt; and &lt;A href = "http://www.vaadin.com"&gt;Vaadin&lt;/A&gt;. The deck from the  &lt;a href = "http://www.slideshare.net/joshlong/cf-vaadin"&gt;talk from the Vaadin dev meetup on Spring, Roo and Vaadin  is available&lt;/A&gt;, and so is the  deck from the &lt;a href= "http://www.slideshare.net/joshlong/a-running-tour-of-cloud-foundry"&gt;JFokus Cloud Foundry quickie is available here&lt;/a&gt;.
	&lt;/P&gt;</summary>
    <dc:date>2012-02-17T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Spring IO 2012</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/spring_io_2012.html" />
    <author>
      <name />
    </author>
    <modified>2012-02-17T00:00:00Z</modified>
    <issued>2012-02-17T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt; 
 &lt;img src = "/jl/media/17246.png" style = "margin-right:10px;float:left;" width  = "300"/&gt;
Looking forward to presenting my talk on  &lt;a href ="http://www.springio.net/agenda"&gt;Integration and Batch Processing with Cloud Foundry&lt;/A&gt; tomorrow at Spring IO 2012.  
	
	RabbitMQ, Spring Integration and Cloud Foundry are Natural Vehicles for applications that handle large workloads and scale well. In this talk, I'll introduce common architectural patterns to  better scale, using Spring Integration and Spring Batch, using RabbitMQ as the communication fabric.  For those of you who want the deck, &lt;a href = "http://www.slideshare.net/joshlong/enterprise-integration-and-batch-processing-on-cloud-foundry"&gt;it's available here&lt;/a&gt;.
&lt;/P&gt;</summary>
    <dc:date>2012-02-17T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>A Google Music API, Please?</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/a_google_music_api_please.html" />
    <author>
      <name />
    </author>
    <modified>2012-01-26T00:00:00Z</modified>
    <issued>2012-01-26T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt;You know what I want? A Google Music API.  
	 I feel like Google Music's still the leader. Apple's iCloud just kind of leaves me cold. It not only stinks of lock -in, but it's not even particularly flexible. Where's my &lt;CODE&gt;.ogg&lt;/CODE&gt; support?
	&lt;/P&gt;&lt;P&gt;
The things I would do... 
&lt;/P&gt;&lt;P&gt; The Google Music App doesn't do the right thing a lot. I plug it into the car and hit play, thinking it'll either playing all songs after it, or the whole album, and often it just plays one song. Even worse, the shuffle function's odd. Google Music has weird behavior when you run the Navigation app and have to share the audio with other apps. Sometimes when Google Music gets the control back, it doesn't pick up and go, again. 
&lt;/P&gt;&lt;P&gt;
Finally, I want Google Music on Roku, and on other devices. Otherwise, I still don't feel like I could just throw away my CDs, yet. And, while I appreciate that there's a "offline" mode for Google Music, I still don't see a way for me to get my original music back. Where's my &lt;a href = "http://www.dataliberation.org/"&gt;liberated data&lt;/a&gt; section for my music?&lt;/P&gt;</summary>
    <dc:date>2012-01-26T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Supporting Your Own Field or Method Injection Annotation Processors in Spring</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/supporting_your_own_field_or_method_injection_annotation_processors_in_spring.html" />
    <author>
      <name />
    </author>
    <modified>2012-01-01T00:00:00Z</modified>
    <issued>2012-01-01T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt;
	
		 So, I had a use case the other day - I wanted to support a custom annotation for denoting injection at the class level.  
		Spring users will know that Spring already supports  
		 Spring's native 
		&lt;CODE&gt;@Autowired&lt;/CODE&gt;, JSR 330's &lt;CODE&gt;@javax.inject.Inject&lt;/CODE&gt;, and JSR 250's '&lt;CODE&gt;@javax.resource.Resource&lt;/CODE&gt;.  
		
		These annotations, when placed on a setter, or a field, signal to Spring that  		
		a value should be injected at the site of the annotation. These annotations 
		are synonyms for the same thing.
		
		Spring also supports other annotations - like the JPA 1.0 &lt;CODE&gt;@javax.persistence.PersistenceContext&lt;/CODE&gt;  
		annotation. The annotation is used in a special circumstance, when you want Spring to inject an &lt;CODE&gt;EntityManager&lt;/CODE&gt; or an &lt;CODE&gt;EntityManagerFactory&lt;/CODE&gt;.
		 Here are some examples. 
		&lt;/p&gt;
&lt;PRE&gt;&lt;CODE&gt;
	@javax.inject.Inject 
	private DataSource dataSource ;
	
	@Autowired  
	public void setDataSource(DataSource ds){
	  this.datSource = ds ;
	}
	
	@PersistenceContext 
	private EntityManager entityManager; 	
&lt;/CODE&gt;&lt;/PRE&gt;		
		&lt;P&gt;  
		 To "teach" Spring what to do with a custom annotation like &lt;CODE&gt;@PersistenceContext&lt;/CODE&gt; is fairly easy once you know the actors involved. 
		 The work is typically done inside of a special &lt;CODE&gt;BeanPostProcessor&lt;/CODE&gt;.  What we want is a framework hook to inspect the beans after the bean's have been created, but before they've been populated with properties. 
	 The &lt;CODE&gt;BeanPostProcessor&lt;/CODE&gt; interface is powerful, but not quite what we need. What we actually need 
	is a combination of the the more specialized &lt;CODE&gt;InstantiationAwareBeanPostProcessor&lt;/CODE&gt; and &lt;CODE&gt;MergedBeanDefinitionPostProcessor&lt;/CODE&gt;.  
	
&lt;CODE&gt;InstantiationAwareBeanPostProcessor&lt;/CODE&gt;   
  provides the following callback method: &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PropertyValues postProcessPropertyValues( PropertyValues pvs, PropertyDescriptor[] pds, 
		                       Object bean, String beanName) throws BeansException;&lt;/CODE&gt;&lt;/PRE&gt;  
	The callback hook  lets you  stipulate a value for a properties on the bean. We can use that to inject custom values.
		
		It turns out that Spring already provides a convenient framework object that you can use to handle the duty of injection called &lt;CODE&gt;InjectionMetadata&lt;/CODE&gt;. The metadata represents information about the injection sites. You can extend this class and provide specific metadata about the call site - perhaps by caching the contents of the annotation that you're dealing with - and then use that to actually perform the injection. It is up to you to crawl the beans - including the super classes and so on - to gather the fields and property setters and then provide the relevant &lt;CODE&gt;InjectionMetadata&lt;/CODE&gt;. 
		
 There's a lot of expectations here, but it's pretty simple to implement. I have provided a reusable base class (below) that generalizes all but the specific concerns. This code is written in Scala, but it can be reused from Java, once compiled. Alternatively, it wouldn't be hard to translate to Java. The only thing that wouldn't map nicely into Java are the uses of callback methods, which can be expressed nicely in Scala, but would require an object with a callback method. (I probably should re-write it in Java and provide callback interfaces  in lieu of the various callback methods or provide an abstract base class with well known, abstract callback methods) 
Anyway, you can basically ignore the implementation - it's presented so you can include it in your project (under the Apache 2 license, of course). 
See you after the example to 
    see how to implement it.
		
	 &lt;/P&gt;
   &lt;PRE&gt;&lt;CODE&gt;
	package com.joshlong.spring.util 
	import org.springframework.beans.factory.support.{RootBeanDefinition, MergedBeanDefinitionPostProcessor}
	import org.springframework.beans.factory.annotation.InjectionMetadata
	import org.springframework.beans.factory.BeanCreationException
	import java.beans.PropertyDescriptor
	import org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor
	import org.springframework.beans.PropertyValues
	import java.util.LinkedList
	import java.lang.{String, Class}
	import java.lang.reflect.{Method, Field, Member, Modifier}
	import org.apache.commons.logging.LogFactory
	class AnnotatedSiteInjectionPostProcessor [T &amp;lt;: AnyRef, X &amp;lt;: java.lang.annotation.Annotation]
	  (annotation: Class[X], fieldMetadataCallback: (X, Field) =&gt; InjectionMetadata.InjectedElement, methodMetadataCallback: (X, Method) =&gt; InjectionMetadata.InjectedElement)
	  extends InstantiationAwareBeanPostProcessor with MergedBeanDefinitionPostProcessor {
	  val logger = LogFactory.getLog(getClass)
	  def postProcessBeforeInstantiation(beanClass: Class[_], beanName: String) = null
	  def postProcessBeforeInitialization(bean: AnyRef, beanName: String) = bean
	  def postProcessAfterInstantiation(bean: AnyRef, beanName: String) = true
	  def postProcessAfterInitialization(bean: AnyRef, beanName: String) = bean
	  def postProcessMergedBeanDefinition(beanDefinition: RootBeanDefinition, beanType: Class[_], beanName: String) {
	    if (beanType != null) {
	      var metadata: InjectionMetadata = findInjectionSiteMetadata(beanType)
	      metadata.checkConfigMembers(beanDefinition)
	    }
	  }
	  def postProcessPropertyValues(pvs: PropertyValues, pds: Array[PropertyDescriptor], bean: AnyRef, beanName: String): PropertyValues = {
	    try {
	      logger.debug("about to attempt injection for class "+ bean.getClass )
	      val metadata = findInjectionSiteMetadata(bean.getClass)
	      metadata.inject(bean, beanName, pvs)
	    } catch {
	      case ex: Throwable =&gt;
	        throw new BeanCreationException(beanName, "Injection of persistence dependencies failed", ex)
	    }
	    pvs
	  }
	  private def doWithMembers[T &amp;lt;: Member](clazz: Class[_], filter: T =&amp;gt; Boolean, fieldsFactory: (Class[_]) =&amp;gt; Array[T], doWith: T =&amp;gt; Unit) = {
	    var targetClass: Class[_] = clazz
	    do {
	      fieldsFactory(targetClass).filter(filter).foreach(doWith)
	      targetClass = targetClass.getSuperclass
	    } while (targetClass != null &amp;amp;&amp;amp; !targetClass.equals(classOf[AnyRef]))
	  }
	  private def findInjectionSiteMetadata(clazz: Class[_]): InjectionMetadata = {
	    val currElements = new LinkedList[InjectionMetadata.InjectedElement]
	    doWithMembers[Field](clazz, f =&gt; !Modifier.isStatic(f.getModifiers) &amp;amp;&amp;amp; f.getAnnotation(annotation) != null, c =&gt; c.getDeclaredFields, f =&gt; {
	      val fieldAnnotation = f.getAnnotation(annotation)
	      val injectedElement = fieldMetadataCallback(fieldAnnotation, f)
	      currElements.add(injectedElement)
	    })
	    doWithMembers[Method](clazz, f =&gt; !Modifier.isStatic(f.getModifiers) &amp;amp;&amp;amp; f.getAnnotation(annotation) != null, c =&gt; c.getDeclaredMethods, m =&gt; {
	      val methodAnnotation = m.getAnnotation(annotation)
	      val injectedElement = methodMetadataCallback(methodAnnotation, m)
	      currElements.add(injectedElement)
	    })
	    new InjectionMetadata(clazz, currElements)
	  }
	}
	&lt;/CODE&gt;&lt;/PRE&gt;
	
&lt;p&gt;
	
	This class takes care of crawling the beans and performing the injection for you. All it needs from you is a subclass of  &lt;CODE&gt;InjectionMetadata.InjectedElement&lt;/CODE&gt;, which you provide. That object in turn is responsible for ultimately providing the reference to the object that you want to be injected based on the metadata available. To make this easy, this particular responsibility is factored out as callback functions which you provide in your concrete implementation. 
	
 To do its work, you need to tell this class which annotation to match, and the type of object you'd like to inject (you could stipulate just a regular  &lt;CODE&gt;java.lang.Object&lt;/CODE&gt;, or, in Scala terms, an &lt;CODE&gt;AnyRef&lt;/CODE&gt;.).  
	&lt;/P&gt;
 &lt;P&gt; 
	In this particular example, I want an annotation that can be used to lookup, and inject, a reference to an 
	&lt;a href = "http://akka.io"&gt;Akka&lt;/a&gt; actor, called a &lt;CODE&gt;ActorRef&lt;/CODE&gt; in Akka parlance. Akka actors can live locally, or remotely, and when injected you can lookup an Actor by a logical name or by a path, which itself can be absolute, or relative, as Akka actors form supervisory hierarchies which map very much like a file system. For more information on the supported addressing scheme, check out &lt;A href ="http://akka.io/docs/akka/2.0-M1/general/addressing.html"&gt;ths document from the Akka documentation&lt;/A&gt;.
&lt;/p&gt;
&lt;P&gt; So, the example (in Java) might look like this:&lt;/P&gt;
&lt;code&gt;&lt;pre&gt;@ActorReference("akka://my-system@serv.example.com:5678/app/service-b") private ActorRef actorRef ; &lt;/pre&gt;&lt;/CODE&gt; or (in Scala)
	&lt;code&gt;&lt;pre&gt;@ActorReference("akka://my-system@serv.example.com:5678/app/service-b") private var actorRef: ActorRef = _  &lt;/pre&gt;&lt;/CODE&gt; 
	
Let's see how to implement this using the base class described above.
 &lt;/P&gt;
&lt;P&gt; First, we need to extend the base class, and provide the callback hooks that tell the base class what to do with a field or property (a setter method).  In our case, this is pretty simple, and straight forward:
&lt;/p&gt;
&lt;PRE&gt;&lt;CODE&gt;class ActorReferenceAnnotatedSiteInjectPostProcessor(actorSystem: ActorSystem)
  extends AnnotatedSiteInjectionPostProcessor[ActorRef, ActorReference](
    classOf[akka.spring.ActorReference],
    (ar: ActorReference, f: Field) =&gt; new ActorReferenceInjectedElement(actorSystem, ar, f, null),
    (ar: ActorReference, m: Method) =&gt; new ActorReferenceInjectedElement(actorSystem, ar, m, BeanUtils.findPropertyForMethod(m)))
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; In this class, we extend the base class and call the constructor, passing in the class of the annotation to detect, a callback method which accepts an instance of the annotation and a particular instance of a field, and another callback method and a particular instance of a method.  The contract is that, given the instance of the annotation and matching field or method, you will return an instance (or sublcass of) the &lt;CODE&gt;InjectionMetadata.InjectedElement&lt;/CODE&gt; class.  So, that's what we do, constructing an instance of &lt;CODE&gt; ActorReferenceInjectedElement&lt;/CODE&gt; with the &lt;CODE&gt;ActorSystem&lt;/CODE&gt; reference given in this subclass' constructor and the detected  &lt;CODE&gt;ActorReference&lt;/CODE&gt; annotation, and the detected class member to which the annotation was attached, a &lt;CODE&gt;java.lang.reflect.Field&lt;/CODE&gt; or &lt;CODE&gt;java.lang.reflect.Method&lt;/CODE&gt; as well as the annotation itself.
	
	&lt;/p&gt;
	 &lt;P&gt; The &lt;CODE&gt;ActorReferenceInjectedElement&lt;/CODE&gt; is where the important work happens. 
	       Let's take a look at that class. 
	 &lt;/P&gt;
	&lt;PRE&gt;&lt;CODE&gt;class ActorReferenceInjectedElement(
  actorSystem: ActorSystem, 
  annotation:ActorReference, 
  member: Member, 
  propertyDescriptor: PropertyDescriptor) 
extends InjectionMetadata.InjectedElement(member, pd) {
			
  override def getResourceToInject(target: AnyRef, requestingBeanName: String) = actorSystem.actorFor(annotation.value() )
}
	&lt;/PRE&gt;&lt;/CODE&gt;
	&lt;P&gt;If you read Scala, then this is a pretty simple class. The constructor (the prototype of which is included inline in the class declaration, at the top) expects an &lt;CODE&gt;ActorSystem&lt;/CODE&gt;, a reference to the &lt;CODE&gt;ActorReference&lt;/CODE&gt; annotation, a &lt;CODE&gt;java.lang.reflect.Member&lt;/CODE&gt; (the common base class of both &lt;CODE&gt;Field&lt;/CODE&gt; and &lt;CODE&gt;Method&lt;/CODE&gt;), and a &lt;CODE&gt;PropertyDescriptor&lt;/CODE&gt;. We don't use the &lt;CODE&gt;PropertyDescriptor&lt;/CODE&gt; in this code (except to invoke the super constructor), but it's nice to know that we have it available. It might be &lt;CODE&gt;null&lt;/CODE&gt;, however, if we're looking at a &lt;CODE&gt;java.lang.reflect.Field&lt;/CODE&gt;. The unspoken bit is that the constructor arguments implicitly become class variables, and so are reference-able from other methods. 
		&lt;/p&gt;
		&lt;P&gt;  In the class, we override the &lt;CODE&gt;getResourceToInject&lt;/CODE&gt; method, providing the object to be injected. 
 We simply need a reference to the actor, so call &lt;CODE&gt;actorSystem.actorFor&lt;/CODE&gt; with the String that was provided as part of the annotation (the &lt;CODE&gt;value()&lt;/CODE&gt; field). We could, for example, provide a wrapper object  instead of the reference itself.  This is what happens when you use the &lt;CODE&gt;@PersistenceContext&lt;/code&gt; annotation. It injects an &lt;CODE&gt;EntityManager &lt;/CODE&gt; proxy that in turn manages thread-local  
 &lt;CODE&gt;EntityManager&lt;/CODE&gt;s so that no matter which thread you call a method on, if it accesses the class &lt;CODE&gt;EntityManager&lt;/CODE&gt;, it's guaranteed to be thread-safe. We don't do anything fancy like that in this case, but it's easy to see the potential there.
			&lt;/P&gt;
			&lt;P&gt;Now, all that's left to do is register the &lt;CODE&gt;ActorReferenceAnnotatedSiteInjectPostProcessor&lt;/CODE&gt; 
				 in your Spring configuration.  It's just a regular bean with constructor arguments. Spring detects the interfaces and calls the appropriate methods. Here's a code configuration based example (written in Scala):
				&lt;/p&gt;
				&lt;PRE&gt;&lt;CODE&gt;
@Configuration 
class MyAkkaConfiguration  {
  @Bean def actorSystem = ... // provide your own reference 
	
  @Bean def actorReferenceAnnotatedSiteInjectPostProcessor = 
    new ActorReferenceAnnotatedSiteInjectPostProcessor( this.actorSystem())	
	
  @Bean("sample") def someBeanThatDependsOnActors =
    new Object {  // anonymous inline object just to show you what a usage might look like 
      @ActorReference("myActor") 
      var someActor:ActorRef = _ 	
    }
} 					
object Main {
  val ac = new AnnotationConfigApplicationContext(classOf[MyAkkaConfiguration])
  val sample  = ac.getBean("sample")
  Assert.notNull( sample.actorSystem )	
}</summary>
    <dc:date>2012-01-01T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>The Week Spring 3.1 Went GA, or, The Holidays Begin Now!</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/the_week_spring_31_went_ga_or_the_holidays_begin_now.html" />
    <author>
      <name />
    </author>
    <modified>2011-12-17T00:00:00Z</modified>
    <issued>2011-12-17T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt; 
  This week has been nothing short of a rollercoaster! 
 The week started with Spring 3.1 debuting, chock full of new features. From the release announcement, 
&lt;/p&gt; 
&lt;p&gt;
 &lt;/P&gt;
 &lt;OL&gt; &lt;LI&gt; The environment abstraction and the associated bean definition profiles, along with centrally configurable property sources for placeholder resolution.  &lt;/LI&gt;
	&lt;LI&gt; Java-based application configuration based on @Enable* annotations on configuration classes, allowing for convenient container configuration: e.g. using @EnableTransactionManagement to activate declarative transaction processing.
		&lt;/LI&gt;
		&lt;LI&gt;
			
 The cache abstraction with our declarative caching solution (@Cacheable etc) on top, focusing on convenient interaction between application code and cache providers.
&lt;/LI&gt;
&lt;LI&gt; The Servlet 3.0 based &lt;CODE&gt;WebApplicationInitializer&lt;/CODE&gt; mechanism for bootstrapping a Spring web application without web.xml! This is a key piece in Spring's web configuration story, providing a rich alternative to XML-based bootstrapping.
	&lt;/li&gt;
 &lt;LI&gt; Revised MVC processing with flash attribute support, a new &lt;CODE&gt;@RequestPart&lt;/CODE&gt; annotation, and further REST support refinements. This new &lt;CODE&gt;HandlerMapping&lt;/CODE&gt;/&lt;CODE&gt;HandlerAdapter&lt;/CODE&gt; variant is also highly extensible for custom MVC needs.
Beyond the above major themes, we invested into our O/R Mapping support, allowing for JPA package scanning without &lt;CODE&gt;persistence.xml&lt;/CODE&gt;, and supporting Hibernate 4.0 (CR7 at this time - we will fully support Hibernate 4.0 GA once released). &lt;/LI&gt;
&lt;li&gt;Last but not least, this is the first Spring release with first-class Java 7 support. While older Spring versions run perfectly fine on Java 7, Spring 3.1 goes the extra mile and fully supports JDBC 4.1 as well as convenient &lt;CODE&gt;ForkJoinPool&lt;/CODE&gt; setup and injection.
	&lt;/li&gt; 
	&lt;LI&gt; As usual, this release also includes many recent bug fixes. Spring 3.1 is fully compatible with Spring 3.0 and continues to have Java 5+ and Servlet 2.4+ as minimum system requirements. We recommend a Spring 3.1 upgrade to all Spring 3.0.x users. &lt;/LI&gt;
	&lt;/ol&gt;
	&lt;P&gt; 
 That was Tuesday. The web reacted as expected, with news announcements aplenty, &lt;a href = "http://www.theserverside.com/news/thread.tss?thread_id=63370"&gt;on TheServerSide&lt;/a&gt;, on &lt;A href = "http://www.infoq.com/news/2011/12/spring31"&gt;InfoQ&lt;/a&gt;, and on &lt;a href= "http://www.dzone.com/links/r/spring_31_goes_ga.html"&gt;Dzone&lt;/a&gt;, and &lt;a href= "https://www.google.com/search?ix=heb&amp;sourceid=chrome&amp;ie=UTF-8&amp;q=spring+3.1+goes+GA"&gt;on a zillion other sites, too&lt;/a&gt;.
	&lt;/P&gt;
	
	&lt;P&gt; Then, Costin Leau, who I'm pretty sure never sleeps, shipped  
		&lt;a href= "http://www.springsource.org/node/3336"&gt;Spring Data Gemfire 1.1.0&lt;/a&gt;, and &lt;a href= "http://www.springsource.org/node/3337"&gt;Spring Data Redis 1.0.0&lt;/a&gt;, 
   both of which have many new features and are compatible with Spring 3.1. 
 
&lt;/P&gt;
&lt;P&gt; Then, &lt;a href= "http://feedproxy.google.com/~r/SpringSourceTeamBlog/~3/YZic2TTMh1A/"&gt;Grails 2.0 was released&lt;/a&gt;, also compatible with Spring 3.1. &lt;/P&gt; 
 &lt;P&gt; &lt;EM&gt;Then&lt;/Em&gt;,  &lt;A href = "http://www.springsource.org/node/3338"&gt;vFabric SQLFire 1.0 was Released&lt;/a&gt;!
	
	SQLFire, for those of you who haven't heard about it before, is an SQL92 compliant database that runs on top of GemFire, the distributed data grid product from VMware. It can be used to run, unchanged, a good many existing RDBMS applications and acheive drastic improvements in speed immediately.  This has little to do with Spring 3.1, but is instead a release of its own import, also released in the last week. 
	 &lt;/P&gt;
	&lt;P&gt; Then, Spring Social 1.0.1 was released, &lt;em&gt;also&lt;/em&gt; compatible with Spring 3.1! Spring Social's release is important too because other projects depend on it. So, we can expect to see the floodgates open even more soon with more releases, all because Spring 3.1 was released. 
		&lt;/p&gt; 
		&lt;P&gt; To top things off, &lt;a href= "http://www.springsource.org/node/3340"&gt;Oleg Zhurakousky's interview at JavaOne with InfoQ on messaging, Spring, and the cloud&lt;/a&gt; is now available, and so is  &lt;a href = "http://www.infoq.com/presentations/Making-the-Mobile-Web-Native-with-PhoneGap"&gt;Roy Clarkson and Keith Donald's SpringOne2GX talk on Making the Mobile Web Native with PhoneGap&lt;/a&gt;. 
			&lt;/P&gt; &lt;P&gt; Awesome. &lt;/P&gt; 
			
			&lt;P&gt; I for one, need a breather. Can't wait until this weekend. 
				&lt;/P&gt; 
			
			&lt;P&gt; 
				 Next week's going to be crazy, as well. I'll be at the &lt;a href= "http://www.sdjug.org/"&gt;San Diego JUG on December 20th&lt;/a&gt;, talking about all things Spring and Cloud Foundry. There are actually two talks, one on Spring and Cloud Foundry, and another still on Tailoring Spring for Custom Usage. 
				 Hope to see you there!
 
			&lt;/P&gt;</summary>
    <dc:date>2011-12-17T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Mamacita...</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/mamacita.html" />
    <author>
      <name />
    </author>
    <modified>2011-12-10T00:00:00Z</modified>
    <issued>2011-12-10T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt; Yeah, so &lt;em&gt;&lt;a href="http://www.youtube.com/watch?v=N3eAaxQVaHE"&gt;this&lt;/a&gt;&lt;/em&gt; is stuck in my head. &lt;em&gt; Sigh&lt;/em&gt;. It's really catchy... the first twenty or thirty times.&lt;/P&gt;</summary>
    <dc:date>2011-12-10T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Simple things I do to OS X itself whenever I set it up</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/simple_things_i_do_to_os_x_itself_whenever_i_set_it_up.html" />
    <author>
      <name />
    </author>
    <modified>2011-12-03T00:00:00Z</modified>
    <issued>2011-12-03T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt; I do a few things to every OS X installation to make them more useful. Most of the things I mention below are things you can do to OS X itself, some are third party applications that are generally useful. I hope they help you, but really I'm listing them here so  I don't have to rediscover this stuff again next time I'm doing a fresh OS X installation. ;-)   My hope is that these are general, generic and useful enough to be applicable for everybody, not just software developers with a penchant for photography like myself. 
	
	
	I've put all the things I could remember here, but I'm sure I've probably forgotten a few, too. I'l follow up if I think of anything. 
&lt;/P&gt;
&lt;OL&gt; &lt;LI&gt; &lt;b&gt;Enable Remote Login&lt;/b&gt;  Go to &lt;EM&gt;System Preferences&lt;/EM&gt; &amp;gt; &lt;EM&gt;Sharing&lt;/EM&gt; &amp;gt; and then enable &lt;EM&gt;Remote Login&lt;/EM&gt;. This will give you SSH access to your machine, which of course should need  no justification. 
	&lt;/LI&gt;
&lt;LI&gt;  &lt;B&gt;Add a Login menu to the Finder&lt;/b&gt; Go to &lt;EM&gt;System Preferences&lt;/EM&gt; &amp;gt; &lt;EM&gt;Users &amp;amp; Groups&lt;/em&gt; &amp;gt; and select the &lt;EM&gt;Login Options&lt;/EM&gt; item on the left, with the picture of the house next to it. Then, choose &lt;EM&gt;Show Input menu in Login Window&lt;/EM&gt; and select &lt;EM&gt;Show fast User Switching Menu as [Full Name]&lt;/EM&gt;.
	 This is useful as a quick way to lock the screen, as well as change accounts. You can, of course, use Hot Corners to trigger the login screen, but I found I kept accidentally triggering them.
	
&lt;/LI&gt;
&lt;LI&gt;  &lt;B&gt;Show a Full Date &lt;/B&gt;  Go to &lt;EM&gt;System Preferences&lt;/EM&gt; &amp;gt; Date &amp;amp; Time &amp;gt; and then choose &lt;EM&gt;Show the day of the week&lt;/EM&gt;, &lt;EM&gt;Show date&lt;/EM&gt;, &lt;EM&gt;Use a 24-hour clock&lt;/EM&gt;, and &lt;EM&gt;Display the time with seconds&lt;/EM&gt;. I also &lt;u&gt;uncheck&lt;/u&gt; &lt;EM&gt;Flash the time separators&lt;/EM&gt;.	
	 &lt;/LI&gt; 
	&lt;LI&gt; &lt;B&gt;
	 Make the Dock Less Obtrusive&lt;/B&gt;	Go to &lt;EM&gt;System Preferences&lt;/EM&gt; &amp;gt; Date &amp;amp; Time &amp;gt; and select &lt;EM&gt;Minimize windows into application icon&lt;/EM&gt;, &lt;EM&gt;Automatically hide and show the Dock&lt;/EM&gt;, and &lt;EM&gt;Show indicator lights for open applications&lt;/EM&gt;.  Finally, drag the divider - it looks like a broken, vertical line that narrows towards the top - between the dock and the rest of the icons and make the dock as small as you're comfortable seeing with and could still reach with some accuracy with a flick of the mouse. 
		 &lt;/LI&gt;
		&lt;LI&gt;  &lt;B&gt;Know Your Shortcuts&lt;/B&gt; While OS X's Finder is pretty shortcut-phobic, it does have some pretty useful ones. 
			
			&lt;TABLE border="0"  cellpadding="0" cellspacing="5"&gt;
				&lt;TR&gt; &lt;TD width = "100" align="right"&gt;Home Directory&lt;/TD&gt;
				  &lt;TD width = "10"&gt;&amp;nbsp;&lt;/TD&gt;
			    &lt;TD&gt;COMMAND + SHIFT + H&lt;/td&gt;&lt;/tr&gt;
				&lt;TR&gt; &lt;TD align="right"&gt;Applications Directory&lt;/TD&gt;
				  &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
			    &lt;TD&gt;COMMAND + SHIFT + A&lt;/td&gt;&lt;/tr&gt;
				&lt;TR&gt; &lt;TD align="right"&gt;Utilities Directory&lt;/TD&gt;
				  &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
			    &lt;TD&gt;COMMAND + SHIFT + U&lt;/td&gt;&lt;/tr&gt;
				&lt;TR&gt; &lt;TD align="right"&gt;Desktop Directory&lt;/TD&gt;
				  &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
			    &lt;TD&gt;COMMAND + SHIFT + D&lt;/td&gt;&lt;/tr&gt;	
						&lt;TR&gt; &lt;TD align="right"&gt;  Computer window &lt;/TD&gt;
						  &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
					    &lt;TD&gt;COMMAND + SHIFT + C&lt;/td&gt;&lt;/tr&gt;																											
					&lt;/table&gt; 
					For more, consult &lt;a href="http://support.apple.com/kb/ht1343"&gt;this useful Apple support doc&lt;/a&gt;.
			
			   &lt;/LI&gt;
		&lt;LI&gt;   
			&lt;B&gt; Clean the DockRot&lt;/b&gt; Drag Everything on the dock away that you're not absolutely sure you're going to need. I try to keep mine as an indicator of the applications that are open, so I remove about everything except the &lt;EM&gt;Trash&lt;/EM&gt;, &lt;EM&gt;Launchpad&lt;/EM&gt;, and &lt;EM&gt;Mission Control&lt;/EM&gt;.  
				
				There are lots of ways to still get to your often used applications.  You can of course use something like Spotlight, but there are even better (albeit third party) tools like &lt;A  href= "http://qsapp.com/"&gt;QuickSilver&lt;/A&gt; and &lt;A href= "http://www.alfredapp.com/"&gt;Alfred&lt;/A&gt; that can make all applications trivial to access.  I know I implied I wasn't going to mention third party applications, so let me also remind you that you can get at your applications very quickly by using Spotlight or the two commands mentioned above - COMMND + SHIFT + U (for the &lt;EM&gt;Utilities&lt;/EM&gt; folder) and COMMAND + SHIFT + A (for the &lt;EM&gt;Applications&lt;/EM&gt; folder).
				
			&lt;/LI&gt;
	&lt;LI&gt; 
 &lt;B&gt;Disable Spotlight&lt;/b&gt;    	 Since I don't ask much of the Dock, and since I use things like Alfred or Quick Silver, it's useful to reuse  Spotlight's keyboard shortcut for those alternative application switchers. While there are a lot of ways to disable Spotlight more effectively, for my purposes it is enough to simply disable the key command and render Spotlight partially inert. Go to &lt;EM&gt;System Preferences&lt;/EM&gt; &amp;gt; &lt;EM&gt;Spotlight&lt;/EM&gt;, and uncheck every checkbox there under the &lt;EM&gt;Search Results&lt;/EM&gt; list. Uncheck the two options below, &lt;EM&gt;Spotlight menu keyboard shortcut&lt;/EM&gt; and &lt;EM&gt;Spotlight window keyboard shortcut&lt;/EM&gt;.
    &lt;/LI&gt; 
 &lt;LI&gt; &lt;B&gt;Speak Truth (About) Power&lt;/B&gt; You can view detailed information about your Mac's power consumption (if you're on a laptop variety) by going to 
	   &lt;EM&gt;System Preferences&lt;/EM&gt; &amp;gt; &lt;EM&gt;Energy Saver&lt;/EM&gt; and then selecting &lt;EM&gt;Show battery status in menu bar&lt;/EM&gt;. In the menu bar, right click on the power icon, and choose &lt;EM&gt;Show&lt;/EM&gt; &amp;gt; &lt;EM&gt;Time&lt;/EM&gt; (to see how much time you've got left before the charge runs out) or &lt;EM&gt;Show&lt;/EM&gt; &amp;gt; &lt;EM&gt;Percentage&lt;/EM&gt; to see how much battery power you've got left.  &lt;/li&gt;
	&lt;LI&gt; 
&lt;B&gt;		   Switch Resolutions on the Fly&lt;/B&gt; I end up plugging into projectors and into various monitors a lot in my work, so keep in mind this might be more valuable to me than it is to you. Go to   &lt;EM&gt;System Preferences&lt;/EM&gt; &amp;gt; then select &lt;EM&gt;Show displays in menu bar&lt;/EM&gt;. This will install a menu in the menu bar that you can use to quickly switch resolutions and access monitor settings.
		&lt;/LI&gt;
		&lt;LI&gt; &lt;B&gt;Install a better browser&lt;/B&gt; I've always installed as many browsers as possible. It used to be because I wanted to have a better developer-friendly tool to develop web applications with, or because I wanted to have a browsers to test the rendering of my web applications, but these days I'd recommend anybody do it because the default browsers in all operating systems usually leave something to be desired. OS X and Safari, in my humblest of opinions, is no different.  I'm using Chrome pretty happily these days, but that's not to say you need to. Next week Firefox might be back on top again! Who knows. Either way, get yourself a &lt;A href="http://www.google.com/chrome"&gt;better&lt;/A&gt; &lt;A href="http://www.getfirefox.com"&gt;browser&lt;/A&gt;.  &lt;/LI&gt;
		&lt;LI&gt; &lt;B&gt;S&lt;b&gt;Witch&lt;/b&gt; it up&lt;/b&gt;  
			 Switching between applications with the COMMAND + TAB shortcut in OS X is tedious. If you are using an application like Chrome which can have multiple document windows, then you will simply be returned to the application itself, not any specific document in that application. Similarly, if you have minimized a window, COMMAND + TAB'ing to that window will not "activate" and focus on it. So, I sought another option and the intertubes pointed me to &lt;A href="http://manytricks.com/witch/"&gt;Witch&lt;/a&gt;. It fixes all of these problems, and more, although be warned it costs (USD $14, as of this writing).
				 
			&lt;/LI&gt;
&lt;/OL&gt;</summary>
    <dc:date>2011-12-03T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Devoxx 2011 Report and Seattle Mongo 2011</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/devoxx_2011_report_and_seattle_mongo_2011.html" />
    <author>
      <name />
    </author>
    <modified>2011-11-30T00:00:00Z</modified>
    <issued>2011-11-30T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;TABLE border="0"   cellpadding="0" cellspacing="0"&gt;&lt;TR&gt;
    &lt;TD&gt;&lt;img src = "/jl/media/16331.jpg" width="703"  height = "350"/&gt;&lt;/TD&gt;&lt;TD&gt;&lt;img src = "/jl/media/16330.jpg" width="233"  height = "350"/&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/table&gt;
    
&lt;P&gt; 
  &lt;A HREF  = "http://devoxx.com"&gt;Devoxx&lt;/a&gt; is a huge conference that redefines "community." I like the conference - a true &lt;EM&gt;paradise&lt;/EM&gt; - it has a lot more soul than JavaOne and represents a really nice sampling of what's what out there, not just what Oracle's working on. So, it was with great pleasure that I went, despite being pretty sick. I stopped by the doctor's on my way out of town and loaded up in antibiotics then began the 20-hour door-to-door journey from Los Angeles, United States to Antwerp, Belgium.  &lt;/P&gt;&lt;p&gt; 
	  I gave a 15 minute &lt;EM&gt;quickie&lt;/EM&gt; on Spring Roo, a 3-hour university talk on &lt;a href= "http://www.springframework.org"&gt;Spring&lt;/a&gt; on &lt;a href= "http://www.cloudfoundry.org"&gt;Cloud Foundry&lt;/a&gt; (with Chris Richardson), a regular talk on Spring on Cloud Foundry (with Patrick Chanezon),  another regular talk on social Spring applications using Spring Social and Spring Integration, and I helped lead the Spring BOF.  Basically, I had more fun than anybody should be allowed. I may have looked (and felt)
	  like death warmed over, but I had a &lt;EM&gt;wonderful&lt;/EM&gt; time. All the talks were well attended, and I loved the feedback! Keep it coming, guys.  	&lt;/P&gt;  
      
      &lt;P&gt;  
 That said, I'm now on a flight heading to Seattle, Washington, where I'll present on &lt;a href= "http://www.cloudfoundry.org"&gt;Cloud Foundry&lt;/a&gt; and &lt;a href= "http://www.mongodb.org"&gt;Mongo DB&lt;/a&gt; at the &lt;A HREF= "http://www.10gen.com/events/mongo-seattle-2011"&gt;Mongo Seattle&lt;/A&gt; event. If you're in town, come see me! We can talk Spring, big data, cloud and anything else you'd like. Also,  if you know the area, I'd love to know which coffee shops will help me to best endure the inclement weather. Ping me on &lt;a href="http://www.twitter.com/starbuxman"&gt;Twitter&lt;/a&gt; or on &lt;a href="https://plus.google.com/105805020312347758498"&gt;Google+&lt;/a&gt;.
       
       See you there!&lt;/P&gt;</summary>
    <dc:date>2011-11-30T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Trip Roundup for October and November</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/trip_roundup_for_october_and_november.html" />
    <author>
      <name />
    </author>
    <modified>2011-11-11T00:00:00Z</modified>
    <issued>2011-11-11T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt; What a ridiculous blur of insanely fun travel and technology. &lt;/P&gt;
&lt;P&gt; I spoke at &lt;A HREF= "http://www.10gen.com/events/mongo-chicago-2011"&gt;the MongoDB Chicago conference&lt;/A&gt; on the 18th of October on using
  MongoDB with &lt;a href="http://www.springsource.org/spring-data"&gt;Spring Data&lt;/a&gt; Document on &lt;a href= "http://www.cloudfoundry.org"&gt;Cloud Foundry&lt;/A&gt;.
  
  This was a fantastic event and the response seemed enthusiastic about the cloud and, of course, Cloud Foundry. After all, Cloud Foundry was among the first (&lt;em&gt;the&lt;/EM&gt; first?) major PaaS players to bring MongoDB to market.  
  
  On a related note, I'm honored to say that I'll be giving the same talk (basically) at &lt;A href= "http://www.10gen.com/events/mongo-seattle-2011"&gt;Mongo Seattle, on December 1&lt;/A&gt;. If you're in Seattle, and want to grab a beer (or coffee!), then ping me on &lt;A href= "http://twitter.com/starbuxman"&gt;Twitter&lt;/a&gt; or on &lt;A href = "https://plus.google.com/105805020312347758498/posts"&gt;Google+&lt;/A&gt;. 
  Naturally, you could always just come to the Mongo Seattle event - $100 for a fully day of talks from experts in the field is &lt;EM&gt;amazingly&lt;/EM&gt; good deal (and, at this point, an ideal holiday gift!). &lt;/P&gt;
&lt;P&gt; That was October 18th. I flew home, caught my breath, and then &lt;em&gt;flew back&lt;/EM&gt; to Chicago for &lt;a href= "http://www.SpringOne2GX.com"&gt;SpringOne2GX&lt;/a&gt;, which I blogged about &lt;A href= "http://joshlong.com/jl/blogPost/springone2gx_2011.html"&gt;recently&lt;/A&gt;.
  
  SpringOne2GX  was &lt;EM&gt;amazing&lt;/EM&gt;. 
  I ended up doing not only the three talks I blogged about before, but an impromptu joint session with Roy Clarkson on HTML5 mobile application development. The whole conference is something not to be missed. What an absolutely amazing show filled with amazing people.&lt;/P&gt;
&lt;TABLE width="605"   BORDER="0" CELLPADDING ="0" CELLSPACING="0"&gt;
  &lt;tr&gt;
    &lt;tD width="300"&gt;&lt;img src = "/jl/media/15950.jpg"  width = "300" alt = "the venue at Mongo Chicago was called The Library, in a library"/&gt;&lt;/td&gt;
    &lt;TD width="300" &gt;&lt;img style="margin-left:5px;" src = "/jl/media/15949.jpg" width = "300"/&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td valign="top" style = "padding-bottom:5px;padding-top:5px; "&gt;&lt;em&gt; The Mongo Chicago venue at "The Library"&lt;/em&gt;&lt;/td&gt;
     &lt;td height="50" style = "padding-top:5px;padding-bottom:5px; padding-left:5px;" valign="top"&gt;&lt;EM&gt;Adam Fitzgerald kicking off the
      keynote festivities at &lt;B&gt;SpringOne2GX&lt;/b&gt;&lt;/EM&gt;&lt;/td&gt;
  &lt;/tr&gt;
 
&lt;/table&gt;
&lt;table width="605" border="0" cellpadding="0" cellspacing="0"&gt;
  &lt;tr&gt;
    &lt;td  valign="top"&gt;&lt;img src = "/jl/media/15951.jpg" width = "605"/&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td  valign="top" style = "padding-top:5px; padding-bottom:5px;"&gt;&lt;em&gt; The Chicago skyline  at night from  one of those trips. I love how the clouds hung in the air, making an otherwise mundane photo really beautiful. &lt;/em&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt; 
 &lt;P&gt; 
  I returned home just long enough to get a fresh load of laundry and then set back out to Sofia, Bulgaria, for one of my absolute favorite conferences, &lt;a href= "http://java2days.com"&gt;Java2Days&lt;/a&gt;.  
  
  The conference, in South East Europe, is at the nexus of Greece, Turkey, Italy, Armenia, etc., so it attracts a &lt;EM&gt;lot&lt;/EM&gt; of people who are really enthusiastic about the conference and the technology.
 &lt;/P&gt;
&lt;table width="605" border="0" cellpadding="0" cellspacing="0"&gt;
  &lt;tr&gt;
    &lt;td  valign="top"&gt;&lt;img src = "/jl/media/15948.png" width = "605"/&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td  valign="top" style = "padding-top:5px;padding-bottom:5px;"&gt; &lt;EM&gt;I met Jean Claude van Damme, and survived!&lt;/EM&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
 &lt;P&gt; 
  The conference itself is unrivaled, of course, but the real draw is the chance you have to meet and greet and to take in the culture. Pack your stomach pump, though, the &lt;em&gt;&lt;a href= "http://en.wikipedia.org/wiki/Rakia"&gt;rakia&lt;/a&gt;&lt;/em&gt; (and the fraternizing, dancing and fun that accompanies it!)  tends to sneak up on you!  
  
  I was at dinner on with  the other speakers and with attendees from the show and in walks &lt;EM&gt;Jean Claude van Damme&lt;/EM&gt; who was in town, apparently, shooting the &lt;a href="http://www.novinite.com/view_news.php?id=133389"&gt;&lt;em&gt;Expendables 2&lt;/em&gt;&lt;/a&gt;. He sat down, celebrated a bit and was even kind enough to indulge me in a photo, which I proudly post here. &lt;EM&gt;Merci, Jean-Claude!&lt;/EM&gt;
 &lt;/P&gt;
 
 &lt;P&gt;  I returned home on the 6th - giving me just enough time to get  a small flu and to prepare my decks for &lt;a href= "http://devoxx.com/display/DV11/Josh+Long"&gt;Devoxx&lt;/a&gt;, which I leave for on the 12th (in 24 hours, or so, basically). 
 
 If you're in Belgium, this is &lt;EM&gt;the&lt;/EM&gt; event to see! Come see me talk with Chris Richardson on Spring on Cloudfoundry for the university talk (3 hours! We're going to cover NoSQL, AMQP, the &lt;CODE&gt;&amp;lt;cloud:/&amp;gt;&lt;/CODE&gt;  namespace, and much more!) and with Patrick Chanezon for a 1-hour introduction to getting started with Spring on CloudFoundry.    Additionally, I'll be participating in the Spring BOF. I've also got a  
  Spring Roo "quickie" talk, and a talk on socializing your Spring applications using Spring Social. 
 
  Should be utterly exhausting, but I look forward to seeing you all there! We're gonna have a lot of fun. 
 &lt;/P&gt;</summary>
    <dc:date>2011-11-11T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>SpringOne2GX 2011</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/springone2gx_2011.html" />
    <author>
      <name />
    </author>
    <modified>2011-10-24T00:00:00Z</modified>
    <issued>2011-10-24T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt;  &lt;img src = "/jl/media/15417.png" style  = "float:left; margin-right:10px;"/&gt;&lt;a href= "http://www.springone2gx.com/conference/chicago/2011/10/home"&gt;SpringOne2GX 2011 is upon us&lt;/a&gt;!  I'm in a terminal at San Francisco Airport ("SFO," for those of us in the live-on-plains biz) waiting for my flight to Chicago. This year's going to be ridiculous. Honestly, I can't wait. 
&lt;/P&gt;
&lt;P&gt;   I've &lt;a href= "http://www.springone2gx.com/conference/speaker/josh_long"&gt;got &lt;EM&gt;three&lt;/EM&gt; talks&lt;/A&gt; - each 1.5 hours! So, eh, if you can't get enough of my ugly mug, then please join me for some of these  talks! &lt;/P&gt;
	
	&lt;P&gt; One talk is with Roy Clarkson, we're co-presenting on &lt;b&gt;Native Android Development&lt;/b&gt;.  This talk I look forward to quite a bit - Android's a powerful platform and certainly the most ubiquitious, so learning how to build a better Android application from client to server is &lt;EM&gt;very&lt;/EM&gt; useful!  (I can't wait to make it even more ubiquitous when I buy my &lt;a href="http://www.google.com/nexus"&gt;Galaxy Nexus!&lt;/a&gt;). 
 &lt;/P&gt; 
&lt;P&gt; &lt;img src = "/jl/media/15416.png" style = "float:right; margin-left :10px;"/&gt;  My second talk is a deep dive at Spring Batch. Sure, anybody can sling together a Spring Batch application, but do you really know what's going on there? Do you know what you &lt;em&gt;could&lt;/em&gt; do with Spring Batch? Spring Batch's so amazingly robust and feature rich that a lot of people just plunk down what they need to get their occasional batch processing solution finished, but don't stop to reflect on the power-user features as well as the details. This is a credit to Spring Batch - after all, the 80% case is &lt;EM&gt;super&lt;/EM&gt; simple. But, you can take it and further, and this talk should be a great start for the curious. Additionally, because I'll be diving deep into some basic concepts, this talk will also be a good introduction to Spring Batch for the uninitiated. 
	&lt;/P&gt;
	&lt;p&gt; 
	My last talk is that's a bit more medium-to-advanced level. In this talk, I'll introduce some of the Spring framework's various SPIs. Spring's a &lt;em&gt;very&lt;/EM&gt; simple technology and it features a rich component model and framework libraries that you can pull down and use, a la carte. However, a lot of Spring's power is in the stuff right below the surface - the extension points. Come learn about some of my favorite extension points in this talk. Remember, these extension points are the same ones that we leverage in building other Spring frameworks like Spring Integration, Spring Batch, etc., so this isn't just idle speculation! The most demanding user of the Spring framework is often the  engineer trying to build a sister project!
	&lt;/p&gt;</summary>
    <dc:date>2011-10-24T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Great Content to get Started with Neo4J and Spring Data Graph</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/great_content_to_get_started_with_neo4j_and_spring_data_graph.html" />
    <author>
      <name />
    </author>
    <modified>2011-10-10T00:00:00Z</modified>
    <issued>2011-10-10T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt;  I recently had somebody ask me what the best content for getting started with &lt;a href="http://neo4j.org/"&gt;Neo4J&lt;/a&gt; is. Naturally, my answer was to grab &lt;a href="http://www.springsource.org/spring-data/neo4j"&gt;Spring Data Graph&lt;/a&gt; and don't look back. But that's not entirely fair. Admittedly, you might be better served by simply learning Neo4J and then layering in the Spring Data support to reduce a lot of the tedium. So, without further ado, here's a list of great content that I put together for people who are looking to learn Neo4j and Spring Data Graph (which works with Neo4j.).
&lt;/p&gt;
&lt;UL&gt;
 &lt;LI&gt;
 Start with &lt;a href="http://docs.neo4j.org/chunked/snapshot/"&gt;the documentation&lt;/a&gt;, of course. Like SpringSource, the Neo4j team goes to extreme lengths to make sure their documentation reflects the APIs as the APIs evolve. If you want to get an idea of &lt;EM&gt; how &lt;/eM&gt; extreme, just ask &lt;a href="http://www.twitter.com/peterneubauer"&gt;Peter Neubauer&lt;/a&gt;.   The docs provide a good introduction to the APIs and modeling concepts and - in parts III and IV - introduce  how to operate, scale and manage Neo4j instances. 
 &lt;/LI&gt;
 &lt;Li&gt; 
 Jim Webber, lead author of &lt;A href="http://shop.oreilly.com/product/9780596805838.do"&gt;REST in Practice&lt;/A&gt; (one of my favorite books, by the way!), now works for Neo4j Inc., and he put togehter an amazing &lt;A href="https://github.com/jimwebber/neo4j-tutorial"&gt;Koan-style tutorial for everybody to consume on Github&lt;/a&gt;. Check it out!
&lt;/LI&gt;
 &lt;LI&gt;  Check out the videos. There are lots of them. Neo4J has their &lt;a href="http://videos.neo4j.org"&gt;content on videos.neo4j.org&lt;/a&gt;, and buried in all the great Spring content on &lt;a href="http://www.youtube.com/SpringSourceDev"&gt;the SpringSourceDev channel on YouTube&lt;/a&gt;, there's the 
     great introduction to the Spring Data Graph project with project &lt;a href="http://www.youtube.com/watch?v=9qVs9vxx8lk"&gt;lead Dr. Mark Pollack and Neo4j CEO Emil Eifrem&lt;/a&gt;. 
 &lt;/LI&gt;
 &lt;LI&gt; 
 Steve Mayzak and I co-authored a   book, "&lt;a href="http://oreilly.com/catalog/0636920020981"&gt;Getting Started with Spring Roo&lt;/a&gt;," from O'Reilly. We were honored to have 
            Michael Hunger, from the Neo4j team, contribute and co-author the content on the Roo addon for the Spring Data Graph  project.  O'Reilly has generously made this book available for free to the community; &lt;a href="http://spring-roo-repository.springsource.org/Getting_Started_with_Roo.pdf"&gt;check it out!&lt;/a&gt;  
 &lt;/LI&gt;  &lt;LI&gt; For a great example (running, and open source, too!) of Spring Data Graph, check out &lt;a href="http://blog.neo4j.org/2011/04/spring-data-graph-10-integration.html"&gt;this blog introducing the example along with some background information.&lt;/a&gt; Then, check out &lt;a href="https://github.com/springsource/spring-data-graph-examples"&gt;the source code&lt;/a&gt;. 
&lt;/li&gt; &lt;LI&gt;  Michael Hunger also co-authored an amazing book, &lt;a href="http://static.springsource.org/spring-data/data-graph/snapshot-site/reference/pdf/spring-data-graph-reference.pdf"&gt;The Spring Data Graph Guide Book&lt;/a&gt;.  This book is a &lt;EM&gt;great&lt;/EM&gt; piece of content. 
&lt;/LI&gt;
&lt;/UL&gt;</summary>
    <dc:date>2011-10-10T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Python? Good. Python on CloudFoundry? Better.</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/python_good_python_on_cloudfoundry_better.html" />
    <author>
      <name />
    </author>
    <modified>2011-10-01T00:00:00Z</modified>
    <issued>2011-10-01T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt; I love the characterization of &lt;a href= "http://www.infoq.com/news/2011/09/python-django-heroku"&gt;Python&lt;/A&gt; in this post    from InfoQ:
&lt;/P&gt;
&lt;BLOCKQUOtE&gt;"For Adam, Python fostered the development of modern web frameworks, with Zope and Plone. These frameworks introduced concepts like separation of business and display logic via view templating, ORMs for database interaction, and test-driven development were built into Zope 5 years before Rails was born. The main reason why they have not been successful in the market is their complexity and a steep learning curve while being way ahead of their time. Eventually, and despite the initial lack of involvement of the Python community, Django emerged as a strong competitor to rails. .." &lt;/BLOCKQUOTE&gt;
&lt;P&gt; 
That basically says it all: &lt;a href ="http://en.wikipedia.org/wiki/Zope"&gt;Zope&lt;/a&gt; (and &lt;a href ="http://plone.org/"&gt;Plone&lt;/a&gt;) was an integrated, productive framework/application server before EJB 1.0x and it already had ORM, a proper MVC web framework, etc. It was no wonder that EJB and J2EE left a lot of us who had Python backgrounds a little... underwhelmed. I love the point surrounding the "noise" of the community: Python's &lt;em&gt;everywhere&lt;/em&gt; - it's a "sleeper" success and yet most people would still not describe it as either legacy or &lt;a href ="http://www.twitter.com/hipsterhacker"&gt;&lt;Em&gt;hipster&lt;/EM&gt;&lt;/a&gt;.  I remember learning Python in the late 90's and it had already seen adoption by companies that were doing amazing things. That's actually what struck me so much about Python: people who could use &lt;EM&gt;any&lt;/EM&gt; language and technology they wanted, as long as they got results, chose Python. Among the companies that "chose" Python instead of C++ or PHP or even Java (at that point) were unambitious, fly-by-night organizations like Google, NASA, ILM, and many, many more. That spoke  &lt;EM&gt;volumes&lt;/EM&gt; more than all the noise Node's generated. (As an aside, if you want to &lt;em&gt;actually&lt;/EM&gt; build software and take advantage of Node's promise with a language and platform you trust, may I recommend &lt;a  HREF="https://github.com/purplefox/node.x"&gt;Node.X?&lt;/a&gt;)
&lt;/P&gt; &lt;P&gt;		 Python offers a wealth of options for developers. My first Python use cases - even at Python 1.5 a decade ago - were all about exploiting Python's "batteries included" mantra to build distributed applications on grids. Oh, and text processing. Honestly, Python does a remarkable job at text processing. I don't miss Perl, at all!).  &lt;/P&gt;
&lt;P&gt; 
I note that if you want a seriously good Python cloud-story, check out ActiveState's (you know, ActiveState, the maker of leading IDEs and integrated language bundles/SDKs for Python, Perl, Tcl, etc., for at least the last decade?) &lt;a href= "http://www.activestate.com/cloud"&gt;Stackato&lt;/A&gt;, which is based on &lt;a href= "http://www.cloudfoundry.org"&gt;CloudFoundry, the open-source PaaS&lt;/a&gt;, is awesome. As much as I love the &lt;A href= "http://blog.springsource.com/2011/08/24/micro-cloud-foundry-for-spring-developers/"&gt;MicroCloud Foundry VM instance&lt;/a&gt;, the truth is that the ActiveState guys beat us (I work for &lt;a href="http://blog.springsource.com/author/jolong/"&gt;SpringSource&lt;/a&gt;, a division of VMware) to the punch: they had a VMWare image running their port of the CloudFoundry cloud &lt;em&gt;before&lt;/EM&gt; VMware! Awesome ;-)  &lt;/P&gt;</summary>
    <dc:date>2011-10-01T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Libraries and Component Models and APIs (in Spring), Oh My!</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/libraries_and_component_models_and_apis_in_spring_oh_my.html" />
    <author>
      <name />
    </author>
    <modified>2011-09-23T00:00:00Z</modified>
    <issued>2011-09-23T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt; One of the most importants about a framework is that it is  pluggable, that it is &lt;a href="http://en.wikipedia.org/wiki/Extensibility"&gt;extensible&lt;/a&gt;. 
This is very much a core promise of a good framework, and separates it from mere libraries. 
Most of the Spring frameworks are exposed as libraries and component models. These are the two levels most people interact with Spring: they reuse the numerous and powerful libraries as-is, or - when the libraries aren't able to read your mind, Spring provides some surface-level API against which to write pluggable code for certain responsibilities.
  For example, Spring Integration comes with batteries included, many, many batteries, actually. In this case, the batteries I refer to are the integration technologies supported in terms of the various modules that are provided: web services, databases, message brokers (JMS, AMQP), file systems (FTP, FTPS, SFTP, and regular filesystem mounts), etc., etc. The same is true of Spring Batch and indeed of all the other Spring frameworks. 
If the batteries included aren't quite what you want, and you'd like to plug in your own logic, the 80% cases are accounted for in terms of the component models that the projects expose.  
 &lt;/p&gt;&lt;P&gt; In Spring Integration, the 80% case is to reuse the libraries. It is possible to not write a single line of Java code and solve complex problems using Spring's declarative XML namespaces. 
When this isn't enough, the next tier of support is the Spring Integration component model that works with annotations.  The only time you need to use these component models is to help the framework fill in the gaps, to understand the parts of your application that it could'nt possibly already know or infer.  
 For example,  if you want to provide conditional routing based on your business logic - the integration equivalent of an &lt;em&gt;if/else&lt;/em&gt; statement - then you need to work in terms of a &lt;EM&gt;router&lt;/EM&gt;.
Here's how you write the rough skeleton of a custom router, one that's specific to your application, in Spring Integration:
&lt;/P&gt;&lt;pre&gt;
@Router( ... )
public class MyBlogRouter  { 
 public String chooseWhichChannelBasedOnTheInputMessage( Message&amp;lt;String&amp;gt; msg) { 
   if(msg.getPayload().equals( "a") { 
     return "channelA"; 
   }
   ...
 }
}
&lt;/pre&gt;
 
&lt;p&gt;
 In Spring MVC, the 80% case is creating a &lt;EM&gt; controller&lt;/EM&gt; that can handle requests as they come in from the web, and naturally, there's an easy, declarative way of telling Spring MVC about controllers, like this: 
&lt;/P&gt;
&lt;pre&gt;
@Controller 
public class MyBlogController { 
  @RequestMapping( ...)
  public String handleRequest( @PathVariable("id") long id) { 
   ... 
  }
} 
&lt;/pre&gt;  
&lt;P&gt;  In both of these cases, the component model lives side by side with the framework itself. There's an interplay, an unspoken contract: 
the framework provides all the machinery to automate as much as possible. Ideally, when you do come to the point of needing to plug in code, it's because you're trying to express something quintessentially related to your business problem, and not focusing on the machinery of writing an integration flow, or handling HTTP requests. 
Small focused hooks provide a lot of power, and these two layers go a long way for most users.
  
&lt;/p&gt; 
&lt;p&gt;  
 What a lot of people don't know is that all of the Spring frameworks (notably, Spring core itself) provide a third echelon of support, of functionality. To me, this third echelon is the APIs that it provides against which you can code. I like to think that, when the 80% cases aren't enough, you should look for the 20%  answer in the APIs.  &lt;/p&gt;&lt;P&gt;You deal with these APIs a lot, and sometimes they overlap with the component models, so the line can be a bit blurry. One &lt;EM&gt;blurry&lt;/EM&gt; example is if you register a bean that implements &lt;CODE&gt;InitializingBean&lt;/CODE&gt;, then Spring will automatically invoke the &lt;CODE&gt;InitializingBean#afterPropertiesSet()&lt;/CODE&gt; method when the bean has had its dependencies satisfied and is about to be made available in the context. This, in effect, gives you a construction hook, like a second constructor that gets called &lt;em&gt;after&lt;/EM&gt; the properties have been satisfied. This is an API. You get power by implementing an interface. However, from the component model perspective, there's an alternative: you can use the JSR 250 annotations, e.g., &lt;CODE&gt;@javax.annotation.PostConstruct&lt;/CODE&gt; to trigger that &lt;EM&gt;any&lt;/EM&gt; arbitrary method be invoked.   Here's an example:
 &lt;/p&gt; 
&lt;pre&gt;
@Component
public class MyClass { 
  @javax.inject.Inject DataSource dataSource ;
  @PostConstruct 
  public void setup() { ... }
}
&lt;/pre&gt; 
&lt;P&gt;  
 Either one's fine, and at this level it's largely a matter of personal style. &lt;/P&gt;&lt;P&gt; Taking the examples further, and moving from the ambiguous to the clearly API-centric, Spring provides convenient interfaces that give you access to the lower level  workings of the Spring framework. Examples of these include the &lt;CODE&gt;BeanPostProcessor&lt;/CODE&gt; and the &lt;CODE&gt;BeanFactoryPostProcessor&lt;/CoDE&gt;.  At this level, you start tapping a &lt;EM&gt;lot&lt;/EM&gt; of power. 
  
  Admittedly, a lot of people aren't going to need or consume the framework in this way, but it's nice to know it's there. These APIs are the force multipliers that the other Spring frameworks leverage to provide the powerful abstractions for you.  Ever wondered how Spring does its magic when you use  declarative transaction  annotation, &lt;CODE&gt;@Transactional&lt;/CODE&gt;?  You might be surprised to learn there's a &lt;CODE&gt;BeanPostProcessor&lt;/CODE&gt; involved. Nothing in the Spring framework is &lt;EM&gt;magic&lt;/EM&gt; -- you can build infrastructure or framework code just like the other Spring projects do for your users by tapping into these APIs. 
  &lt;/P&gt;&lt;P&gt;
Exposing your frameworks and common abstractions in terms of these well known, idiomatic Spring APIs provides a powerful, familiar surface to your API that consumers of your abstraction can leverage.   
 There are extension points all over the place in Spring - places where you can provide your own implementation that fits into the machinery - an example of the &lt;em&gt;strategy&lt;/em&gt; pattern. 
 In Spring MVC, &lt;a href="http://static.springsource.org/spring/docs/2.0.x/reference/view.html"&gt;&lt;CODE&gt;ViewResolver&lt;/CODE&gt;&lt;/a&gt;s help map abstract view names (Strings) into concrete view resources (that might mean a &lt;CODE&gt;.jsp&lt;/CODE&gt;, a Velocity or &lt;a href="http://www.thymeleaf.org/"&gt;ThymeLeaf&lt;/A&gt; template, or any of a zillion other implementations.  In core Spring's REST support there exists an interface, &lt;CODE&gt;HttpMessageConverter&amp;lt;T&amp;gt;&lt;/CODE&gt;, that Spring uses to figure out how to convert HTTP request and response payloads into domain-centric objects: a POST request with bytes might becomes a &lt;CODE&gt;java.io.InputStream&lt;/CODE&gt;, a response with a JAXB object might need to be marshalled into XML and then sent as the response, etc. Those strategies are  all codified as implementations of this interface. Adding new ones is quite easy.  In Spring Integration, outbound adapters implement the &lt;CODE&gt;MessageHandler&lt;/CODE&gt; interface, and provide the interface between the messaging code and an external system. You can add new ones and teach Spring Integration new tricks by implementing this interface.  
&lt;/P&gt;
&lt;p&gt;Anyway, I could go on, but - for my own good - I won't, since I wouldn't have anything left for my talk at SpringOne! &lt;/P&gt;&lt;P&gt;What talk at SpringOne, you say? Oh Yeah! About that: if you want to hear more about these extensibility hooks and the powerful, intricate layering  that's possible using the Spring frameworks, come check out my talk at SpringOne on &lt;a href="http://www.springone2gx.com/conference/chicago/2011/10/session?id=24033"&gt;"Tailoring Spring for Custom Usage" in Chicago, in October 2011!&lt;/a&gt;
&lt;/P&gt;</summary>
    <dc:date>2011-09-23T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Trip Roundup and The Dallas Spring User Group</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/trip_roundup_and_the_dallas_spring_user_group.html" />
    <author>
      <name />
    </author>
    <modified>2011-09-17T00:00:00Z</modified>
    <issued>2011-09-17T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt; Hey sports fans!  What a crazy few weeks! September started off with a bang as I found myself in sunny Las Vegas for &lt;a href= "http://www.vmworld.com/community/conference/live/"&gt;VMWorld 2011&lt;/a&gt;. I really enjoyed the time there to connect with my ops- and system-centric brethren. What a great crowd, and the excitement surrounding the exodus to the &lt;a href= "http://www.cloudfoundry.com"&gt;cloud&lt;/a&gt; was &lt;EM&gt;palatable&lt;/em&gt;. People are excited about vFabric, and about connecting their applications  with a truly integrated stack, RabbitMQ, GemFire, tcServer, etc., and they're doubly excited that they have in the Spring portfolion a unified programming model for all of these technologies. So, exciting stuff, definitely. If you missed all the excitement, don't fret: lots of was recorded and made available &lt;a href="http://www.youtube.com/user/VMworldTV"&gt;here&lt;/a&gt;!
 	 &lt;/p&gt; &lt;p&gt; The week after that, I found myself en-route for Oslo, Norway, for the 10th annual &lt;a href="http://javazone.no/2011"&gt;JavaZone&lt;/a&gt; conference, which &lt;EM&gt;rocked&lt;/EM&gt;. This was my second time speaking there and I can tell you, in no uncertain terms, that vikings rock! What a great community. This conference seems like the conference for the thinking developer, and featured plenty of content on Spring and Scala this year.  
	&lt;/p&gt;
	 &lt;P&gt; I also had the pleasure of taking a tour of the Norwegian fjords with colleague and great guy &lt;a href="http://www.chrisrichardson.net/"&gt;Chris Richardson&lt;/a&gt;. If I get around to it I'll try to post some incriminating photos later :-) &lt;/P&gt;
	&lt;p&gt; 
	The best part? Even if you weren't lucky enough to be there, you can still partake in the fun by watching the recorded videos which JavaZone's generously &lt;a href="http://www.vimeo.com/javazone"&gt;put online on Vimeo for free&lt;/a&gt;.  There's of course my talk  on &lt;a href="http://vimeo.com/28760638"&gt;Spring configuration&lt;/a&gt;, Costin Leau's the &lt;a href="http://vimeo.com/28721724"&gt;Spring 3.1 caching abstraction&lt;/a&gt;, Mark Fisher's talk on &lt;a href="http://vimeo.com/28795501"&gt;Spring Integration with CloudFoundry&lt;/a&gt; (bonus: the talk, &lt;a href="http://vimeo.com/28606559"&gt;"Event Driven Architecture with the Spring framework"&lt;/a&gt; from last year is also available!), Costin's other talk on &lt;a  href="http://vimeo.com/28793832"&gt;Spring Data&lt;/a&gt;, and Chris Richardson's talk on  &lt;a href="http://vimeo.com/28769090"&gt;Polyglot Persistence&lt;/a&gt;, all available in English. If you speak Norwegian, then there's ample content for you, as well, including a talk on &lt;a href="http://vimeo.com/28764778"&gt;Spring Java configuration in Scala&lt;/a&gt;, and on performance gains with &lt;a href="http://vimeo.com/28760363"&gt;Spring Batch&lt;/a&gt;.  I think I saw some others, too, but as I don't speak Norwegian, I can't be too sure! Enjoy! 		
	 &lt;/p&gt; 
	
	&lt;p&gt; As if that weren't enough excitement, next week I have the &lt;strong&gt;honor&lt;/strong&gt; of speaking at the &lt;A href= "http://www.springdallasug.org/?p=127"&gt;Dallas Spring User Group&lt;/a&gt;. I'll be giving two related talks, one   on the SPIs exposed to the interested Java developer in   core Spring and,  one on the SPIs exposed in Spring Integration. Both talks are done with an eye towards extending the framework to accomodate advanced use cases. &lt;/p&gt;&lt;p&gt;Of course, some of it may be old news for the veteran and whip-smart Spring users at that particular group, but we'll see if I can't surprise a few of 'em! ;-) If you're in the Dallas, Texas area and want to talk Spring, come on down or ping me on Twitter at &lt;a  href  ="http://www.twitter.com/starbuxman"&gt;@starbuxman&lt;/a&gt;.
&lt;/p&gt;</summary>
    <dc:date>2011-09-17T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Happiness is...</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/happiness_is.html" />
    <author>
      <name />
    </author>
    <modified>2011-08-31T00:00:00Z</modified>
    <issued>2011-08-31T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt; Happiness is having &lt;B&gt;RabbitMQ&lt;/B&gt; and &lt;B&gt;PostgreSQL&lt;/B&gt; in the output of my &lt;CODE&gt;vmc services&lt;/CODE&gt; invocation ;-) 
&lt;/P&gt;
&lt;PRE&gt;
 vmc target api.cloudfoundry.com 
 vmc login 
 ...
 vmc services 
&lt;/PRE&gt; 
&lt;img src ="/jl/media/15140.jpg" style = "border:1px solid black; margin:10px; margin-left:0; margin-right :0;" /&gt;
&lt;p&gt;What a wild month for &lt;a  href="http://www.cloudfoundry.com"&gt;CloudFoundry&lt;/a&gt;! &lt;B&gt;&lt;A HREF="http://blog.springsource.com/2011/08/16/chatting-in-the-cloud-part-1/"&gt;RabbitMQ&lt;/a&gt;&lt;/B&gt;! &lt;A HREF="http://blog.springsource.com/2011/08/24/micro-cloud-foundry-for-spring-developers/"&gt;&lt;B&gt;MicroCloud&lt;/B&gt;&lt;/a&gt;! and now, &lt;a href="http://blog.springsource.com/2011/08/30/using-postgres-on-cloud-foundry/"&gt;&lt;B&gt;PostgreSQL&lt;/B&gt;&lt;/a&gt; (this was one of the biggest pieces of news to come out of &lt;a href="http://www.vmworld.com/community/conference/live"&gt;VMWorld 2011&lt;/a&gt; in Las Vegas, where I am right now)!  
	
 And, for the Python and PHP inclined among us, there's now the CloudFoundry partner providers &lt;a href="http://blog.cloudfoundry.com/post/9374366916/cloud-foundry-adds-php-and-python-through-community"&gt;that are now supporting these languages on their CloudFoundry clouds.&lt;/a&gt; 
	It's all coming together, quicker and better than ever. Stay tuned for more!
	&lt;/p&gt;</summary>
    <dc:date>2011-08-31T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>WTF! Linked Lists patented</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/wtf_linked_lists_patented.html" />
    <author>
      <name />
    </author>
    <modified>2011-08-27T00:00:00Z</modified>
    <issued>2011-08-27T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt; 
&lt;a href= "http://twitter.com/#!/timfox/status/107382409091235840"&gt;Tim Fox&lt;/A&gt; retweeted this tweet from &lt;a href="http://news.ycombinator.com/"&gt;Hacker News&lt;/a&gt;'s &lt;a href="http://twitter.com/#!/hackernewsbot"&gt;Hacker News Bot&lt;/a&gt; that &lt;a href="http://www.google.com/patents/?vid=Szh4AAAAEBAJ"&gt;linked lists had apparently been patented&lt;/a&gt; and responded as aptly as I could've: &lt;EM&gt;WTF&lt;/EM&gt;.
 
&lt;/P&gt;</summary>
    <dc:date>2011-08-27T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>RabbitMQ is now officially available on CloudFoundry!</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/rabbitmq_is_now_officially_available_on_cloudfoundry.html" />
    <author>
      <name />
    </author>
    <modified>2011-08-12T00:00:00Z</modified>
    <issued>2011-08-12T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt;   
 &lt;img src = "/jl/media/14951.png" style = "width:80px;float:left; margin-right:10px;"/&gt; 
&lt;img style = "float:left ; margin-right: 10px;width:80px;" src = "/jl/media/14952.png" /&gt; 
For you &lt;a href="http://github.com/CloudFoundry"&gt;code lurkers&lt;/a&gt; out there, the news that &lt;a href= "http://www.rabbitmq.com/"&gt;RabbitMQ&lt;/a&gt; is now available in &lt;A href="http://www.cloudfoundry.org"&gt;CloudFoundry&lt;/A&gt; should come as no surprise. 
           But, it's finally here! This is very exciting. One thing I've always loved about RabbitMQ is its ubiquity. It is more widely used than  
               any other message broker on the cloud, and on Amazon Web Services in particular. The AWS tidbit's a bit more awesome when you realize that AWS already has a message broker service called SQS!  ;-)    Anyway, it's now available on CloudFoundry. You &lt;a href="http://support.cloudfoundry.com/entries/20322602-getting-started-with-the-rabbitmq-service-from-a-spring-application"&gt;should definitely&lt;/a&gt; check &lt;a href="http://blog.cloudfoundry.com/post/8713844574/rabbitmq-cloud-foundry-cloud-messaging-that-just-works"&gt;it out.&lt;/a&gt; The &lt;a href="http://www.theregister.co.uk/2011/08/10/vmware_cloud_foundry_adds_rabbitmq_messaging/"&gt;news&lt;/a&gt;  overall seems good, too! Messaging middleware is &lt;EM&gt;the&lt;/EM&gt; critical component for scale. Cloud-scale is a way of life, not just a switch to be turned on and off. Specifically, an architecure that scales is going to enjoy temporally decoupling, or &lt;EM&gt;asynchronism,&lt;/EM&gt; and RabbitMQ is the perfect vehicle to enable that asynchronous coordination. 
&lt;/p&gt; &lt;P&gt;  If you're a Spring developer, and haven't had a chance to look at CloudFoundry, then I strongly recommend you see  &lt;a href="http://blog.springsource.com/2011/04/12/cloud-foundry-for-spring-developers/"&gt;Mark Fisher's entry  on the SpringSource blog&lt;/a&gt; introducing the wide world of the cloud for Spring developers from a few months ago. There's also great content on &lt;A href="http://www.youtube.com/SpringSourceDev"&gt;the SpringSource YouTube channel.&lt;/a&gt;
		
 &lt;/P&gt;</summary>
    <dc:date>2011-08-12T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Getting Started with Spring Roo</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/getting_started_with_spring_roo.html" />
    <author>
      <name />
    </author>
    <modified>2011-08-12T00:00:00Z</modified>
    <issued>2011-08-12T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt;  &lt;IMG src = "/jl/media/14827.gif" style = " float:left;margin-right:10px;" /&gt; Steve Mayzak and I have just finished a book for O'REILLY, &lt;EM&gt;&lt;a href="http://oreilly.com/catalog/0636920020981"&gt;Getting Started with Spring Roo.&lt;/A&gt;&lt;/EM&gt; The book's a very quick introduction to Spring Roo, and includes information about the many useful addons (including support for &lt;B&gt;Vaadin&lt;/B&gt; - a powerful, alternative web framework, and &lt;B&gt;Neo4j&lt;/B&gt; - an alternative, powerful NOSQL data-store), as well as the in-built Spring Roo addons. If you're interested in Spring Roo, I hope you'll check this out.
 &lt;/P&gt;</summary>
    <dc:date>2011-08-12T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Speaking at JavaZone 2011</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/speaking_at_javazone_2011.html" />
    <author>
      <name />
    </author>
    <modified>2011-08-07T00:00:00Z</modified>
    <issued>2011-08-07T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt; I'm excited to announce that I'll be speaking at &lt;a href="http://jz11.java.no/"&gt;JavaZone&lt;/A&gt; again this year. I must confess, I was a little worried that I would not be accepted this year! My talk last year - on business process management and Spring Integration - seemed to garner puzzled looks. Perhaps I just misread the &lt;EM&gt;amazing&lt;/EM&gt; Norwegian audience? The conference (and the technical presentations, to boot) were both wonderful.&lt;/p&gt;
&lt;P&gt; I had the wonderful experience of stopping at a booth and having somebody try to sell me training in Spring (which, I mean, sure... more training's always good!), but the kicker came when he showed me the training manual! It was the book that Gary Mak and Daniel Rubio  and I co-authored, &lt;em&gt;&lt;a href="http://www.amazon.com/dp/1430224991/ref=asc_df_14302249911656168?smid=ATVPDKIKX0DER&amp;tag=hyprod-20&amp;linkCode=asn&amp;creative=395093&amp;creativeASIN=1430224991"&gt;Spring Recipes!&lt;/a&gt;&lt;/em&gt; 
	 &lt;/p&gt;
	
&lt;P&gt; I submitted on other topics, as well, last year, and those were not accepted. No matter, I gave my talk, and indeed the people that did &lt;em&gt;get&lt;/em&gt; it, &lt;EM&gt;really&lt;/EM&gt; got it! 
So, while I'm not complaining, it still wasn't exactly my best day. I'm thus thrilled to be invited back and - as if fate wasn't already shining on me - my 3-hour university talk's been accepted. My talk's called, "Spring, a Walking Tour," which is a  bit of misnomer, as I'm usually the only one walking at all! ;-) 
I'll be talking about the Spring landscape - &lt;em&gt;everything&lt;/EM&gt;, from the cloud, mobile, 
	integration, batch processing, big-data, and more! Check it out. This talk was well received when I gave it at Geecon earlier this year, and I've already updated it to reflect a lot of the new stuff in the Spring 3.1 milestones. 
&lt;/p&gt;
 
&lt;P&gt;The city of Oslo, as you no doubt have heard, recently experienced &lt;a href="http://www.youtube.com/watch?v=0oIE-WSemIs"&gt;a terrorist attack&lt;/a&gt; resulting in the massacre of innocents, both adult and children. It broke my heart to see this. What a &lt;b&gt;disgusting&lt;/b&gt;, &lt;b&gt;horrible&lt;/b&gt; incident, obviously.  It's beyond comprehension, no matter where it happens, of course. It was particularly surprising to me that it happened in Oslo, however, as it seemed like such a beautiful, clean, ideal city when I was there. 
  I will take more time, this year, to explore Oslo, and to take in  more of Norway's beauty, and to walk among these strong people. 
   I really have a lot of respect for the way the people of the city responded to the incident. They are inspirational. 
&lt;/P&gt; &lt;p&gt; I hope you'll join me at JavaZone, and in Oslo, in general, to be inspired.
	&lt;/P&gt;</summary>
    <dc:date>2011-08-07T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Spring Corner: Beyond the FactoryBean</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/spring_corner_beyond_the_factorybean.html" />
    <author>
      <name />
    </author>
    <modified>2011-07-23T00:00:00Z</modified>
    <issued>2011-07-23T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;DIV  style = "padding:10px; background-color:#999; "&gt;
I've decided I'm going to try to write up a series of small posts on things about Spring that are perhaps common knowledge, but helpful to know, anyway. 
These posts are geared decidedly towards newcomers, though old hats might learn a thing or two. 
&lt;/div&gt;
&lt;P&gt;
 
I looked at what a basic &lt;code&gt;FactoryBean&lt;/code&gt; is in my previous post. While &lt;code&gt;FactoryBeans&lt;/code&gt; are important - and knowing what they do can help you navigate
the framework - they're by and large no longer the recommended approach to the task as of Spring 3.0 and the imminent Spring 3.1.	&lt;/p&gt;
  &lt;p&gt;
	The whole point of a &lt;CODE&gt;FactoryBean&lt;/CODe&gt; is to hide the construction of an object - either because it's  very complex or because it can't simply be instantiated using that  typical constructor-centric approach  used by the Spring container (Maybe it needs to be looked up? Maybe it needs a static registry method?)  
	 &lt;/p&gt; 
	&lt;P&gt; Spring 3.0 saw the introduction of  Java configuration which lets you define beans using Java.  For instance, to register a regular &lt;code&gt;javax.sql.DataSource&lt;/code&gt; with Spring in XML, you   will more than likely delegate to a properties file for the sensitive configuration information (like a database password) and use Spring to instantiate the &lt;code&gt;javax.sql.DataSource&lt;/code&gt;, like this:
		&lt;/p&gt; 
		
&lt;pre&gt; 
&amp;lt;beans ...&amp;gt;
	&amp;lt;context:property-placeholder location = "&lt;B&gt;ds.properties&lt;/B&gt;" /&amp;gt;
	
	&amp;lt;bean id = "&lt;B&gt;ds&lt;/b&gt;" class = "&lt;B&gt;a.b.c.MySqlDataSource&lt;/b&gt;"&amp;gt;
	  &amp;lt;property name = "user" value = "${&lt;B&gt;ds.user&lt;/b&gt;}"/&amp;gt;
	  &amp;lt;property name = "password" value = "${&lt;b&gt;ds.password&lt;/b&gt;}"/&amp;gt;
	&amp;lt;/bean&amp;gt;
&amp;lt;/beans&amp;gt;
&lt;/pre&gt;
&lt;P&gt; This is a simple bean, and translates naturally into Java configuration. It would look like this:
	&lt;/p&gt;
&lt;Pre&gt;
import a.b.c.* ;
	
@Configuration 
@PropertySource("&lt;B&gt;ds.properties&lt;/B&gt;") 
public class MyConfiguration { 
    @Inject private Environment env ; 
	
    @Bean public &lt;b&gt;MySqlDataSource&lt;/b&gt; &lt;b&gt;ds&lt;/b&gt;(){ 
        MySqlDataSource ds = new MySqlDataSource() ; 
        ds.setUser( env.getProperty("&lt;B&gt;ds.user&lt;/b&gt;") );
        ds.setPassword( env.getProperty("&lt;B&gt;ds.password&lt;/b&gt;"));
        return ds; 
    }
}
&lt;/pre&gt;
	
	
	&lt;P&gt; The beauty of this is that you're free to do anything you'd like inside the method. The return value is what's registered in the Spring container. 
		
		Anything you do in service of properly constructing this object is up to you - you're no longer bound by the limits of what Spring can instantiate based on the XML specified.  And, this is more natural - it's far easier to guarantee there's no typos using Java than XML.  
		
		So, take away from this that Java configuration is - about equal in terms of lines of code, but a lot more powerful, and conceptually more natural.		 
	 &lt;/p&gt; &lt;P&gt; With those limitations lifted, the value of the &lt;code&gt;FactoryBean&lt;/code&gt; is starting to lessen. After all, if all a &lt;code&gt;FactoryBean&lt;/code&gt; does is encode construction logic in a novel or unique way, then there's no reason that couldn't be done inside a Java configuration method, is there? 
Let's revisit the example from the last blog post, a custom &lt;code&gt;FactoryBean&lt;/code&gt; designed to factory cars.
		&lt;/p&gt;
	&lt;PRE&gt;
public class MyCarFactoryBean implements FactoryBean&amp;lt;Car&amp;gt; {
  private String mark; 
  private int year ;
  public void setMark(String m){ this.mark =m ; }
  public void setYear(int y){ this.year = y; }
  public Car getObject(){ 
    // wouldn't be a very useful FactoryBean 
    // if we could simply instantiate the object ;-)
    CarBuilder cb = CarBuilder.car();
	
    if(year!=0) cb.setYear(this.year);
    if(StringUtils.hasText(this.mark)) cb.setMark( this.mark); 
    return cb.factory(); 
  }
  public Class&lt;Car&gt; getObjectType() { return Car.class ; } 
  public boolean isSingleton() { return false; }
} 
&lt;/pre&gt;
 &lt;P&gt; In this example, we only conditionally set values if there are values to be set.  So, we do some dancing around to ensure that we have values. This code is ugly, because it has a lot of different execution paths, but it's not particularly novel.  We're adults, we can do this sort of thing ourselves. Let's dispose of the &lt;code&gt;FactoryBean&lt;/code&gt; and simply use Java configuration to replace it for a definition of a &lt;code&gt;Car&lt;/code&gt;. Again, we happen to know what configuratoin we need,
	so we don't have to duplicate the null checks in our code.
	&lt;/p&gt;
	
	&lt;Pre&gt;
@Bean public Car honda(){ 
	return CarBuilder.car()
	.setYear( 1984 )
	.setMark("Honda")
	.factory(); 
}
&lt;/pre&gt; 
&lt;P&gt;
	Not bad! We no longer need the complex &lt;code&gt;FactoryBean&lt;/code&gt;, and we have a usable bean definition. 
	
	If we wanted to make this reusable, we could, as well, by simply creating a factory method, like this:
	
	&lt;/p&gt;
 &lt;PRE&gt;
// presumably exposed from some place where other configuration classes can reuse it.
public Car buildCar(int year, String make){ 
    CarBuilder cb = CarBuilder.car();
    if(year!=0) cb.setYear( year);
    if(StringUtils.hasText( mark)) cb.setMark( mark); 
    return cb.factory();
}
...
// now the Spring definition itself is even simpler, &lt;em&gt;and&lt;/em&gt; it's reusable!
@Bean public Car honda() {
	return car(1984, "Honda") ;
}
&lt;/PRE&gt;
&lt;P&gt; In Spring 3.1, there are many places where Spring also provides a &lt;em&gt;Builder&lt;/em&gt; alternative to a &lt;code&gt;FactoryBean&lt;/code&gt;.  A Builder, as a pattern, is conceptually simialar to a &lt;code&gt;FactoryBean&lt;/code&gt;. In practice, however, they are usually exposed like the &lt;code&gt;CarBuilder&lt;/code&gt; demonstrated above. They are 
	typically chainable - a method returns &lt;code&gt;this&lt;/code&gt; and so subsequent invocations don't need to dereference the object, they can 
	 continue &lt;em&gt;chaining&lt;/em&gt; invocations. 
	 Additionally, a Builder usually does the null pointer checks that I forced in the previous code. 
	
	So, a properly rewritten &lt;code&gt;CarBuilder&lt;/code&gt; object usage might look like this:
	&lt;/p&gt;
	&lt;pre&gt;
@Bean public Car honda(){ 
 return CarBuilder.car()
  // doesn't matter if the parameters are null - 
  // it'll validate in the &lt;b&gt;factory()&lt;/b&gt; method
  .setYear( 1984 )  
  .setMark( "Honda" )
  .factory();
}
&lt;/pre&gt;
&lt;P&gt;A great example of a builder providing a much smoother experience in 3.1 over Spring's		&lt;code&gt;FactoryBean&lt;/code&gt;s is the new Hibernate 3 &lt;code&gt;SessionFactoryBuilder&lt;/code&gt;, whose usage looks like this:
	&lt;/p&gt;
	
	&lt;PRE&gt;
		
@Configuration  
@EnableTransactionManagment 
public class ServiceConfiguration {  
	
  @Bean public javax.sql.DataSource dataSource(){ ... }
  @Bean public SessionFactory hibernate3SessionFactory(){ 
     return new AnnotationSessionFactoryBuilder()
 	     .setDataSource(dataSource())
 	     // you could do this:
 	     //.setAnnotatedClasses( Customer.class, LineItem.class, Order.class )
 	     // or simply scan a package where your entities live
 	     .setAnnotatedPackages( Customer.class.getPackage().getName()) 
 	     .buildSessionFactory();
 }
}
&lt;/pre&gt;
  &lt;P&gt;The equivalent &lt;code&gt;FactoryBean&lt;/code&gt;s now delegate to these builder classes, in fact! &lt;/p &gt;</summary>
    <dc:date>2011-07-23T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Spring Corner: What's a Factory Bean?</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/spring_corner_whats_a_factory_bean.html" />
    <author>
      <name />
    </author>
    <modified>2011-07-22T00:00:00Z</modified>
    <issued>2011-07-22T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;DIV  style = "padding:10px; background-color:#999; "&gt;
I've decided I'm going to try to write up a series of small posts on things about Spring that are perhaps common knowledge, but helpful to know, anyway. 
These posts are geared decidedly towards newcomers, though old hats might learn a thing or two. 
&lt;/div&gt;
&lt;P&gt;
	&lt;/p&gt;
	&lt;P&gt; In this post, I'll look at  Spring's &lt;code&gt; org.springframework.beans.factory.FactoryBean&amp;lt;T&amp;gt;&lt;/code&gt; interface. 
		
		The definition of this interface is: 
 &lt;/p&gt;
&lt;PRE&gt;public interface FactoryBean&amp;lt;T&amp;gt; {
  T getObject() throws Exception;
  Class&amp;lt;?&amp;gt; getObjectType();
  boolean isSingleton();
}
&lt;/PRE&gt;
&lt;P&gt; A FactoryBean is a pattern to encapsulate interesting object construction logic in a class.  It might be used, for example,
	 to encode the construction of a complex object graph in a reusable way. 
	Often this is used to construct complex objects that have many dependencies. It might also be used when the construction logic itself is highly volatile and depends on
	the configuration. 
	
	A FactoryBean is also useful to help Spring construct objects that it couldn't easily construct itself. For example, in order to inject a reference to a bean that was obtained from JNDI,
	the reference must first be obtained. You can use the &lt;CODE&gt;JndiFactoryBean&lt;/CODE&gt; to obtain this reference in a consistent way.
	
  You may inject the result of a &lt;CODE&gt;FactoryBean&lt;/CODE&gt;'s &lt;CODE&gt;getObject()&lt;/CODE&gt; method into any other property.  
	&lt;/p&gt; 
	&lt;p&gt; Suppose you have a &lt;code&gt;Person&lt;/code&gt; class whose definition is thus:
		&lt;/p&gt;
		&lt;PRE&gt;public class Person { 
 private Car car ;
 private void setCar(Car car){ this.car = car;  }	
}
&lt;/pre&gt; and a &lt;CODE&gt;FactoryBean&lt;/code&gt; whose definition is thus:
	
	&lt;PRE&gt;
public class MyCarFactoryBean implements FactoryBean&amp;lt;Car&amp;gt; {
  private String mark; 
  private int year ;
  public void setMark(String m){ this.mark =m ; }
  public void setYear(int y){ this.year = y; }
  public Car getObject(){ 
    // wouldn't be a very useful FactoryBean 
    // if we could simply instantiate the object ;-)
    CarBuilder cb = CarBuilder.car();
	
    if(year!=0) cb.setYear(this.year);
    if(StringUtils.hasText(this.mark)) cb.setMark( this.mark); 
    return cb.factory(); 
  }
  public Class&lt;Car&gt; getObjectType() { return Car.class ; } 
  public boolean isSingleton() { return false; }
}
&lt;/pre&gt;
	
				&lt;p&gt; You could wire up a &lt;CODE&gt;Car&lt;/CODE&gt; instance using a hypothetical &lt;CODe&gt;CarFactoryBean&lt;/CODE&gt; like this:
					&lt;/p&gt;
&lt;Pre&gt;
&amp;lt;bean class = "a.b.c.MyCarFactoryBean" id = "car"&amp;gt;
	&amp;lt;property name = "mark" value ="Honda"/&amp;gt;
	&amp;lt;property name = "year" value ="1984"/&amp;gt;
&amp;lt;/bean&amp;gt;
&amp;lt;bean class = "a.b.c.Person" id = "josh"&amp;gt;
	&amp;lt;property name = "car" ref = "car"/&amp;gt;
&amp;lt;/bean&amp;gt;
&lt;/PRE&gt; 
&lt;P&gt; 
		In this example, the result of the &lt;CODE&gt; FactoryBean&lt;/CODE&gt;'s &lt;CODE&gt;getObject&lt;/CODE&gt; method will be passed, not the actual &lt;code&gt;FactoryBean&lt;/code&gt; itself.  
	Spring knows that the result can be injected into the target property because it'll consult the &lt;Code&gt;FactoryBean&lt;/code&gt;'s &lt;code&gt;getObjectType()&lt;/code&gt; type  
		 and check whether the target property's type is assignable.
		
		Spring reserves - but in practice doesn't always exercise - the right to cache the returned bean if the &lt;CODE&gt;FactoryBean&lt;/CODE&gt;'s &lt;code&gt;isSingleton()&lt;/code&gt; method returns true.
		 
&lt;/p&gt;	
	&lt;p&gt;  If you are using Spring's newer (and far more elegant, in my humble opinion) Java based configuration, then you will find this doesn't work quite as you'd expect, but it can still be 
		made to work, but you must dereference the &lt;CODE&gt;FactoryBean&lt;/CODE&gt; explicitly and call &lt;code&gt;getObject()&lt;/CODE&gt; yourself, like this:
		&lt;/p&gt;
		
		&lt;pre&gt;
// identical configuration in Java to the XML above			
@Configuration 
public class CarConfiguration { 
  @Bean public MyCarFactoryBean carFactoryBean(){ 
	MyCarFactoryBean cfb = new MyCarFactoryBean();
	cfb.setMark("Honda");
	cfb.setYear(1984);
	return cfb;
  }
  @Bean public Person josh (){ 
	Person p = new Person();
	p.setCar( carFactoryBean()&lt;b&gt;.getObject()&lt;/b&gt; );
	return p; 
  }	
}
&lt;/pre&gt;
&lt;p&gt;Spring &lt;CODE&gt; FactoryBean&lt;/code&gt;s have all the other characteristics of any other Spring bean, 
	including the lifecycle hooks and services (like AOP) that all beans in the Spring container enjoy.
	&lt;/p&gt;
&lt;p&gt;So, if you'd like a chance to perform construction logic after the properties on the &lt;CODE&gt;FactoryBean&lt;/code&gt; have been set, but before the &lt;code&gt;getObject()&lt;/CODE&gt; method has been called,
	then you can avail your &lt;CODE&gt;FactoryBean&lt;/CODE&gt; of a method, annotated with &lt;CODE&gt;@PostConstruct&lt;/CODE&gt; (or simply implement &lt;code&gt;InitializingBean&lt;/CODE&gt;). This method will be called,
	 in this case, after both the &lt;code&gt;mark&lt;/code&gt; and the &lt;code&gt;year&lt;/code&gt; properties have been set.
	You might use this callback to do sanity checks before the object construction's started.
	
	&lt;/p&gt;
&lt;PRE&gt;
 @PostConstruct 
 public void setup () throws Throwable { 
   // these methods throw an exception that 
   // will arrest construction if the assertions aren't met
   Assert.notNull(this.mark, "the 'mark' must not be null")	;
   Assert.isTrue(this.year &gt; 0, "the 'year' must be a valid value"); 
 }
&lt;/pre&gt;			
&lt;P&gt;One important takeaway here is that it is the &lt;Code&gt;FactoryBean&lt;/CODE&gt;, &lt;em&gt;not&lt;/em&gt; the factoried object itself, that lives in the Spring 
	container and enjoys the lifecycle hooks and container services. The returned instance is transient - Spring knows nothing about what you've returned from &lt;code&gt;getObject()&lt;/code&gt;, and 
	will make no attempt to excercise any lifecycle hooks or anything else on it. 
	This point often confused people.
	&lt;/p&gt;</summary>
    <dc:date>2011-07-22T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>OSCON Java 2011</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/oscon_java_2011.html" />
    <author>
      <name />
    </author>
    <modified>2011-07-07T00:00:00Z</modified>
    <issued>2011-07-07T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt;&lt;img src = "/jl/media/14571.gif"  style = "float:left;padding-right:10px"  /&gt;Hi guys. I'll be speaking at &lt;a href="http://www.oscon.com/oscon2011/profile/108490"&gt;OSCON Java&lt;/a&gt;. I'm giving two talks, one on Spring Roo and on using Spring to bring your application to your customers (through a web application, through Flex, through GWT, and through mobile clients like Android).  
 
I'm also working with my colleague and friend Steve Mayzak to write an ebook on  Spring Roo called "Getting Started with Spring Roo," which will be available from O'REILLY as an ebook in time for OSCON. 
  I hope to see you there. &lt;a href="http://twitter.com/#!/jclouds/status/88755919684501504"&gt;I heard, but can't confirm&lt;/a&gt;, that if you register tomorrow (07/07/2011 - the release of Java 7), you'll get a giant discount (77%?).  
 There are also a few other great talks from SpringSource and VMWare there, and I look forward to seeing you there! &lt;/p&gt;</summary>
    <dc:date>2011-07-07T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>AOP's Not Just Logging</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/aops_not_just_logging.html" />
    <author>
      <name />
    </author>
    <modified>2011-07-05T00:00:00Z</modified>
    <issued>2011-07-05T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt;If you've ever read about &lt;a href="http://static.springsource.org/spring/docs/3.0.x/reference/aop.html#aop-introduction"&gt;Spring's powerful AOP support&lt;/a&gt; then you've probably heard about the canonical example of  introducing logging functionality  - a &lt;em&gt;cross-cutting&lt;/em&gt; concern - to your beans. The example goes like this: you want to log the start and stop time for every method invocation. You can either modify every method and introduce logging, which is tedious and error-prone, or you can simply use AOP to &lt;em&gt;wrap&lt;/em&gt; every method invocation. With AOP, you'll get a chance to perform logging every time a method is started and finished, or both! This is a common example, but it doesn't even begin to illustrate how powerful AOP can be. The most powerful example of AOP is perhaps the Spring framework itself. It uses it every where! Let's look at some common examples:&lt;/P&gt;
 &lt;UL&gt;&lt;LI&gt; In Spring, beans are by default singletons and have no particular guarantees about thread-safety. This is fine most of the time as many objects are thread-safe (e.g., the &lt;code&gt;JdbcTemplate&lt;/code&gt;) so consumers never need to know. This usually ends up being the most performant, and most natural, style of Spring bean. One example where Spring uses AOP to acheive the feeling of thread-safety without concerning the developer with it is in  Spring's &lt;code&gt;EntityManager&lt;/code&gt; support. Spring will correctly inject a  proxy &lt;code&gt;EntityManager&lt;/code&gt; using AOP. &lt;code&gt;EntityManager&lt;/code&gt;s   are &lt;EM&gt;not&lt;/EM&gt; thread-safe, but the consumer doesn't need to know. As an example, you might write: &lt;code&gt;@PersistenceContext EntityManager em.&lt;/code&gt; Spring   then  automatically routes all concurrent requests to the appropriate, thread-local instance being maintained in the background.
    &lt;/li&gt;
 &lt;LI&gt; 
	 Spring's declarative transaction management is based heavily on AOP. With a single annotation, Spring can start a transaction before your method is invoked, then commit (or, in the case of an exception, roll it back) when the method terminates. You don't need to know about this as a consumer, of course, but behind the scenes.
	&lt;/li&gt;
	&lt;LI&gt;Spring Security can guard method invocation access, limiting
		
	the call to clients that are secured. This authentication checks against a security context, and - if authorized - proceeds. This works through the judicious use of AOP and some thread local state.&lt;/li&gt;
&lt;/UL&gt;</summary>
    <dc:date>2011-07-05T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Reframing the Question</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/reframing_the_question.html" />
    <author>
      <name />
    </author>
    <modified>2011-06-30T00:00:00Z</modified>
    <issued>2011-06-30T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt;
 Just watched a recording on JavaEE6 and JBoss AS7. JBoss AS7's looks like it's evolved by leaps and bounds! 
 I wonder if it's as mature as Glassfish now... Some of the new features in JBoss AS 7 seem to just be bug fixes. &lt;/p&gt;
 &lt;ul&gt;
	&lt;LI&gt;It's faster (which is great, because it's always been dog slow. JBoss AS5 had startup times of 60 seconds or more on trivial applications!)&lt;/li&gt;
		&lt;LI&gt;It doesn't leak classes (because previous versions had all sorts of classloader issues and this was a very common complaint)
			&lt;/li&gt;
			&lt;LI&gt;It supports the full JavaEE6 specification (because JBoss AS6 - the first release of the JBoss AS server line after the JavaEE 6 specification was finalized - didn't, instead choosing to only support the web profile)
				 &lt;/li&gt;
			&lt;LI&gt;It's productized into part of the JBoss EAP (which is great, because JBoss AS 6 wasn't, and - as JBoss AS 7 is &lt;em&gt;still&lt;/em&gt; not out yet, this means that  
				&lt;a href="http://www.ibm.com/developerworks/websphere/techjournal/1106_alcott/1106_alcott.html"&gt;Websphere (!!) was quicker to market&lt;/a&gt; with a supported version of Java EE 6 (both full profile and web profile) than JBoss! 
				&lt;/li&gt;
				&lt;/ul&gt;
 
&lt;P&gt;Towards the end, one of the presenters made the nonsensical assertion that, basically, Spring is quite old (and was therefore straddled with all of this imaginary legacy code), and that CDI is - in contrast - quite new. This is an example of "reframing." 
&lt;/p&gt;
&lt;P&gt;
	Spring's been around since 2003, in some form, and since 2004, in a big way. It's certainly older than CDI, sure. Obviously.   
	
	However, applications written in 2004 still run without modification on Spring 3.0 and the upcoming Spring 3.1, with very few exceptions. The &lt;em&gt;only&lt;/em&gt; exceptions are on the very few cases where we've deprecated certain APIs like our support for Apache OJB. Even still, if the older, relevant extension library is loaded, it runs. The supported parts of the component model haven't changed, just the libraries that we ship that build on top of the component model. Usually when we deprecate something, it just means we're not shipping it with the project, not that the code won't work on current versions of Spring.
	&lt;/P&gt;
	&lt;P&gt;
		In contrast, if you'd written your application on the "standard" EJB 2 (which was the norm when Spring first emerged), it would &lt;em&gt;not&lt;/em&gt; run on contemporary versions of these Java EE 6 application servers, especially those that just support the web profile. For that matter, if your application in Seam 2 (which was current six months ago!), it would not run once you upgraded to Seam 3 without heavy migration. (Definitely not anything close to a drop-in upgrade)
		&lt;/p&gt;
		&lt;P&gt; Spring's older, but evidently far stabler than both the J2EE / JavaEE implementations &lt;em&gt;and&lt;/em&gt; the standards.
			
  		If you're running Java SE 5, then there's little reason Spring wouldn't continue to work on an existing J2EE 1.4 server.			
To boot, new versions of Spring support programming models that are more powerful and as lightweight, as anything JavaEE has, &lt;em&gt;while&lt;/em&gt; maintaining&lt;/em&gt; backwards compatibility.   It's unfortunate that JavaEE6 can't maintain its legacy code &lt;em&gt;and&lt;/em&gt; add support for "new" component models at the same time, and even more so that this is what passes for a "standard." Spring has a better backwards compatibility story, within Spring as well as within J2EE and JavaEE application servers. 
			&lt;/p&gt;
			&lt;P&gt; Don't let people maliciously reframe this point. &lt;B&gt; Spring's maturity is a strength, not a weakness.&lt;/B&gt; The component model introduced in XML in 2004 still works today, and we've provided several alternative input configuration types to tap this same component model, including annotations and Java-based configuration. This is possible because any  configuration mechanisms - be it XML, Java configuration, annotations, the Groovy BeanBuilder, or anything else, is  eventually  normalized to a common component type at runtime.
				&lt;/p&gt;</summary>
    <dc:date>2011-06-30T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Geecon 2011 Roundup</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/geecon_2011_roundup.html" />
    <author>
      <name />
    </author>
    <modified>2011-06-29T00:00:00Z</modified>
    <issued>2011-06-29T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; What a couple of months! I've been running around like crazy. I attended Geecon, the Spring S2G Forums, and then the JAX San Jose conference, all in fairly short order. I'll try to put up roundups of my trips a bit more consistantly, starting with &lt;A   href= "http://www.geecon.org" &gt;Geecon&lt;/a&gt;. I've been to many European conferences, but this one is now among my favorites. The conference has the unique combination of excellent speakers at a low price, like &lt;a href="http://www.springone.com"&gt;the SpringSource S2GX Forums or SpringOne.&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Poland was the real surprise. This was my first time here and it far exceeded my many expectations.  The Polish Zlati is cheap   against the English Pound,  European Euro and - yes - even the American dollar (2.6, in May). It's easy to be taken (in any country) as a tourist, but  I found myself dropping my guard after five days. Nobody'd really tried anything, and most everything met with my expectations. &lt;/p&gt;
&lt;pre&gt;
 Assert.assertTrue( taxi.getPrice() &amp;lt;= expectedAmount,
    "the cab faire should never exceed " + expectedAmount+"!" ) );
&lt;/pre&gt;  
	 &lt;P&gt; At one point, I was taken for a ride (literally!): a taxi charged me 50 Polish Zl for a ride from the central square to my hotel which was otherwise consistently 19-24 Zl (even in traffic).   By comparison, a train ride from Krakow to Lodz is 54 Zl, and the trip is several hundred kilometers. That said, 50 Zl is roughly 19 USD at the moment, which is not enough to feed two adults and a child at McDonald's (the lowest of the low) in the states. So, it's all relative. The takeaway is that even being ripped off didn't feel so bad in Poland.
&lt;/p&gt;
		
		&lt;p&gt;  I did  a university talk on the first day (the university talks are three hours each), and I did a second, single-hour talk, on the first day of the conference proper. 
			The university talk was interesting because fully 70% of it was live coding or walk throughs or demos of some sort and I had dual screens, so I ended up coding using a 50' theatre-screen! I still have some small neck pain! :-)  Next time, I'll simply mirror my screens. Ow.
&lt;/p&gt; 
&lt;p&gt;   
The audience was great, I never know what to expect of audiences. Some times they ask questions, some times they don't. These audiences did a fine job of asking questions &lt;em&gt;all throughout &lt;/em&gt; the talks and outside, during the conference! Wonderful. This makes these trips worthwhile. The in-the-conference-hall discussions are invaluable, and redeeming.		
&lt;/p&gt;
  &lt;P&gt; After the first two days,  I decided to have a look around. The conference promoters were kind enough to help arrange a tour of the salt mines for  &lt;A HREf="http://www.javaspecialists.eu"&gt;Heinz Kabuts&lt;/a&gt;, Heinz'  son Maxi, and myself. Heinz is a personal hero of mine. I suspect most Java developers have read his pearls of wisdom as dispensed in his newsletter at some point or another. I found him through Bruce Eckel, whose  book - &lt;EM&gt;Thinking in Java&lt;/EM&gt; - helped me learn Java 13+ years ago. (I liked the book so very much that I sent Bruce a brief letter, the majority of which has appeared in the reader comments section of the book since 2003!) So, to finally get a chance to hang out with Heinz was great - he's even cooler than I  imagined!  
	 His son Max is quite the character, and of course is already programming! 
&lt;/p&gt;&lt;span style = "float:left; margin:10px; margin-left:0; width:400px"&gt; &lt;img src ="/jl/media/14390.jpg" width = "400" /&gt;  &lt;div &gt; &lt;em&gt; In the photo, Juergen Holler, myself, Eugene Ciurana, (name unknown, sorry!), and Cyril  &lt;/em&gt; &lt;/div&gt; &lt;/span&gt;
As usual, hanging out with Juergen Hoeller was a unique and wonderful experience. I joined SpringSource to get a chance to work with him and others like him, and I'm always grateful for his time.  The truth is, he gives of his time to anybody. No question too small, no topic to inane, and no JIRA too trivial. 
Juergen is easily one of the most indulging, humble  people you'll ever meet. Brilliant. If you get a chance to attend a conference where he's speaking, do so. You'll invariably learn something!  I &lt;em&gt;always&lt;/em&gt; learn something.
&lt;/p&gt; 
 &lt;p&gt;  On the final day - Saturday  - Heinz (and son Max), Emmanuel Bernard    and I took a tour of the Za Kapane mountains   - and the region surrounding it. What an amazing tour! We also took an impromptu boat trip, and floated downstream on a river bordering Slovachia on a wooden raft / boat for a few hours. I'm a throughly crispy critter at this point  -- I burnt in the sun and am now watching my skin turn into flakes. This was very good fun and the conversation even greater. We then toured the regions specifically, stopping in markets, at castles, and at other geological oddities like a mountain that resembled a sleeping man. As the tour guide - Carolyna - predicted, I was asleep in my seat as we returned home.
	
&lt;/p&gt; &lt;p&gt;Emmanuel (a French  speaker) and Heinz ( a German speaker) both speak impeccable  English, and it always depresses me that I've let my language skills fall so far behind while they do so well in so many other languages!&lt;/p&gt;
&lt;P&gt;Several people asked me  about the code to my university talk, which was a walking tour through all of Springdom. It introduced core Spring and the advanced component model underneath, AOP, and the proxy facilities, it introduced Spring's support for data processing and backend architecture (including JDBC, JPA, Hibernate, various NoSQL options, batch processing, event driven architectures, messaging, integration, and services), Spring's support for web applications including rich clients and web clients (including Spring @MVC - both standard HTML and REST, Spring Flex, Spring Mobile and Spring Android) and it introduced the world of Spring in the cloud. The code is &lt;A HREF="http://git.springsource.org/spring-samples"&gt;here&lt;/a&gt; and I'll put the slides up as soon as possible and tweet it from my Twitter handle &lt;a href="http://www.twitter.com/starbuxman"&gt;&lt;code&gt;@starbuxman&lt;/code&gt;.&lt;/a&gt; 
&lt;/p&gt;
	
	&lt;p&gt;After the Geecon conference, I took a trip to Lodz (pronounced, I learned, as &amp;quot;wooj&amp;quot;), in Poland, to visit a friend of mine (who I know by way of my mother's online bridge tournaments). I spent a few wonderful days there surrounded by truly wonderful people. I can't possibly hope to relay all the great experiences I had there, but I will share one. I was asked to talk to a young man of 13 years - my host's nephew - to encourage him in his computer studies. I reluctantly obliged and sat with him. The conversation was moving pretty well, he explained that he was trying to learn Java, and that he loved the new Android mobile phones. I asked him how he was proceeding in his Java studies, and he trotted out &lt;em&gt;Thinking in Java&lt;/em&gt;, in Polish! I asked him which phone he most fancied (that, he later explained, he was saving up to purchase) and he responded that he liked the Google Nexus S (which I both have and love!). I materialized the iPad I had in my backpack and he was uninterested, fascinated more with the Nexus S. I asked him to bring out his laptop so I could help him get setup to program in Java. He rebooted and - this is the part that kills me - he &lt;em&gt;already&lt;/em&gt; had Ubuntu installed, but was still taking his first steps and hadn't quite figured out how to get on the internet. Amazing! What a kid! I think - and you can never tell him this - that I emerged from that discussion more inspired than he was. What a wonderful experience.&lt;/p&gt;
	&lt;p&gt;I was a curious kid, growing up, and I owe any success I've had to this curiosity. I was programming very early in my life, and this was fortunate, because it's empowered me. I've heard it said that there will be two types of people -those who consume computers, and those who control computers. I'm privileged, I think, to be among those who can control computers. I'm excited by this kid's potential - indeed, by all of our potential. &lt;/p&gt;
	&lt;p&gt;After Poland, I was then off to the Spring S2GX Forums in Amsterdam and London. I'll cover that trip, however, in another post.&lt;/p&gt;</summary>
    <dc:date>2011-06-29T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>A Script for Retrieving Wayward OS X Windows</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/a_script_for_retrieving_wayward_os_x_windows.html" />
    <author>
      <name />
    </author>
    <modified>2011-04-21T00:00:00Z</modified>
    <issued>2011-04-21T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; 
Dear Lazy Webs, 
&lt;br /&gt;
I just had to unplug my secondary monitor and follow &lt;a href="http://www.leonamarant.com/2008/04/02/how-to-get-off-screen-windows-back-on-your-mac-os-x-v105/"&gt;the procedure outlined here&lt;/a&gt; to get a wayward OSX window back on  my display.
&lt;/p&gt; 
&lt;p&gt;Is there a better way?&lt;/p&gt;</summary>
    <dc:date>2011-04-21T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>So Close, but... So Far</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/so_close_but_so_far.html" />
    <author>
      <name />
    </author>
    <modified>2011-03-22T00:00:00Z</modified>
    <issued>2011-03-22T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt;
Started today pretty impressed that &lt;a href="http://blogs.msdn.com/b/interoperability/"&gt;Interoperability @ Microsoft&lt;/a&gt;
 was a sponsor at &lt;a href="http://www.eclipsecon.org"&gt;EclipseCon, which kicked off today.&lt;/a&gt; So, score one for community and interoperability. 
&lt;EM&gt;Then&lt;/EM&gt;, I see that Microsoft is &lt;a href="http://mobilized.allthingsd.com/20110321/microsoft-sues-barnes-noble-over-nook-alleging-its-android-use-infringes-patents/"&gt;suing Barnes &amp; Nobles and others for their use of Android&lt;/a&gt; in their tablet environments. 
Huh. 
They almost went an entire day without being ... &lt;EM&gt;Microsoft&lt;/EM&gt;. One for the history books.
&lt;/p&gt;</summary>
    <dc:date>2011-03-22T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>The Mystery of the Indexer Segfault in Eclipse CDT, a True Story</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/the_mystery_of_the_indexer_segfault_in_eclipse_cdt_a_true_story.html" />
    <author>
      <name />
    </author>
    <modified>2011-03-18T00:00:00Z</modified>
    <issued>2011-03-18T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;I just hit a good 'ol fashioned segfaulting bug! 
 For reasons I'm not proud of, I had cause to write some C++ code. I downloaded Eclipse CDT (And before some sadist comes along suggesting I should've stuck with vi or &lt;a href="http://xkcd.com/378/"&gt;butterflies&lt;/a&gt;, I've tried just about every C/C++ environment out there. I'm one of those guys that just doesn't understand writing C or C++ code without an editor. I'd sooner write Java than C or C++. Far too many things that can go wrong, it seems.) 
 
 I downloaded the latest one based on &lt;a href="http://www.eclipse.org"&gt;Eclipse Helios&lt;/a&gt;, installed it and then created a new C++ project (&lt;code&gt;File&lt;/code&gt; &amp;gt; &lt;code&gt;New&lt;/code&gt; &amp;gt; &lt;code&gt;C++ Project&lt;/code&gt; &amp;gt; &lt;code&gt;Executable&lt;/code&gt; &amp;gt; &lt;code&gt;Hello World C++ Project&lt;/code&gt;). As soon as the Eclipse indexer started churning, Eclipse suddenly just disappeared! One second, I'm looking at Eclipse, and then a blink later, I'm staring at my computer Desktop! The darned thing had segfaulted on me!  I triaged the droppings it had left just before it died - here are the salient excerpts  of the log: 
&lt;/p&gt;
&lt;PRE&gt;&lt;CODE&gt;#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007ffc8537f61e, pid=412, tid=140722453255936
#
# JRE version: 6.0_24-b07
# Java VM: Java HotSpot(TM) 64-Bit Server VM (19.1-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.so+0x29861e]
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
---------------  T H R E A D  ---------------
Current thread (0x0000000040530800):  JavaThread "CompilerThread0" daemon
  [_thread_in_vm, id=422, stack(0x00007ffc7fc69000,0x00007ffc7fd6a000)]
siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x000000000000000d
Registers:
RAX=0x0000000000000000, RBX=0x0000000000000005, RCX=0x0000000000000000, RDX=0x00000000d8000000
...
Register to memory mapping:
RAX=0x0000000000000000
0x0000000000000000 is pointing to unknown location
...
RDX=0x00000000d8000000
{other class} 
 - klass: {other class}
RSP=0x00007ffc7fd671e0
0x00007ffc7fd671e0 is pointing into the stack for thread: 0x0000000040530800
"CompilerThread0" daemon prio=10 tid=0x0000000040530800 nid=0x1a6 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
...
RSI=0x00007ffc85a840d0
0x00007ffc85a840d0: &lt;offset 0x99d0d0&gt; in /usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/amd64/server/libjvm.so at 0x00007ffc850e7000
...
R9 =0x0000000040534d90
0x0000000040534d90 is a global jni handle
R10=0x00000000404f5790
0x00000000404f5790 is pointing to unknown location
...
R15=0x0000000000000001
0x0000000000000001 is pointing to unknown location
Top of Stack: (sp=0x00007ffc7fd671e0)
0x00007ffc7fd671e0:   0000000000000005 000000004080b200
...
Instructions: (pc=0x00007ffc8537f61e)
0x00007ffc8537f60e:   48 89 fe 0f 84 2e 01 00 00 4c 8b 05 8a 13 83 00
0x00007ffc8537f61e:   8b 53 08 41 8b 48 08 48 d3 e2 49 03 10 8b 4a 18 
Stack: [0x00007ffc7fc69000,0x00007ffc7fd6a000],  sp=0x00007ffc7fd671e0,  free space=1016k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x29861e]
V  [libjvm.so+0x296c0b]
...
Current CompileTask:
C2:1110      org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator.postAccept(
 Lorg/eclipse/cdt/core/dom/ast/ASTVisitor;)Z (97 bytes)
---------------  P R O C E S S  ---------------
Java Threads: ( =&gt; current thread )
  0x000000004129e000 JavaThread "Worker-9" [_thread_blocked, id=781, stack(0x00007ffc623e6000,0x00007ffc624e7000)]
  ...
  0x00007ffc79ad8000 JavaThread &lt;b&gt;"org.eclipse.cdt.internal.ui.text.CReconciler"&lt;/b&gt; daemon [_thread_blocked, id=760, stac&lt;/CODE&gt;&lt;/PRE&gt;
 
&lt;p&gt; My many years of experience have helped me in these situations - they inform my professionalism and abiity to react decisevly and appropriately. It is imperative that one keep is cool when things don't  work out as planned. &lt;/p&gt; 
&lt;p&gt;So, I sucked my thumb, all the while whimpering a little. I mean, c'mon! Somewhere in the &lt;EM&gt;millions&lt;/EM&gt; of lines of Linux source code and the entire 30+ &lt;EM&gt;million&lt;/EM&gt; lines of Eclipse source code was a bug, &lt;em&gt;actively&lt;/eM&gt; working to ruin my day! You'd cry too if you just thought about it a little. 
&lt;/p&gt;
&lt;p&gt; But I had one last defense before the false recourse of sticking Eclipse itself under a bugger (and, how I would've done that remains unclear; I couldn't very well have used Eclipse CDT to debug itself and the interactions between Eclipse CDT and the native code in the JRE!). I knew that I could ask my old pair programming pal, Google! I then started scanning looking for unique, repeatable information (i.e., something that would make a good, precise Google query.). At the bottom, I found  &lt;b&gt;"org.eclipse.cdt.internal.ui.text.CReconciler,"&lt;/b&gt; and away I went! I asked The Google about any issues with that class in Eclipse CDT, and was given &lt;a href="http://www.eclipse.org/forums/index.php?t=tree&amp;th=200460&amp;S=02b8aad7b1bd5e0c66361e1ec1e6f92f#page_top"&gt;this Eclipse forums link&lt;/a&gt;. That eventually led me to &lt;a href="https://bugzilla.redhat.com/show_bug.cgi?id=647737"&gt;this bug report&lt;/a&gt;. That is where I found a workaround. It didn't quite match my situation, but the &lt;a href="https://bugzilla.redhat.com/show_bug.cgi?id=647737#c31"&gt;fix&lt;/a&gt; was the same: add &lt;CODE&gt;-XX:-UseCompressedOops&lt;/CODE&gt; to the end of my &lt;code&gt;eclipse.ini&lt;/code&gt;.
&lt;/p&gt;
&lt;p&gt;So, I hope this blog has helped you avoid this particular bug. It'll probably be fixed soon, but my pain remains. The worst part about all of this? I did &lt;em&gt;all that work&lt;/em&gt; just to end up in a position where I could write C++ code! That's like... helping the Dentist look for his &lt;em&gt;really big&lt;/eM&gt; drill so he can give  you a root canal! &lt;/p&gt;&lt;p&gt;Meh.&lt;/p&gt;
&lt;/P&gt;</summary>
    <dc:date>2011-03-18T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Hot to Retrieve Your Application From Google App Engine</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/hot_to_retrieve_your_application_from_google_app_engine.html" />
    <author>
      <name />
    </author>
    <modified>2011-03-12T00:00:00Z</modified>
    <issued>2011-03-12T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; 
 Sometimes, just sometimes - once every 5 years - I need to reverse engineer my own binary because I've either FUbar'd the code or the code is lost to me. Don't care to explain why the latter is true this particular time, but it is true. I need a built version of an application so I can run it through a trust Java Decompiler like the trustworthy  &lt;a href="http://www.varaneckas.com/jad"&gt;JAD&lt;/a&gt; tool. 
JAD tool hasn't correctly reverse current Java code since Java 1.5, but it does come close and it's far easier to simply clean that up (you can see the structure of the code, even if it isn't immediately obvious what to do to get it to compile again). 
&lt;/p&gt;
&lt;P&gt; In my particular scenario, my deployed Spring application lives on Google App Engine. 
      So, at least it's safe. 
 A bit too safe, unfortunately. I didn't know how to get a copy of the binary for my own purposes from Google App Engine. I did some Googling and found some documents that suggested a fix - use the Google App Engine's SDK tool &lt;em&gt;appcfg&lt;/em&gt; - to download the deployed source. Only catch was that the documents describing the tool were for the Python SDK, not the Java SDK. 
 I looked at the Java SDK and even tried running the command as described in the Python documents and got nowhere. So, I cheated. I did some more Googling, and by this I mean I simply contacted my friend at Google. 
He pointed out that I'd already had the answer: use the Python SDK to &lt;em&gt;download your Java application&lt;/em&gt;!
&lt;/p&gt; &lt;P&gt; So,  &lt;em&gt; if&lt;/em&gt; you're on Google App Engine, and  &lt;em&gt; if&lt;/em&gt; for one reason or another you obliterate your only copy of the source code and  &lt;em&gt; if&lt;/em&gt; you want to work against a deployed binary (a &lt;em&gt;very&lt;/em&gt; specific situation, sure, but it &lt;em&gt;could&lt;/em&gt; happen to somebody else besides me... one day!), then run the following command:
 &lt;PRE&gt;
./appcfg.py -e $YOUREMAIL@gmail.com download_app -A $YOURAPPID $NAME_OF_FOLDER_TO_WRITE_THE_RESULTS_TO
&lt;/PRE&gt;
&lt;/p&gt;
&lt;/p&gt;</summary>
    <dc:date>2011-03-12T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Getting Started with Various LAMP Languages</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/getting_started_with_various_lamp_languages.html" />
    <author>
      <name />
    </author>
    <modified>2011-03-09T00:00:00Z</modified>
    <issued>2011-03-09T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; A friend of mine pinged for some good bootstrap content on various technologies, namely Perl, MySQL, PHP, Python, Linux, C and C++. I learned (or, tried to... I'm convinced I'll never understand C++ and Perl) all of these different things over the years and so my knowledge is either outdated or incomplete. Nevertheless, I figured some of it might help others, too, so I'm reprinting a cleaned up version of my response email here. This information, of course, reflects my biases and experience and, except Perl, reflects professional experience in some form or another. &lt;/p&gt;
&lt;p&gt;
&lt;b&gt;
Perl:&lt;/b&gt; Never. ever. use. Perl. I don't know it (couldn't seem to sit and learn it with a straight face. It made me anxious), and can't recommend it unless you're a hard core system administrator who doesn't know Python, Ruby, C or Bash. It's horridly unreadable to all but the most exacting of eyes. It's been stuck at version 5.x for the last 10+ years. 6.0 has been "in progress" since 2001, code-named "Parrot." When Parrot becomes real I could easily see taking it on again.
&lt;/p&gt; &lt;p&gt;
&lt;b&gt;
PHP:&lt;/b&gt; it's a dead simple language - I don't know that there's a good introduction to it since I learned it when it was at PHP 3 from the early 2000's. (It's the 5th language I learned, after Java, C, Python and JavaScript). I tended to dislike the language at 3 and 4. 5 seems markedly improved, though I haven't used it since 4. The community's active and in agreement about its strengths. Typically, it lives inside a web server (Apache, Ninx, Lighttpd). It has no built-in modularization mechanism besides classes - no name spaces and compilable unit, so you end up sharing source code. The latest and greatest is PHP 5.3, which means that 6.0 isn't out yet. Most "extensions" to PHP are written in C, not PHP, presumably because it's not fast enough, or can't be used to manipulate enough things to achieve the extension. PHP does have PEAR (PHP extensions, libraries) and PECL (C extensions), last I checked, to provide a way to bundle standard classes and binary extensions. If you want to do core web programming, then PHP's an OK way to go. I'd still argue for Java (or a JVM language, like Groovy or Scala), Python or Ruby on Rails though. Sorry I can't help you learn it - it truly is easy, though. Google for tutorials. The original language was little more than a macro processor, and following its evolution was dead simple. Most of the object-oriented features in 4 and 5 were approachable given my background in Java, so that came naturally, too. &lt;/p&gt;
&lt;p&gt;
&lt;b&gt;C: &lt;/b&gt;C is markedly more difficult to learn than PHP and at the same time much friendlier for the simple things. (Brian) Kernighan &amp; (Dennis) Richie wrote &lt;em&gt;the&lt;/em&gt; introduction to C, back in the 70's. People still refer to the variant of C as "K&amp;R," or they refer to a particular standard. C99, for example, is the standardized version of C that came out in 1999. I only know "C99"-ish C, not proper "K&amp;R" C. I only write C when I'm trying to glue stuff   - typically operating-system specific stuff - together: Java and Windows, OSX, or Linux, via C, for example, or Python and something else, via C. I rarely have a use case for a full, stand-alone C program, if I'm honest. I almost always write modules that use C. C has no library - just a few standard types and the very, very loose language itself. So, the language itself is very easy, if a bit useless. You'll need to bind to something - either to your operating system (i.e., through POSIX or some additional APIs, or to some other library) to do anything. I've only met one person I'd call a "master" at C. To learn C, I learned by Googling and spending lots of time looking at Linux   sources (sources included with Linux, not &lt;em&gt;only&lt;/em&gt; the source for the Linux kernel  itself) and so on. Check out &lt;a href="http://www.SourceForge.net"&gt;SourceForge&lt;/a&gt; or &lt;a href="http://www.github.com"&gt;Github.com.&lt;/a&gt;
 &lt;/p&gt;&lt;p&gt;&lt;b&gt;C++:&lt;/b&gt; I tweeted recently that Herbert Schildt's now outdated C++ book was available for free download, which you might try finding. I think it was on MSDN (the Microsoft Developer Network). I learned C++ from Bruce Eckel's amazing "Thinking in C++" back in the 90s. He also wrote "Thinking in Java," which I loved so much so that I wrote in to him and gave a positive reader comment back in 2001. My comment is on one of the few pages on the inside front cover of his book, book under "reader comments" to this day ;-) He used to make the books available for free download, which I suspect you could still find if you Googled. Otherwise, you can buy the two volumes of it on Amazon.
 
In college I also read "Starting Out With C++" which was... &lt;em&gt;lame&lt;/em&gt; compared to "Thinking in C++," but it's also thorough (and shorter!), so it might be a good intro-read to ramp you into it. As with C, but to a lesser extent, to make use of C++, you need third party libraries since C++'s core standard library is kinda crap compared to Java or .NETs or Pythons, etc, so one popular choice is to use a platform abstraction like Boost, or Apache Portable Runtime (APR) or Netscape Portable Runtime (NPR). Some good books on Boost/APR that I often refer to these days when I've (rare) occasion to write C++ is "Beyond the C++ Standard Library" and "Cross Platform Development in C++." The first introduces Boost, the second introduces ... APR and a lot of other stuff. All that said, C++ is not as universally used (or even close to as universally useful) as C, and it's far, far, far, far more complicated than Java or C. I would avoid C++ if possible. The only reason I liked C++ is because I then understood why Java was an improvement. &lt;/p&gt;&lt;p&gt;
&lt;b&gt;Linux:&lt;/b&gt; I have no good book on Linux to recommend, only several that all helped fill in parts of the puzzle: Red Hat Linux Administrators' Handbook, O'Reilly's UNIX Power Tools, Practical MythTV, EXTREMETECH "Hacking Ubuntu", EXTREMETECH "Linux Toys" I and II, the "Official Gnome 2 Developer's Guide," etc. Of course, with this one I was lucky to have a talented Linux ninja - &lt;a href="http://www.sudoinit5.com"&gt;Mario Gray&lt;/a&gt;) - to really push me into it and make sure I didn't have a chance to escape until I'd seen everything he wanted me to see. By then, I didn't want to escape. Linux worked wonderfully. ;-)  
&lt;/p&gt;&lt;p&gt;
&lt;b&gt;
MySQL:&lt;/b&gt; MySQL's dead simple.  &lt;code&gt;sudo apt-get install mysql-server-5.1&lt;/code&gt; on Ubuntu Linux, and then follow any tutorial on the internet. It's a a database with 3/4 of the features of PostgreSQL and Oracle. It's also a ...&lt;em&gt;scary&lt;/em&gt; open source project at the moment, because of all the politics surrounding licensing. MariaDB, MySQL, Drizzle, Percona, etc. I know Google has patched it over the years to suck less. If you need scalability and speed, use a NoSQL option. If you need features and an amazing, open-source database, use PostgreSQL. If you need a little bit of both AND commercial support, use Oracle, or the EnterpriseDB PostgreSQL build. Don't use MySQL unless you can avoid maintaining it. Amazon and Google App Engine for Business provide MySQL-like databases for their clouds, for example.
&lt;/p&gt;&lt;p&gt;&lt;b&gt;
JavaScript:&lt;/b&gt; If you know absolutely nothing about JavaScript, then  &lt;a href="http://www.webmonkey.com/2010/02/javascript_tutorial"&gt;Webmonkey,  formerly part of Wired.com, had Thau's Javascript Tutorial&lt;/a&gt;. That's how I learned it back in 1997. Don't let the 2010 date fool you, that tutorial's almost as old as the net itself. I learned it on IE 4 and Netscape 3 or 4. Since then, webmonkey.com shutdown and was sold, and then brought back to life after a few years shutdown. So, that tutorial is old content on TWO different versions of webmonkey.com! Since then, I've just read other people's code or wrote code and used Google for answers to things.
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;
Python:&lt;/b&gt;  Python was one of the easiest languages to learn since it was designed to be easy to learn, and, if I recall, Guido van Rossum (Python's creator) had experience with ABC, a learning language, which influenced Python's creation. I got my first look at Pyhon in the late 90's, or early 2000's. I think Bruce Eckel, again, mentioned Python in one of his books and that was enough to catalyze me to learn it properly. It's not hard to get going quickly, and for many years I kept it as my in-my-backpocket language, to do real work when Java might've been too complicated or if the task leant itself particularly well to Python's strengths in leveraging operating system-specific tools and APIs. Python has a large part of the POSIX APIs almost directly exposed through Pythonic APIs, for example, so your C skills come in handy there. It's a very good glue. I haven't really done more than played with Python's more recent web-tier support (and WSGI API, which provides the gateway interface between a web framework and application to the underlying web server, in much the same way servlets sits on top of the webserver, but below Java-based web applications.). I did have a pretty good experience with Zope (and the Plone CMS), which sort of predates all the current crop of Python web-framework killer-apps like Django and Turbogears. I have an older version of O'Reilly's "Programming Python," and I saw that it's since been updated, but it's huge - and as much a tutorial as a reference.  
&lt;/p&gt;&lt;p&gt;
So, that's a lot of how I got started. I'd of course be interested in any suggestions since a lot of this is outdated (At least, I &lt;em&gt;hope&lt;/eM&gt; it's outdated and that better texts have come since!).
&lt;/p&gt;</summary>
    <dc:date>2011-03-09T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Dependency Injection and Inversion of Control Have Been Commoditized</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/dependency_injection_and_inversion_of_control_have_been_commoditized.html" />
    <author>
      <name />
    </author>
    <modified>2011-03-06T00:00:00Z</modified>
    <issued>2011-03-06T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;The world of enterprise Java looks very different than it did 10 years ago. 10 years ago, I started following the news, the open-source projects, etc. In essence, I joined the "cult" of Java and haven't looked back. Even as I write Groovy and Scala code, I &lt;em&gt;still&lt;/em&gt; feel a part of that cult today.  &lt;/p&gt; 
&lt;p&gt; The marked progress  hasn't been more apparent to me than   today, when I read  that &lt;a href="http://java.dzone.com/dose/daily-dose-mozilla-opens-app"&gt;Apache Excalibur had been retired&lt;/a&gt;.
Apache Excalibur, for those of you who weren't lucky enough to watch the IoC and DI wars in the early 2000s, is an IoC container that's been around &lt;em&gt;forever&lt;/em&gt;. It hosted Java components that could be defined using the Avalon framework. So, Excalibur was a container with type contracts, like an EJB server was (up until November 2009 when Java EE 6 came out) to EJBs, not a POJO IoC container as you'd expect today. It was basically a way to build and manage enterprise components and also take advantage of the Avalon  component lifecycle and services. 
 I remember looking at Excalibur in 2001 or 2002 and being very excited by it. Same with the Pico Container which also &lt;a href="http://picocontainer.org"&gt;is still alive and kicking today,&lt;/a&gt; to my surprise!  
&lt;/p&gt;
&lt;p&gt;
So... was anybody using Excalibur today (besides &lt;a href="http://james.apache.org/"&gt;Apache James&lt;/a&gt;, the open-source Java e-mail server, which I'm not even sure still uses it and which I quite like as a test e-mail server)? 
Is this a market segment I've just been obvivious too? I've of course been oblivious to community trends at other big events, too. 
When EJBs first came out, I got suckered by the press and marketing behind it and thought it was going to be a fantastic tool. It took me a year or so to get to a point where I simply didn't care anymore about my job options, I refused  work in EJBs! 
I think the community also had the same reaction - at one point, we all sort of realized nobody else liked EJBs, either! 
I became a huge fan of XDoclet during this period, and an even bigger fan of Ant. I no longer have 80 hours a week to spend wrestling with code that could be written in a fraction of the time in .NET or Python. I no longer like Ant, or XDoclet, of course. 
For that matter, it    took me a long, but happy and oblivious year to realize people were employing JSF 1.0. I didn't think anybody would use JSF if things like Apache Tapestry and, later, Wicket and Echo and GWT were there. 
So, clearly, I've got a history of bad predictions. 
Sometimes, when a technology or trend just doesn't make any sense to me, personally, I tend to take for granted that others won't use it, too. 
Anyway, when the IoC/DI competitions started flaring up, I paid attention because I was &lt;em&gt;definitely&lt;/em&gt; looking for an alternative to the then current stack.  
 &lt;/p&gt;&lt;p&gt;Things are very different today. Dependency injection is commoditized today - everyone uses the Spring framework, and some  also use Guice or CDI. Naturally, I'm &lt;b&gt;very biased&lt;/b&gt; (I work for SpringSource), but I'm pretty sure you'll find that's true too. You might check job listings, or informally just ask people if they use IoC or DI, and if so, which container implementation. 
&lt;/p&gt;
&lt;p&gt; 
I would argue that Spring has been, from day one, a very good IoC/DI container. In the beginning, there were arguments about pure-play IoC, and how one container supported constructor-injection, and another supported method or property injection. I remember when &lt;a href="http://hivemind.apache.org/"&gt;Apache Hivemind&lt;/a&gt; (a project that grew as an offshoot of Howard Lewis Ship's work building Apache Tapestry 4.0) made its debut and only supported interface based injection, all the while giving us novel ideas like factory methods and method-based injection. Spring didn't pick favorites or impose philosophies - it supports all of those things!  
 Spring goes out of its way to be as straightforward and flexible as possible. &lt;/p&gt;
&lt;p&gt;
This too doesn't matter, I think. Conceivably somebody could simply build all of these things (and I'm sure many have) pretty easily. 
 So, while Spring's an excellent DI and IOC container, I hardly think everyone adapted it because of that alone.
  Spring won because it offered a component model and a supporting ecosystem of libraries and frameworks that were built from the ground up to support clean, IoC-centric, POJO-centric Java code. 
 Core Spring (and everything you'd need to have a competent, pure-play IoC container) all lives in 1-3 &lt;code&gt;.jars&lt;/code&gt;, depending on which parts you want and whether you also want the component model that comes with it.
&lt;/p&gt;&lt;p&gt; It's all the other stuff that you can do with Spring that has made it a crucial tool in every developer's toolbox today.
These frameworks deliver real value to customers because they simplify or  enable outright solutions that they couldn't otherwise build.
 
I think this is more true every day as the industry continues to grow and evolve, and Spring tracks it in lockstep, providing support for all th emerging trends and technologies. The cloud and big-data are two key areas where the players and - indeed-the game itself is changing so fast that no standards body could ever hope to do a good job standardizing there. 
 &lt;/p&gt;
&lt;p&gt;Anyway, enough of that rant. Just my two cents, as always. If you weren't paying attention to IoC or DI, then you don't know what you missed and this post won't be of much help ;-) It's interesting to see that today there's a very active debate about IoC and DI in both the .NET and ActionScript communities. The discussion there feels very simialar to the &lt;em&gt;intense&lt;/em&gt; debates we had in the Java world 10 years ago. And there too, the winners will be the ones that deliver the most business value beyond simply supporting the "dependency injection" pattern.
 
&lt;/p&gt;&lt;p&gt;Rest in peace, Excalibur.  
 &lt;/p&gt;</summary>
    <dc:date>2011-03-06T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Birthday week 2011</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/birthday_week_2011.html" />
    <author>
      <name />
    </author>
    <modified>2011-01-26T00:00:00Z</modified>
    <issued>2011-01-26T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; 
 Well, it's that time of year again! My dad's birthday, my birthday, and my favorite little 3 year old's (My buddy's little girl Makani - she's a whopping three years old already) birthday!
I'm taking a trip to Portland, Oregon with the misses this Friday to visit dad and see the family. I'm really looking forward to that.  Nothing quite so wonderful as perpetually, if only slightly, damp trees and coffee.  :-)
&lt;/p&gt;
&lt;p&gt; At "work" at SpringSource (where I spend the largest chunk of my day and usually the happiest part, too!) we just posted "&lt;a href="http://blog.springsource.com/2011/01/25/green-beans-getting-started-with-enterprise-messaging-and-spring"&gt;Green Beans: Getting Started with Enterprise Messaging in Spring.&lt;/a&gt;" I had a fairly big hand in that and feel like it'll be a very good introduction for a lot of people to two of the most important tools you can have in your arsenal, AMQP and JMS. In my humble, bordering-on-insignificant-opinion, the Spring support for JMS has always been second to none. It's easier to use JMS from Spring than it is from Java EE or anything else by far, and it has been for most of the last decade. It's &lt;em&gt;way&lt;/em&gt; easier to use AMQP-based brokers from Spring than anything else! Check it out - add that extra asynchronous kick to your architecture and code!
&lt;/p&gt;
&lt;p&gt;
For my new year's resolutions, I decided I needed a hobby (err, besides coding...). I sat down and wrote up a list, like this:&lt;/p&gt;
&lt;UL&gt; 
&lt;LI&gt; work out and diet. Aim to lose 10 lbs a month. This was basically a fear-based reaction. It reflected a lack of  resolve in last year's resolution, which was to gain 1 lb a month. I was told to never   negotiate out of fear! Don't negotiate with terror(ists)! Choosing this   would amount to  an affront to the basic  liberties I've long held dear. 
 &lt;/LI&gt;
&lt;li&gt; Read comics more. I used to read comics a lot as a boy, and look how I turned out; I'm fi... well... eh, I could be worse! 
&lt;/li&gt;
&lt;/ul&gt; 
&lt;p&gt; Anyway, after giving option one due reflection, I decided for option two, because ... well, who wouldn't? So, for my birthday, my wife bought me (&lt;em&gt;sssh!&lt;/em&gt; She doesn't know this yet, it's a surprise...) a &lt;a href="http://marvel.com/digital_comics/"&gt;Marvel Comics digital comics&lt;/a&gt; subscription. All told, it was like $60.00 for armchair-easy access to all the comics you could ever want to read from the last... at least 10 years (I missed a lot of stuff in the last ten years!)
 as well as new stuff. The only gripe is that it uses Flash to display the comic books on the screen (which isn't normally something I care about one way or another) and it &lt;em&gt;doesn't&lt;/em&gt; have an iPad app. It works &lt;em&gt;ok&lt;/em&gt; on my Google Nexus S, and of course my Linux Book Pro works perfectly, but they're of clumsy form factors. I want it to work on the iPad. I'd even pay an extra ten dollars.
&lt;/p&gt;
&lt;p&gt; Maybe next year... &lt;/p&gt;</summary>
    <dc:date>2011-01-26T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>And We're Off! 2011's Moving Way too Quick!</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/and_were_off_2011s_moving_way_too_quick.html" />
    <author>
      <name />
    </author>
    <modified>2011-01-24T00:00:00Z</modified>
    <issued>2011-01-24T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; And we're off! The new year has  been moving exceedingly quickly (I can't beleive we're already almost done with the first month! "Stop the world, I want off!")
   I don't know if you guys noticed, but SpringSource has been putting out new educational content (and a corresponding amount of code that quickly overwhelms any attempt at providing educational content..) on the &lt;a href="http://www.springsource.org"&gt;SpringSource.org&lt;/a&gt; web site. I have been trying to publish  two weekly-ish (we may miss a day or two or a column or two) "columns."  One is called "This Week in Spring," which details all the new stuff in the community related to Spring and/ or SpringSource. If you've written a cool Spring tutorial or read  a blog post that had what you needed to get going with Spring, let me know!  
Here's an example of last week's "&lt;a href="http://www.springsource.org/node/2997"&gt;This Week in Spring&lt;/a&gt;." 
The other "series" I've been working on (with occasional guest-scribes) is our series of educational, back-to-basics posts called "&lt;a href="http://blog.springsource.com/category/green-beans/"&gt;Green Beans.&lt;/a&gt;"
&lt;/P&gt;
&lt;p&gt;  At SpringSource R&amp;D, we've been racing like crazy with new stuff! Spring Data for NoSQL support, Spring Hadoop (which provides integration with Hadoop), Spring Integration point releases, Spring Batch, Activiti support, Spring AMQP, Spring Mobile (which, at the simplest level is Spring MVC support for mobile device content negotiation), Spring Android (support for consuming RESTful services from Android devices using Spring's RestTemplate) etc., are all in active development! I've missed a lot, of course, and this doesn't even include the &lt;em&gt;very&lt;/em&gt; impressive Spring core 3.1 changes that are fast nearing completion!  We've got so much code we don't even know where to keep it all! We have a presence on &lt;a href="http://www.github.com/springsource"&gt;github.com/SpringSource&lt;/a&gt;, on our own &lt;a href="http://git.springsource.org"&gt;git.SpringSource.org&lt;/a&gt; and of course the older (http://src.springsource.org) Subversion tree where Spring classic (among others) is still hosted. Users are, of course, always encourage to contribute and feedback. 
&lt;/P&gt;
&lt;p&gt; So, this is why I'm not doing a good job at keeping this blog current. Come visit me at &lt;a href="http://www.springsource.org"&gt;on the forums or in the blog posts!&lt;/a&gt; &lt;/p&gt;</summary>
    <dc:date>2011-01-24T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Springing Forward</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/springing_forward.html" />
    <author>
      <name />
    </author>
    <modified>2011-01-02T00:00:00Z</modified>
    <issued>2011-01-02T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt;I can't believe how quickly things have come and gone. I thought
2009 was great, but 2010 year no doubt takes the cake! Now that we're
all on the other side of the new year, I thought I'd take a quick
look at my year (and my decade) and talk about the Spring framework.&lt;/P&gt;
&lt;P&gt;Last decade started strangely for a lot of us here in the United
States. We saw a very strange election, the source of much discord in
the political world. Scandalous though that might have seemed, it
would all seem so fleeting when two planes crashed into the twin
towers in New York City, New York. The reactions of a panicked
country seemingly under siege would change the landscape over the
next several years. The ramifications are still very pronounced and
felt, I fear, in every corner of this tiny little planet.&lt;/P&gt;
&lt;P&gt;I started the decade, and my professional career, wading through
the dot-com boom and subsequent bust. I've been fortunate to have
worked with a lot of startups over the years. I've also worked in
stodgy, established corporations.  I feel like working at a bank is
the easiest way to fall through the cracks in life. It never ceases
to amaze me that there are projects in some banks being started this
very day, January 1, 2011 (1/1/11..!) using Struts 1. 
&lt;/P&gt;
&lt;P&gt;It has been my experience that startups have the blessing - and
burden - of having no room for failure. I have spent a lot of time
making things work that just shouldn't work. While I've always been
best-practices-oriented, I was leery of any gospel according to the
vendors. I once had a manager utterly terrorize me because I was
using EJBs when he had PHP script kiddies that purported to be able
to deliver a huge function of the project done by "just downloading
a script!" This taught me a valuable lesson. Looking back, I
suspect the manager's claim was probably genuine, and I feel like
such a heel for blindly relying on the vendors' claims that EJBs were
the way forward, the future. I never could convince myself that the
PHP way was &lt;I&gt;the &lt;/I&gt; way, but
there was no denying the obvious productivity gains for many common
tasks.  There was a time when I was looking pretty seriously at
moving to .NET because it promised radically improved turnaround
times. One of my main reservations about the then-nascent .NET
ecosystem was the lack of open-source. I've always worked hard to use
open-source if I could. 
&lt;/P&gt;
&lt;P&gt;The Spring framework came along just in time. Engineers that
survive in startups tend to be scrappy engineers who are interested
in results, not process, and who aren't in it for the 9-5 shift, but
for results. The Spring framework is open source; it closed the gap
between .NET and Java by providing niceties like declarative
remoting, declarative transactions, etc; it also helps further
best-practices, not hinder them. I've been a true believer in the
Spring framework from day one.  
&lt;/P&gt;
&lt;P&gt;In early 2005, I moved to Tempe, Arizona to help start a company.
The venture was a victim of the wayward economy when the housing bust
hit. While I made some great friends and met my wife there, I was
glad to return to Los Angeles in March of 2009. 
&lt;/P&gt;
&lt;P&gt;
&lt;img src = "/jl/media/13250.gif" width ="250" style ="float:left;border:0; margin-right:10px;"/&gt;
Early in 2010 I had the fantastic good fortune to join a company
here in Los Angeles called &lt;A HREF="http://www.shopzilla.com"&gt;Shopzilla&lt;/A&gt;
- they're the group behind &lt;A HREF="http://www.bizrate.com/"&gt;BizRate.com&lt;/A&gt;,
&lt;A HREF="http://www.beso.com/"&gt;BeSo.com&lt;/A&gt;, &lt;A HREF="http://www.shopzilla.com/"&gt;Shopzilla.com&lt;/A&gt;,
and &lt;A HREF="http://tada.com/"&gt;tada.com&lt;/A&gt;, each of which gets a
staggering amount of traffic. They use the Spring framework
extensively and feature an excellent engineering environment as well
as one of the best workplace environments in the business (arcade,
lounge, free lunch, great perks, gym, etc., etc.). There are many
brilliant people at Shopzilla. I think it is our natural tendency to
approach strange codebases with trepidation and a sense of, "well,
I could do this better!" and a lot of times, unfortunately, that
instinct is on the money. I never felt that way with the large swaths
of code I encountered in Shopzilla's codebase. 
&lt;/P&gt;
&lt;P&gt;I've been in the unfortunate position in my life of having to work
at places where engineers were begrudged unit tests; where code and
projects were wildly inconsistent, or antiquated across projects;
where there was a strong, undue sense of code ownership and code was
walled off to all but two engineers (who had twelve weeks off yearly
and were busy planning their retirements). Shopzilla was the
antithesis. It was... wonderful to be completely unencumbered by
management and bureaucrats. 
&lt;/P&gt;
&lt;P&gt;I loved Shopzilla's earnest maximization of the Spring framework. &lt;/P&gt;
&lt;P&gt;Let me try to explain. If you'll permit a generalization,
engineers at startups can't afford to trust, anything. No time, after
all. You hope that people already appreciate the benefits of code
reuse, of course. I wonder if those people also realize the
responsibility that comes with reuse. If something breaks in that
code, its up to you to see it gets fixed. Keeping a stack as
open-source centric as possible facilitates fixes. Broken code in a
server is bad, but try &lt;I&gt;proving &lt;/I&gt;it, let alone fixing it,
without the source code! Support contracts might help there, but
rarely as quickly as you need it to. It takes courage to use other
people's code, and it takes courage to trust &lt;I&gt;and&lt;/I&gt;
verify promises extended by that code. It takes skill to integrate -
and to care - about the big picture system, and not just the
individual moving parts, too.  
&lt;/P&gt;
&lt;P&gt; That is my conceptual framework
when approaching projects. I use the Spring framework because it
integrates with many different technologies and insulates users from
the idiosyncrasies between various technologies through a unified
component model. It levels the playing field. Depending on the stack,
there are any number of places one might have to tailor a project 's
behavior to the requirements of a system. Logging frameworks, service
tiers, web service tiers, caching frameworks, web (including core
APIs like Servlets), workflow engines, integration engines,
processing grids, batch processing frameworks, job scheduling
frameworks, etc., all have their own notion of a "component" in
that domain, and each one of them expects you to work in terms of
that component model, ignoring the uniformity and conventions you'd
hoped to establish across your code base. 
&lt;/P&gt;
&lt;P&gt; Spring opens the doors to all
these technologies (and untold many others) and lets you work in
terms of &lt;I&gt;your &lt;/I&gt; domain
model. The engineers behind the Spring framework have plumbed the
depths of these various frameworks and done the legwork to make it
easy for you to integrate them in a manner consistent with your
codebase. Where they've had to, they've fixed parts of these
projects, and provided less risky paths for integration. Often, this
process is as simple as dismantling the custom component model in
place and letting people think in terms of plain 'ol Java objects
(POJOs), avoiding the inconsistent, ever-varying, project-specific
configuration files.  
&lt;/P&gt;
&lt;P&gt;Spring's power - and the reason why I personally find the very
notion of some other pure play IoC container like CDI as a "competitor"
to Spring to be laughable at best - is its rich, unified libraries
and the platform that it provides through its integrations. Spring
provides a clean, consistent metaphor for approaching problems. It
provides libraries that are idiomatic and that work wonderfully
together, and it provides services that can be weaved in a clean way
across an application. These libraries are often layered. They
present the 90% case solution first, but provide hooks through the
use of things like strategy interfaces and callback methods should
you need to tailor the behavior. 
&lt;/P&gt;
&lt;P&gt;The Spring framework is a very good example of the &lt;A HREF="http://en.wikipedia.org/wiki/Open/closed_principle"&gt;open/closed
principle&lt;/A&gt;. It is telling that very few people even know about all
of the Spring framework's extension points; most people don't need
them. For 90% of the use cases, Spring makes the impossible easy, and
provides the flexibility to tackle the other 10%. Where possible,
Spring makes facets of an application invisible -  things that used
to require an API. Where there is still an API dependency, Spring
typically ships with a cleaner API that insulates you from it or
simplifies it. 
&lt;/P&gt;
&lt;P&gt;I mention all of this because Shopzilla's architecture and
applications - as much as possible - lived in the 90%; things were as
simple as possible thanks to Spring and the &lt;I&gt;incredible &lt;/I&gt;diligence
of the engineering team. Shopzilla really excelled in all the little
10% spots, too. They used or extended everything, taking nothing for
granted. Shopzilla had a custom Spring MVC view resolver and view
templating format, for example. They have a custom JMS message
listener container that was geared to batching in the style of the
Spring framework's message listener container. They made ingenious
use of monitoring, Spring's amazing AOP support, JMX, and various
open source projects to handle terabytes of logging. The entire
federated architecture across several different teams used REST and a
standard, Maven controlled archetype to keep projects standardized.
In essence, as part of a engineering-wide culture of consistency, and
code reuse, Shopzilla had built upon and extended the Spring
framework, and it underpinned everything they did. Shopzilla
integrated technologies and published reusable solutions for common
problems so that &lt;I&gt;everybody&lt;/I&gt; 
benefited in the same way that the Spring framework itself does.&lt;/P&gt;
&lt;P&gt;Shopzilla's amazing, and I would recommend it to anybody if you're
looking for an amazing company to work for.&lt;/P&gt;
&lt;P&gt; 
 &lt;img src = "/jl/media/13249.jpg" width ="250" style ="float:left;border:0; margin-right:10px;"/&gt;
So, when I was approached to join SpringSource as the Spring
developer advocate, I was at once sad to leave Shopzilla, but elated
at the prospect of playing a part in this technology that had so well
served me for the better part of the last 8 years. Leaving Shopzilla
was painful, of course, but I had to see this opportunity through. I
have a deep respect for SpringSource and the committed engineers
there who  - even as I write this, on the last Saturday on New
Year's weekend - are sending emails about developments in the
projects! I've been with SpringSource since August. SpringSource is a
worldwide organization, so no matter what time of day it is, there is
somebody committing something awesome, somewhere, in plain view of
the world. If I'm not careful, I forget to leave my desk trying to
keep up with all the exciting stuff! 
&lt;/P&gt;
&lt;P&gt;Spring's made my decade much more pleasant than it might've
otherwise been. If you'd told me we'd have something like the Spring
framework in 2000, and that I'd be privileged enough to work with the
people behind it, I would have dropped my CORBA and EJB books on your
feet. It would have seemed so cruel to joke about something like
that. 
&lt;/P&gt;
&lt;P&gt;It's been a fantastic decade, and a particularly fantastic 2010,
and I can't wait to see what comes next. 
&lt;/P&gt;
&lt;P&gt;I hope you had a safe, joyous New Years, and I wish you a
fantastic new year, and a new decade. 
&lt;/P&gt;</summary>
    <dc:date>2011-01-02T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Devoxx 2010</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/devoxx_2010.html" />
    <author>
      <name />
    </author>
    <modified>2010-11-23T00:00:00Z</modified>
    <issued>2010-11-23T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;&lt;div style ="padding:5px;margin-bottom:10px; background-color:black;float:left; margin-right:10px;"&gt;&lt;a href="http://www.devoxx.com/" border="0"&gt;
&lt;img src = "/jl/media/12945.png"   /&gt;&lt;/a&gt;&lt;/div&gt;  
 I've just returned from Devoxx 2010 where I manned the SpringSource booth and talked to members from the community and gave a talk on the latest and greatest in the wide world of Spring. It was a lot of fun, but I'm glad to be home! There's a bit of downtown for those of us in the states as we celebrate Thanksgiving. Looking forward to catching up on some work!&lt;/p&gt;
&lt;P&gt;Then, I'm off to speak at the Salesforce.com &lt;a href="http://www.salesforce.com/Dreamforce"&gt;Dreamforce conference&lt;/a&gt;. I'll be giving an intro to &lt;a href="http://www.springsource.org/about"&gt;Spring&lt;/a&gt; for the busy Force.com developer with my friend &lt;a href="http://twitter.com/quintonwall"&gt;Quinton Wall,&lt;/a&gt; the SalesForce.com evangelist. This talk will be useful for developers interested in moving to the &lt;a href="http://www.vmforce.com"&gt;VMforce&lt;/a&gt; cloud, coming from a Force.com background. 
 The event looks to be &lt;em&gt;very&lt;/em&gt; interesting (beyond the incredibly cool technical sessions, I hear Bill Clinton's giving a keynote, and Stevie Wonder's the musical talent... not too shabby!), so don't miss it!&lt;/p&gt;</summary>
    <dc:date>2010-11-23T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>The H2 Embedded Database</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/the_h2_embedded_database.html" />
    <author>
      <name />
    </author>
    <modified>2010-11-23T00:00:00Z</modified>
    <issued>2010-11-23T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;  
I've been making heavy use of the &lt;a href="http://www.h2database.com"&gt;H2&lt;/a&gt; database of late.  
 H2 represents the next big idea from the mind of the gentleman who created &lt;a href="hsqldb.org"&gt;HSQL&lt;/a&gt;, so, of course, it's a rock-solid alternative to that.  
&lt;/p&gt;
&lt;p&gt; I used it for my sample code in my blog post on the SpringSource blog &lt;a href="http://blog.springsource.com/2010/11/09/green-beans-putting-the-spring-in-your-step-and-application/"&gt;Green Beans: Putting the Spring in Your Step (and Application)&lt;/a&gt; 
a few weeks ago and it worked really well. 
 Ultimately, the example demonstrated Spring's fantastic support for creating embedded databases through the &lt;code&gt;jdbc&lt;/code&gt; namespace. Using the namespace, you can create an in-memory, embedded database instance, feed it setup SQL scripts, and then reference it as a datasource, all in the following 3 tidy little lines:
&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;jdbc:embedded-database id="ds" type="H2"&amp;gt;
  &amp;lt;jdbc:script location="classpath:setup.sql"/&amp;gt;
&amp;lt;/jdbc:embedded-database&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt; I mention this all because it'd be easy to think of H2 as &lt;em&gt;only&lt;/em&gt; an embedded database.  But it's not. I've not used it in anger myself yet, but recently I've seen it used in several places I wouldn't have imagined at first. H2 itself bills itself as the most advanced open-source database out there (not just of the
 &lt;em&gt;Java&lt;/em&gt;, or &lt;em&gt;embedded&lt;/em&gt; databases, but &lt;b&gt;all&lt;/b&gt; of them!)
&lt;/p&gt;  
&lt;p&gt; I'm a big believer in the power of a good workflow / business process managment system, and support and use &lt;a href="http://www.activiti.org"&gt;Activiti&lt;/a&gt; which is an Apache 2 licensed open-source BPMN 2.0 implementation. I'm also a  committer to the project on the SpringSource side, along with the unnaturally brilliant Mr. Dave Syer, but   my knowledge of it is mainly from using it as a consumer. Activiti stores process state in a database (this is how it's able to passivate processes over long expanses of time). The first several milestone releases of Activiti  
featured exclusive support   for persisting process state in H2, and H2 alone. As the project nears 5.0 GA, support for PostgreSQL and MySQL have also been added, but it's pretty telling that initially H2 was and they weren't.
&lt;/p&gt;  
&lt;p&gt; 
 If you spend time spelunking &lt;a href="http://git.springsource.org"&gt;git.springsource.org&lt;/a&gt; (and why &lt;em&gt;wouldn't&lt;/em&gt; you?), you'll know that it's a veritable treasure trove of code - many of the SpringSource open-source projects are there.  Users are also free to create accounts, and  clone and manipulate repositories as they like, in very much the same fashion as one might   with &lt;a href="http://www.github.com"&gt;Github&lt;/a&gt;. One particularly interesting project is &lt;a href="http://git.springsource.org/greenhouse"&gt;Greenhouse&lt;/a&gt;, which is a reference application out of which many different, great little projects have emerged like Spring Social, Spring Mobile and Spring Android. The application is an event manager for conferences. Most conferences have something like it to let you build a session schedule and be notified of changes, usually from the convenience of your mobile device, like Greenhouse. It too is built on top of H2 which is already in production and available to a non-trivial userbase. 
&lt;/p&gt;
&lt;P&gt; The reason I use it is because I tend to do a lot of things in the interest of exhibition, and nothing beats a readily available, easily installed database. With H2, you simply download it, unzip it, &lt;code&gt;cd bin&lt;/code&gt;, and then run &lt;code&gt;h2.sh&lt;/code&gt;. Boom, up pops a browser which prompts you to login and off you go! You can introspect your schemas, run queries (the query editor has auto complete and is &lt;em&gt;ridiculously&lt;/em&gt; intuitive, and keyboard friendly!) and do basic administrative tasks all from your browser. 
&lt;/p&gt; 
&lt;p&gt;So, what's my point? I didn't know much about this handy little database until a year ago and now, increasingly, I find myself reaching for it all the time! Give it a go if you have a moment, as that's all you need.  
 As I've never sat down and done a comparison against my  RDBMS-of-choice, &lt;a href="http://www.postgresql.org"&gt;PostgreSQL&lt;/a&gt;, I don't really know where H2 stands as an alternative, but my cursory sort of uses thus far give me the impression that it'd handily give MySQL a run for its money. &lt;/p&gt; 
&lt;/p&gt;</summary>
    <dc:date>2010-11-23T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Adobe MAX 2010</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/adobe_max_2010.html" />
    <author>
      <name />
    </author>
    <modified>2010-10-30T00:00:00Z</modified>
    <issued>2010-10-30T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;
&lt;a href="http://max.adobe.com/" style = "border:0;" border="0"&gt;&lt;img border ="0" src = "/jl/media/12639.png" style  = " background-color:black;  float:left; margin-right:10px; " /&gt;&lt;/a&gt;  
 What a whirlwind month! First, &lt;a href="http://www.joshlong.com/jl/blogPost/java2days_2010.html"&gt;Java2Days,&lt;/a&gt; then &lt;a href="http://www.joshlong.com/jl/blogPost/springone2gx_2010.html"&gt;SpringOne,&lt;/a&gt; and then Adobe MAX. 
&lt;/p&gt;&lt;p&gt; I just spoke at &lt;a href="http://max.adobe.com"&gt;Adobe MAX 2010&lt;/a&gt; with my colleague Jeremy Grelle on high productivity Flex applications using Spring Roo. Reception seemed to be very, very good (I'm attributing this to Jeremy, of course).  Jeremy's the main contributor and founder of the &lt;a href="http://www.springsource.org/spring-flex"&gt;Spring BlazeDS&lt;/a&gt; project from SpringSource. He's also the sponsor for the &lt;a href= "http://www.springactionscript.org/"&gt;Spring ActionScript&lt;/a&gt; project. Spring BlazeDS brings enterprise messaging and services to Flex and Flash clients. Spring ActionScript provides a clean way of describing IOC in your client-side ActionScript code - it even provides the ActionScript equivalent of the &lt;code&gt;@Autowired&lt;/code&gt; annotation on components that are added to the stage.
&lt;/p&gt;&lt;p&gt; &lt;a href="http://www.motorola.com/Consumers/US-EN/Consumer-Product-and-Services/Mobile-Phones/Motorola-DROID-2-US-EN"&gt;&lt;img border = "0" width = "200" src = "/jl/media/12640.png" style = "float:right;margin-left:10px;"/&gt;&lt;/a&gt;
This year was a very good year to be an attendee. They gave attendees new &lt;a href="http://www.motorola.com/Consumers/US-EN/Consumer-Product-and-Services/Mobile-Phones/Motorola-DROID-2-US-EN"&gt;Droid 2&lt;/a&gt; Android-based phones (I finally made the switch from an iPhone 3GS to an Android device! Yay! The Droid 2 is not the most impressive Android offering, by far, but represents a marked improvement over the iPhone. I was glad to get it. Attendees also received a &lt;a href="http://www.logitech.com/en-us/smartTV/revue"&gt;Logitech Revue,&lt;/a&gt;  which is a Google TV-based device.&lt;/p&gt;&lt;p&gt; 
As you might expect from a good conference, there were plenty of great hallway conversations. Look forward to it next year! &lt;/p&gt;&lt;p&gt; Now, however. I'm going to enjoy this beautiful Southern California weekend and look forward to &lt;a href="http://www.devoxx.com/display/Devoxx2K10/Home"&gt;Devoxx&lt;/a&gt;
&lt;/p&gt;</summary>
    <dc:date>2010-10-30T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>SpringOne2GX 2010</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/springone2gx_2010.html" />
    <author>
      <name />
    </author>
    <modified>2010-10-18T00:00:00Z</modified>
    <issued>2010-10-18T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;&lt;a href="http://www.springone2gx.com/" border="0"&gt; &lt;img src = "/jl/media/12383.png" style  = "float:left; margin-right:10px; " /&gt;&lt;/a&gt;  I'll be speaking at &lt;a href="http://www.springone2gx.com/"&gt;SpringOne2GX&lt;/a&gt; this week along with a raft of supremely awesome speakers from the Spring and Grails communities.   I'll be delivering a talk about building custom components (mostly, custom adapters) for &lt;a href="http://www.springsource.com/spring-integration"&gt;Spring Integration.&lt;/a&gt;  There are other talks happening concurrently that, if I weren't giving a talk, I'd want to attend. :-) This year is poised to continue last year's agressive growth in attendance. Besides my talk, I'll be there  taking in the talks and chatting with people in the hallways.  I hope to see you there! &lt;/p&gt;</summary>
    <dc:date>2010-10-18T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Ubuntu 10.10 (Maverick Meerkat) on a MacBook Pro</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/ubuntu_1010_maverick_meerkat_on_a_macbook_pro.html" />
    <author>
      <name />
    </author>
    <modified>2010-10-04T00:00:00Z</modified>
    <issued>2010-10-04T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; I have long used &lt;a href="http://refit.sourceforge.net/"&gt;rEFIt&lt;/a&gt; to install Ubuntu on a MacBook Pro. Simply install rEFIt as instructed on the site and then install Ubuntu on the newly created partition. No weirdness. Depending on your hardware, you may need to make sure that the Ubuntu installer program uses &lt;i&gt;nomemset&lt;/i&gt;. This wasn't the case for me. &lt;/p&gt;&lt;p&gt;This setup lets me have my favorite operating system on (admittedly) fairly nice (albeit overpriced) Intel x86 machines.  However, the latest generation of MacBook Pros &lt;a href="https://bugs.launchpad.net/linux/+bug/576601"&gt;have caused me no end of grief with Ubuntu 10.04.&lt;/a&gt; Ubuntu 10.10, Maverick Meerkat, remies everthing and I'm happy to report I'm running the release candidate of Ubuntu 10.10 on my Macbook Pro as I type this. &lt;/p&gt;&lt;p&gt;Everything seems to be working fairly well. I put this post out to confirm it can work for you on a Mac, and to also point people &lt;a href="http://www.pagondel.org/how-to-instalar-vmware-en-ubuntu-10-10-64-bits/"&gt;to this&lt;/a&gt; page if they're having trouble getting &lt;a href="http://www.vmware.com/products/player/"&gt;VMware's excellent VMware Player&lt;/a&gt; product working on 10.10. &lt;/p&gt;</summary>
    <dc:date>2010-10-04T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Java2Days 2010</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/java2days_2010.html" />
    <author>
      <name />
    </author>
    <modified>2010-10-04T00:00:00Z</modified>
    <issued>2010-10-04T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; &lt;div style = "float:left; margin-bottom:10px;  margin-right:10px; padding: 10px; background-color: black; width:220px "&gt; &lt;img width ="200"  src = "/jl/media/11883.png"/&gt;  &lt;/div&gt; I'll be speaking (again) in Sofia, Bulgaria at &lt;a href="http://2010.java2days.com/"&gt;the Java2Days conference&lt;/a&gt; on the 7th and 8th of October. I was there last year and quite enjoyed the conference. What a wonderful group! I'll be copresenting two talks with Oleg Zhurakousky (we'll be talking about &lt;a href="http://www.springsource.org/spring-integration"&gt;Spring Integration 2&lt;/a&gt; as well as RabbitMQ and AMQP), and another with &lt;a href="http://www.jamesward.com/"&gt;James Ward&lt;/a&gt; (we'll be talking about Spring BlazeDS and Flex, naturally). Finally, I'll be giving another presentation  on using Spring and the Apache 2 licensed BPMN 2 solution &lt;a href="http://www.activiti.org"&gt;Activiti&lt;/a&gt; (simialar to the talk I gave at  &lt;a href="http://jz10.java.no/"&gt;JavaZone&lt;/a&gt; recently).  Java2Days is the only conference of its kind in the Balkans and I sincerely hope to see you there!  &lt;/p&gt;</summary>
    <dc:date>2010-10-04T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Spring and the Activiti BPMN2 engine  at JavaZone 2010</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/spring_and_the_activiti_bpmn2_engine_at_javazone_2010.html" />
    <author>
      <name />
    </author>
    <modified>2010-09-03T00:00:00Z</modified>
    <issued>2010-09-03T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt;   &lt;img src = "/jl/media/11498.png" style = "float:left; padding-right:10px; " /&gt; I'll be speaking at &lt;a href="http://jz10.java.no/"&gt;JavaZone&lt;/a&gt; in &lt;a href="http://jz10.java.no/about.html#The_Venue"&gt;Oslo, Norway&lt;/a&gt; on using &lt;a href="http://javazone.no/incogito10/events/JavaZone%202010/sessions#76db7d95-1ca5-4288-bc45-b71210a62b70"&gt;Spring and Activiti&lt;/a&gt; together. 	If you want to learn a bit about &lt;a href="http://en.wikipedia.org/wiki/Business_process_management"&gt;Business Process Management&lt;/a&gt; using &lt;a href="http://www.activiti.org"&gt;Activiti&lt;/a&gt; in conjunction with the &lt;a href="http://www.springsource.org"&gt;Spring framework,&lt;/a&gt; then this talk is for you!  We'll explore using Spring from Activiti's BPMN 2 engine, and we'll explore connecting your business processes to other interesting systems and offloading work using &lt;a href="http://www.springsource.org/spring-integration"&gt;Spring Integration,&lt;/a&gt; SpringSource's framework for building event driven applications and connecting your applications to your data and services.  &lt;/p&gt; We'll talk a little bit about Spring Integration, but  you won't want to miss Spring Integration lead  &lt;a href="http://javazone.no/incogito10/events/JavaZone%202010/sessions#d8859c59-5c58-45bf-bd1c-39167c2268d6"&gt;Mark Fisher's&lt;/a&gt; talk on Spring Integration either!  If you're new to the wide of world of Java configuration  in Spring 3, then be sure to check out Costin Leau's talk on &lt;a href="http://javazone.no/incogito10/events/JavaZone%202010/sessions#d1f50946-9c72-441c-b30b-70af5b21633c"&gt;Spring 3 Java Config.&lt;/a&gt;&lt;/P&gt; &lt;p&gt; People may know about JavaZone from their excellent  &lt;a href="http://jz10.java.no/java-4-ever-trailer.html"&gt;Java 4-Ever&lt;/a&gt; trailer  or their           &lt;a href="http://jz10.java.no/ladyjava-music-video.html"&gt;Lady Java&lt;/a&gt; video. If you haven't seen these, then check them out! &lt;/p&gt;</summary>
    <dc:date>2010-09-03T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Spring for Force.com Developers</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/spring_for_forcecom_developers.html" />
    <author>
      <name />
    </author>
    <modified>2010-09-03T00:00:00Z</modified>
    <issued>2010-09-03T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt;    &lt;img src="/jl/media/11589.png" style = "float:left; margin-right:10px;"/&gt; I did a webinar with &lt;a href="http://www.twitter.com/cloudcoder"&gt;Quinton Wall&lt;/a&gt;, the Developer Evangelist for  &lt;a href="http://www.salesforce.com"&gt;Salesforce.com&lt;/a&gt; and specifically on the &lt;a href="http://www.vmforce.com"&gt;VMforce&lt;/a&gt; collaboration. The talk went very well (thanks for all the questions and good feedback, guys!) and we have the recorded webinar, code and slides up &lt;a href="http://www.springsource.org/node/2836"&gt;here&lt;/a&gt;. This first webinar was more about introducing developers to the Spring framework, and establishing basic skills to enable developers to use &lt;a href="http://www.vmforce.com"&gt;VMforce.com&lt;/a&gt;.  Stay tuned for the &lt;a href="http://www.developerforce.com/events/getstart_vmforce_techtalk/registration.php?d=70130000000FK2U"&gt;next webinar,&lt;/a&gt; coming Sept 9, that will expand on the details of VMForce.com as an opportunity for Spring developers. &lt;/p&gt;</summary>
    <dc:date>2010-09-03T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>(Secure) File Transfer, the Only Way to Fly... err Copy</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/secure_file_transfer_the_only_way_to_fly_err_copy.html" />
    <author>
      <name />
    </author>
    <modified>2010-08-24T00:00:00Z</modified>
    <issued>2010-08-24T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; I've recently posted a piece on using the file-transfer adapters in &lt;a href="http://www.springsource.org/spring-integration"&gt;Spring Integration 2.0&lt;/a&gt; on the  &lt;a href="http://blog.springsource.com/2010/08/23/secure-file-transfer-the-only-way-to-fly/"&gt;SpringSource blog&lt;/a&gt;.  Check it out and leave a comment! &lt;/p&gt;</summary>
    <dc:date>2010-08-24T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>My Weekend in Oregon</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/my_weekend_in_oregon.html" />
    <author>
      <name />
    </author>
    <modified>2010-07-31T00:00:00Z</modified>
    <issued>2010-07-31T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;&lt;div style = " float:right; margin-left:20px; margin-bottom:10px; "&gt;&lt;img src = "/jl/media/10788.jpg" style = " border:1px solid black; " /&gt;&lt;br/&gt;&lt;em&gt;My dad Clark, to the left, and my brother, Cary, to the right.&lt;/em&gt;&lt;br/&gt;&lt;img src = "/jl/media/10790.jpg"   height = "300"  style = "margin-top:10px;border:1px solid black; margin-right:10px;" /&gt;  &lt;img src = "/jl/media/10792.jpg"  height = "300" alt = "The fish that dad and I caught. He'd remind us that 2 of the largest were his :-)" style = "margin-top:10px;border:1px solid black;"/&gt;&lt;br/&gt;&lt;em&gt; &lt;b&gt;Left:&lt;/b&gt; is the view from Detroit dam. &lt;br/&gt;&lt;b&gt;Right:&lt;/b&gt; the  fish that dad and I caught. He'd remind us that 2 of the largest were his :-)&lt;/em&gt;&lt;br/&gt;  &lt;img src = "/jl/media/10791.jpg" alt = "the golden man at the Salem capital building."   height = "250"  style = "margin-top:10px;border:1px solid black; margin-right:10px; "  /&gt; &lt;img src = "/jl/media/10789.jpg" alt = "*a* duck crossing. Not *the* duck crossing. I like the penultimate duck, wings up in the air!" height = "250"   style = "margin-top:10px;border:1px solid black;  "/&gt;&lt;br/&gt;&lt;em&gt;&lt;b&gt;Left:&lt;/b&gt; the capital building in Salem, OR. &lt;br/&gt; &lt;b&gt;Right:&lt;/b&gt; &lt;u&gt;a&lt;/u&gt; duck crossing. Doubt this is fabled one in the story... &lt;/em&gt;&lt;/div&gt;As you know from &lt;a href="http://joshlong.com/jl/blogPost/spring_integration_at_oscon.html"&gt;my last blog entry&lt;/a&gt;, I  set out for &lt;a href="http://en.wikipedia.org/wiki/Portland,_Oregon"&gt;Portland, OR&lt;/a&gt; last week to give a talk at &lt;a href="http://www.oscon.com/oscon2010"&gt;OSCON&lt;/a&gt;. I arrived Wednesday nite, head south 50 miles or so to &lt;a href="http://en.wikipedia.org/wiki/Salem,_Oregon"&gt;Salem, OR&lt;/a&gt; - where I stayed with some family. The next day - Thursday evening - I made the trek back up to Portland (in my Uncle's giant, immaculate GMC pickup truck from '89!) for my talk on using &lt;a href="http://www.springsource.org/spring-integration"&gt;Spring Integration to connect business with their customers&lt;/a&gt; on Friday morning.  My time in Portland - Thursday night and part of Friday afternoon  -  was very fun. I met &lt;a href="http://twitter.com/jeremyg484"&gt;Jeremy Grelle.&lt;/a&gt; Jeremy was also presenting that morning; his talk was on the Spring Web Stack. (If you didn't know, Jeremy works a lot on the Spring web stack  - Spring Web Flow, Spring MVC, Spring BlazeDS, Spring ActionScript, etc.) A Friday at OSCON is a slow day. This particular one was only half as long as the regular conference days. So, as soon as Jeremy and I had finished our talks (they were both well received) we (two colleagues from &lt;a href="http://tech.shopzilla.com"&gt;the Shopzilla engineering group,&lt;/a&gt; Jeremy and I) cut out for some food and beer at &lt;a href="http://www.deschutesbrewery.com/splash/default.aspx"&gt;Deschutes brewery&lt;/a&gt; not too far by train from the conference hall. &lt;/p&gt;&lt;p&gt;I took the chance while in Oregon to head south a little bit and visit family in Salem, Oregon. I have a lot of family up there on my dad's side. Oregon's a beautiful state, Portland a beautiful city, but Salem... Salem is a &lt;b&gt;beautiful&lt;/b&gt; capital. There are things about Salem you'll have to see to believe. The people are nicer, the air  -  with Oregon being the greenest state in the union  -   is cleaner.  I spent many a summer in Salem as a kid - making the long trek down to Bend for summer activities, enjoying the parks,  the forest and - of course  -  the &lt;a href="http://en.wikipedia.org/wiki/Marionberry"&gt;jam&lt;/a&gt;.&lt;/p&gt;&lt;p&gt; This trip felt like coming home again; I got to visit with aunt, uncle, assorted family, brother, and my niece and nephew. Time flies. I was very glad to see  my brother Cary and my sister-in-law Sandy, and their family.  It's been a few years, I'm afraid.  His son, my nephew, is Curtis. His daughter, my neice, is Samantha.&lt;/p&gt; &lt;p&gt; Honestly, these sorts of stories make me feel old. Curtis was a giant! I hardly recognized him! He handily dwarfed both my brother and myself in stature and size. Whatever they feed those kids there, it's working! He has grown into quite a guy. &lt;/p&gt;&lt;p&gt; Curtis took my dad and I fishing on Saturday. He navigated and was the oreseman, guide, baby-sat us city-folk, handled re-baiting the lines and untangling the poles, and he still caught 5 fish (while helping ensure that dad and I each caught 4-5 fish!) It was amazing! I thought I'd seen everything. It was a catch-and-release river, so we didn't keep or eat anything we caught, but had a lot of fun nonetheless. &lt;/p&gt;&lt;p&gt;On Sunday, dad and I head out to &lt;a href="http://en.wikipedia.org/wiki/Detroit_Dam"&gt;Detroit Dam&lt;/a&gt; where we spent the early morning  hours - 6 AM to 10AM - with a line hanging off the side of the dam fishing. It was as if the fish were queuing,  single-file, and then jumping on our hooks.&lt;p&gt;Next comes my time with my niece, Samantha, now 16 or 17, going on 40. We spent the afternoons watching her  play in a city-wide basketball tournament called  &lt;a href="http://onghoopla.com"&gt;Hoopla.&lt;/a&gt; They cordoned off certain roads in downtown Salem and had   groups of all ages  play in matches. First, you have to admire a town where they have the initiative to close down major streets to provide such an outdoor, summer time activity for the youths. Second, my niece was excellent! Her team was ultimately eliminated on Sunday, but it was quite a riveting few matches getting there! &lt;/p&gt; &lt;p&gt; I've long enjoyed Salem. It's a small city with big-city folks. I laughed so hard I hurt myself a few years ago when my aunt and I set out for something and she impatiently came to a stop at a street with THREE cars on it at rush hour. She didn't appreciate being dragged out into the rush-hour traffic -  a rush hour of THREE cars. She really didn't appreciate having to stop. I poked my head out the window to see why traffic (I use the term loosely) had come to an abrupt stop, and almost fell over. There was a duck crossing! &lt;/p&gt;&lt;p&gt; I look forward to doing it again next year. What a good trip, with great people. And, being from Southern California, I more than appreciated the 85 degree-highs on a Summer day! &lt;/p&gt;</summary>
    <dc:date>2010-07-31T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Spring Integration at OSCON!</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/spring_integration_at_oscon.html" />
    <author>
      <name />
    </author>
    <modified>2010-07-17T00:00:00Z</modified>
    <issued>2010-07-17T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; &lt;img style = "float:left;" src = "/jl/media/10254.jpg"/&gt;Whew! Time sure flies! &lt;/p&gt;&lt;p&gt; I've been working 'round the clock of late with my fellow authors &lt;a href="http://www.webforefront.com/"&gt;Daniel Rubio&lt;/a&gt; and &lt;a href="http://www.metaarchit.com"&gt;Gary Mak&lt;/a&gt; to wrap up the writing for &lt;a href="http://www.amazon.com/Spring-Recipes-Problem-Solution-Approach-Second/dp/1430224991"&gt;Spring Recipes, 2nd Edition&lt;/a&gt; (more on that as it goes to press). This book's going to be second to none, folks.  Spring Roo, Grails, Spring Integration, Spring Batch, Flex, REST and many   (16, in fact!) other awesome chapters to bring you to the wide world of Spring 3. As a user of the Spring framework first and an author second, just trust me when I say I'd be very, very interested in buying this book if I wasn't already entitled to a free copy as an author. I digress. The book - all consuming though it is  -  isn't even why I'm writing this post! &lt;/p&gt;&lt;p&gt;&lt;a href="http://twitter.com/m_f_"&gt;Mark Fisher&lt;/a&gt; - lead of the &lt;a href="http://www.springsource.org/spring-integration"&gt;Spring Integration&lt;/a&gt; project and all around nice guy (I'm going to throw in &lt;i&gt;brilliant&lt;/i&gt;, as well, just in case you haven't had a chance to scour the code behind Spring Integration and come to that conclusion yourself) has been kind enough to let me contribute some adapters to the Spring Integration project  -  these adapters are centered around bridging communication between systems normally used by humans and automated systems. We have built support for &lt;a href="https://jira.springsource.org/browse/INT-1106"&gt;XMPP&lt;/a&gt; and &lt;a href="https://jira.springsource.org/browse/INT-1199"&gt;Twitter&lt;/a&gt; thus far. More's most assuredly coming, too! Looking into the crystal ball, I see ATOM and RSS playing a big part along with IRC. These adapters round out the support already provided for user-facing services like e-mail. &lt;/p&gt;&lt;p&gt;There's a lot of power and promise here. First, in a system with variable states, &lt;a href="http://xmpp.org/"&gt;XMPP&lt;/a&gt; is a very promising technology because - besides being a good way for diffent entities to exchange messages (it is, after all, the backing protocol behind Google Talk and Facebook chat) - it lets you add the notion of availability to actors in your system. Imagine a game, with users joining and leaving the game, or a chat room, or a grid of grid-nodes that may be taken off-line. XMPP provides a natural way of representing availability, which is increasingly important in a system with many fluctuating agents and states. &lt;/p&gt;&lt;p&gt;Twitter, ATOM/RSS and others are important because they let you consume human-synthesized events. Trends, volume, etc, are all interesting metrics that can be very valuable to your business.  I can see a lot of power in having a Twitter account that responds to queries or commands   - in much the same way as the &lt;a href="http://lifehacker.com/033602/smarterchild-im-bot"&gt;Smarter Child IM&lt;/a&gt; bot work(-s,-ed).  &lt;/p&gt;&lt;p&gt;In some sense, these adapters are only the beginning. They let your application  drink from the proverbial firehose of events, but what to do with them once you have them? Graph them? Send them to &lt;a href="http://www.splunk.com/"&gt;Splunk&lt;/a&gt;? Send them through a &lt;a href="http://www.springsource.org/spring-amqp"&gt;message broker&lt;/a&gt;  (and, depending on the volume, &lt;a href="http://www.rabbitmq.com/"&gt;which one?&lt;/a&gt;)?  Why not send them through a complex event processing (CEP) engine like &lt;a href="http://esper.codehaus.org/"&gt;Esper&lt;/a&gt; using this fantastic third party &lt;a href="http://www.opencredo.com/technologies/opencredo-esper"&gt;Spring Integration adapter for Esper&lt;/a&gt;? There, you can can process and analyze these events, and synthesize more interesting, complex events. &lt;/p&gt;&lt;p&gt;If this all sounds interesting to you (and why wouldn't it?), you should check out &lt;a href="http://www.oscon.com"&gt;OSCON&lt;/a&gt; next week in Portland, OR. I'll be there giving a talk called the "&lt;a href="http://www.oscon.com/oscon2010/public/schedule/detail/13391"&gt;The Social Enterprise Service Bus.&lt;/a&gt;" I'll be with some colleagues and friends from &lt;a href="http://tech.shopzilla.com/"&gt;Shopzilla,&lt;/a&gt;  too. If you'd like to grab a beer, ping me on Twitter (&lt;a href="http://www.twitter.com/starbuxman"&gt;@starbuxman&lt;/a&gt;) and we'll see what we can do! This is my first time presenting at OSCON, so I'm looking forward to attending some of the other talks almost as much as I am about getting a chance to talk to you guys. Hope to see you there!&lt;/p&gt;</summary>
    <dc:date>2010-07-17T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Is This Thing On?</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/is_this_thing_on.html" />
    <author>
      <name />
    </author>
    <modified>2010-07-16T00:00:00Z</modified>
    <issued>2010-07-16T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; Hello, world!  Nothing to see here, simply conducting a few tests of the software. Move along... &lt;/p&gt;</summary>
    <dc:date>2010-07-16T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Idempotent Queues With HornetQ (or: the 'Last Value  Header')</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/idempotent_queues_with_hornetq_or_the_last_value_header.html" />
    <author>
      <name />
    </author>
    <modified>2010-05-04T00:00:00Z</modified>
    <issued>2010-05-04T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; 
  Often times, a message queue is used as a way to publish "events" to 
other services in the enterprise. The publish/subscribe architecture 
decouples clients from the senders and alleviates the publisher from 
specific knowledge of the consumers of the messages. This, plus the 
asynchronous nature of a message queue 
 - the publisher does not block while clients consume the events - 
makes it ideal for publishing events to keep other systems aware of 
the state of a given system. 
&lt;/p&gt;&lt;p&gt; 
 Now, let's establish the use case: we want to consume events in a 
very busy system. In our case, it's possible to receive multiple 
events. Or, perhaps in your system you've positioned the message queue 
as a way to deliver commands - "pings" - using the "command bus" 
pattern. It may - and quite often is - be acceptable to ignore 
duplicate requests in architectures like these. 
 For example, a "command" message notifying a system that it can being 
processing a batch of data for the day only needs to be handled once 
per day, not 10 times, even if 10 different events are published. It'd 
be ghastly and inefficient to process the load 10x a day. What's 
required is some way to make message submission &lt;em&gt;idempotent&lt;/em&gt; 
for certain messages - to make them indifferent to duplicate message 
submission. 
&lt;/p&gt;  &lt;p&gt;  Backstory: I've been playing with JBoss' &lt;a 
href="http://jboss.org/hornetq/"&gt;HornetQ&lt;/a&gt; a lot recently. It's a 
&lt;em&gt;very&lt;/em&gt; fast message queue: it recently bested ActiveMQ in the 
&lt;a href="http://www.timfox.me/2010/02/jboss-hornetq-sets-record-specjms2007.html"&gt;SpecJMS2007 
benchmark by more than 300%!&lt;/a&gt;. It is able to perform these feats 
because it uses a native, asynchronous IO layer on Linux centered 
around the kernel's &lt;code&gt;libaio&lt;/code&gt; functionality. 
 On all other platforms, it's just gosh darned fast, regardless, but 
doesn't benefit from the native code acceleration. 
&lt;/p&gt; &lt;p&gt;   So, imagine my surprise when I found out that HornetQ 
supports something it calls a Last-Value Header - a well known message 
header that - when the value is duplicated by other messages - causes 
the submitted message to override the existing message: the latest 
message with a duplicate header wins. 
&lt;/p&gt;&lt;p&gt; Here's how code submission to the queue looks using Spring's 
&lt;a href="http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/jms.html#jmstemplate"&gt;JmsTemplate&lt;/a&gt; 
functionality: &lt;/p&gt; 
&lt;PRE&gt; &lt;CODE&gt; 
this.jmsTemplate.send(this.destination, new MessageCreator() { 
    public Message createMessage(final Session session) throws JMSException { 
        TextMessage textMessage = session.createTextMessage( ... ); 
       &lt;b&gt; textMessage.setStringProperty("_HQ_LVQ_NAME", 
someUniqueStringThatYouSpecify); &lt;/b&gt; 
        return textMessage; 
    } 
}); 
&lt;/CODE&gt;&lt;/PRE&gt; 
&lt;p&gt; So, it's often easy to find a business value that can be used to 
derive a semantically correct, unique key to identify duplicate 
events. Processing a customer's order with 3 items in the shopping 
cart at 12:30:30s PM? Build a key combining the 30 second window, the 
customer ID, the count of items, and the order ID. This provides a 
service-level mechanism to prevent nasty double submit issues, for 
example. 
&lt;p&gt; You need to enable this characteristic on the queue itself in the 
configuration files. 
&lt;p&gt; 
 In HornetQ there are a few files under the 
&lt;CODE&gt;$HORNETQ/config/&lt;/code&gt; folder that you need to be aware of to 
configure HornetQ: &lt;code&gt;hornrtq-jms.xml&lt;/code&gt;, 
&lt;code&gt;hornetq-configuration.xml&lt;/code&gt;, and 
&lt;code&gt;hornetq-users.xml&lt;/code&gt;. In this scenario, we need to only 
modify the &lt;code&gt;hornetq-configuration.xml&lt;/code&gt;. 
&lt;/p&gt; 
&lt;p&gt; For a queue configured in &lt;code&gt;hornetq-jms.xml&lt;/code as follows: &lt;/p&gt; 
&lt;PRE&gt;&lt;CODE&gt; 
   &amp;lt;queue name="dupesQueue"&amp;gt; 
        &amp;lt;entry name="&lt;b&gt;/queue/dupesQueue&lt;/b&gt;"/&amp;gt; 
        &amp;lt;durable&amp;gt;true&amp;lt;/durable&amp;gt; 
    &amp;lt;/queue&amp;gt; 
&lt;/pre&gt;&lt;/CODE&gt; 
&lt;p&gt; ... you'll need to make the following changes to 
&lt;code&gt;hornetq-configuration.xml&lt;/code&gt;:&lt;/p&gt; 
&lt;code&gt;&lt;pre&gt; 
  &amp;lt;address-setting match="&lt;b&gt;jms.queue.dupesQueue&lt;/b&gt;"&amp;gt; 
         &lt;span style ="text-decoration:underline"&gt; 
&amp;lt;last-value-queue&amp;gt;true&amp;lt;/last-value-queue&amp;gt;&lt;/span&gt; 
        &amp;lt;/address-setting&amp;gt; 
&lt;/pre&gt;&lt;/code&gt; 
 &lt;p&gt;Simple, right? So, go ahead, send all the messages you want - only 
one will remain (unless of course that message is consumed. This only 
guards against duplicate submissions assuming the messages haven't 
been delivered yet. Enjoy!&lt;/p&gt;</summary>
    <dc:date>2010-05-04T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>A New Post on Artima.com Called 'SOA, 5 Years In'</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/a_new_post_on_artimacom_called_soa_5_years_in.html" />
    <author>
      <name />
    </author>
    <modified>2010-04-26T00:00:00Z</modified>
    <issued>2010-04-26T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; I've just posted a blog on Artima.com called &lt;a 
href="http://www.artima.com/weblogs/viewpost.jsp?thread=290352"&gt;SOA, 5 
Years In.&lt;/a&gt; In it, I talk about some of the core value principals 
behind Thomas Erl's excellent &lt;a 
href="http://www.amazon.com/Service-Oriented-Architecture-SOA-Concepts-Technology/dp/0131858580"&gt;Service 
Oriented Architecture: Concepts, Technology, and Design&lt;/a&gt;. Check it 
out! &lt;/p&gt;</summary>
    <dc:date>2010-04-26T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>The ServerSide Java Symposium 2010 Recap</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/the_serverside_java_symposium_2010_recap.html" />
    <author>
      <name />
    </author>
    <modified>2010-03-20T00:00:00Z</modified>
    <issued>2010-03-20T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;&lt;img width="300" 
src="/jl/media/9781.jpg" style 
="float:left;padding-right:10px;"/&gt; 
I'm in my hotel room thinking about the last 3 days here at &lt;a 
href="http://javasymposium.techtarget.com/"&gt;The ServerSide Java 
Symposium.&lt;/a&gt; I've had a fantastic time. I gave and/or participated 
in two talks: one was a talk on jBPM and Spring, the other was 
participation (representing &lt;a 
href="http://www.springsource.org/spring-integration"&gt;Spring 
Integration&lt;/a&gt;) in a panel with Jeff Genender (representing &lt;a 
href="http://servicemix.apache.org/home.html"&gt;ServiceMix&lt;/a&gt;) and Ross 
Mason (representing &lt;a href="http://www.mulesource.org"&gt;Mule&lt;/A&gt;) on 
ESBs. I enjoyed that process and enjoyed talking to Jeff and Ross 
gentlemen to the last. The 400+ people in the audience were 
invigorating too. Im pretty sure anybody would tell you this year was 
a welcome, marked improvement over previous years, especially in 
attendance numbers. It also heralded the introduction of a new 
editorial lineup, with Cameron Mckenzie taking the lead-editors 
position. Hes got his work cut out for him, but Im confident hes up to 
the task. 
&lt;/p&gt;&lt;p&gt; 
Rod Johnson gave a "zepo" (zero-powerpoint) Spring / Roo keynote, 
which was very impressive until it seemed to have failed him at the 
end. A post mortem revealed that the demo was fine, just a simple 
error. It was interesting to note that &lt;a 
href="http://twitter.com/springrod/statuses/10735520971"&gt;he 
misplaced&lt;/a&gt; his wedding ring and still gave a 99% performance 
without slides in front of 400+ people! Well done! Spring Roo seemed 
to garner a lot of attention from the audience and the Twitterati. 
Matt Raible and James Wards talk on Flex vs. GWT was fun, as expected. 
Jeff Genender and Keath Hesler both turned in good talks on 
ServiceMix. Ted Neward and Scott Davis gave their talks to great 
reception, as usual. Finally, my old friends Reza Rahman, Kito Mann, 
etc., did very well too. I missed some of the JBoss crowd (Emmanuel 
Bernard and Dan Allen, notably) this year, however. 
&lt;/p&gt; &lt;p&gt;It was nice meeting James Gosling, too. Can't help but feel a 
little in-awe. 
The final treat was partaking in the festivities, libations, etc., 
with my colleagues at &lt;a 
href="http://tech.shopzilla.com"&gt;Shopzilla.&lt;/a&gt; Tim Morrow, Senior 
Architect at Shopzilla, gave a very &lt;a 
href="http://twitter.com/springrod/statuses/10736658220"&gt;well received 
talk&lt;/a&gt; about the scale story at Shopzilla. 
&lt;/p&gt;</summary>
    <dc:date>2010-03-20T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>A Month's Gap And No Explanation</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/a_months_gap_and_no_explanation.html" />
    <author>
      <name />
    </author>
    <modified>2010-02-17T00:00:00Z</modified>
    <issued>2010-02-17T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; Hello, world! I've been utterly and completely drowned in 
lake-busy these last few months. Updates may be a little slow for the 
next month, too. I've started working as an editor for &lt;a 
href="http://www.infoq.com/author/Josh-Long"&gt;Infoq.com's Java 
Queue&lt;/a&gt;. Work is progressing apace on my next Spring book, and some 
exciting things are happening in my personal life pretty soon. Plus, 
I'm working on an opensource side-project that'll unveil hopefully 
pretty soon here.  Anyway, check out my updates on Infoq.com if you 
want good old fashioned news, and on Twitter if you want commentary in 
140 character chunks.   Sorry I can't say more, but I will when I can! 
If you're going to &lt;a href="http://javasymposium.techtarget.com/"&gt;The 
Server SIde Java Symposium&lt;/a&gt; next month (March 17-19), don't forget 
to say hi, and &lt;a 
href="http://javasymposium.techtarget.com/html/speakers.html#JLong"&gt;attend 
my sessions!&lt;/a&gt; 
&lt;/p&gt;</summary>
    <dc:date>2010-02-17T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>A Very Interesting Technique For Cross-Domain AJAX Requests</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/a_very_interesting_technique_for_crossdomain_ajax_requests.html" />
    <author>
      <name />
    </author>
    <modified>2010-01-13T00:00:00Z</modified>
    <issued>2010-01-13T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt; 
I read a &lt;b&gt;very&lt;/b&gt; good article on breaking the crossdomain wall for 
Ajax requests. It's presented   &lt;span style ="font-size:larger;"&gt;&lt;a 
href="http://www.wait-till-i.com/2010/01/10/loading-external-content-with-ajax-using-jquery-and-yql/"&gt;here, 
as an entry on http://www.wait-till-i.com&lt;/a&gt;&lt;/span&gt;. In it, Chris 
Heilmann talks about using a Yahoo service and JSON-P requests with 
Ajax to load any site's contents. You should most certainly read his 
article - it's fantastic. 
I post here the most salient bit (for me) since it genuinely knocked 
my socks off. To re-use this in your own code, copy the parts I've 
highlighted in bold. You can use your own version of jQuery, 
naturally, as the most interesting aspect is the bits inside the 
&lt;code&gt;ajax&lt;/code&gt; function (which itself is pretty trivial. I created 
the wrapper function so that the code could be stashed away and 
re-used more readily). 
I demonstrate its use in the script fragment below that, where I load 
the HTML for this very site. 
&lt;PRE&gt; 
&lt;CODE&gt; 
&amp;lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
"http://www.w3.org/TR/html4/strict.dtd"&amp;gt; 
&amp;lt;html&amp;gt; 
&amp;lt;head&amp;gt; 
  &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&amp;gt; 
  &amp;lt;title&amp;gt; ZOMG! &amp;lt;/title&amp;gt; 
  &amp;lt;link rel="stylesheet" href="styles.css" type="text/css"&amp;gt; 
&amp;lt;/head&amp;gt; 
&amp;lt;body&amp;gt; 
&lt;b&gt; 
&amp;lt;script src="http://code.jquery.com/jquery-latest.pack.js"&amp;gt;&amp;lt;/script&amp;gt; 
&amp;lt;script language="javascript"&amp;gt; 
function ajax( url, cb){ 
 var yqlUrl =  "http://query.yahooapis.com/v1/public/yql?"+ 
            "q=select%20*%20from%20html%20where%20url%3D%22"+ 
              encodeURIComponent(url)+ 
            "%22&amp;format=xml'&amp;callback=?" ; 
 $.getJSON( yqlUrl,  cb ); 
} 
&amp;lt;/script&amp;gt; 
&lt;/b&gt; 
&amp;lt;script language="javascript"&amp;gt; 
$(document).ready(function(){ 
 ajax( 'http://www.joshlong.com', function(data){ 
  alert( data.results[0] +'' ) ; 
 }); 
}); 
&amp;lt;/script&amp;gt; 
&amp;lt;/body&amp;gt; 
&amp;lt;/html&amp;gt; 
&lt;/CODE&gt;&lt;/PRE&gt; 
&lt;/P&gt;</summary>
    <dc:date>2010-01-13T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Modeling</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/modeling.html" />
    <author>
      <name />
    </author>
    <modified>2010-01-11T00:00:00Z</modified>
    <issued>2010-01-11T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; 
I can't tell you how powerful overcoming the leap-before-looking 
temptation is when building a system. Have an object model? 
&lt;b&gt;Model&lt;/b&gt; it using UML or ERD. Have a workflow? Draw a workflow 
diagram (an activity diagram). Have a webflow? Draw a webflow diagram 
(looks like a state diagram, or in more sophisticated scenarios, like 
an activity diagram). Have a site map? Map the site using a site 
planning tool like &lt;a 
href="http://dub.washington.edu:2007/denim/"&gt;Denim.&lt;/a&gt; All of these 
tools facilitate VISUAL feedback. They are cognitive, high level 
disciplines, and for good reason! Your mind interprets things visually 
differently than it does when coding from the left brain - it is able 
to "see" associations between related concepts when it's fed ideas 
through feedback that ends up in the right brain. 
&lt;/p&gt;&lt;p&gt; I've mentioned this before, I think, but check out Neal Ford's 
&lt;a href="http://library.theserverside.com/detail/RES/1242309506_447.html"&gt;On 
the Lam From The Software Police&lt;/a&gt; for more. 
&lt;/p&gt;&lt;p&gt;Even if you don't check it out, invest in trying the modeling 
tools associated with the task you're attempting to solve. 
 Even if you feel - after giving the technology a REALLY good-faith 
effort - that you've gained nothing, I'm willing to bet your product 
will still be more "consistent" than if you had developed it from 
scatch, unable to see the big picture. 
&lt;/p&gt;</summary>
    <dc:date>2010-01-11T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Spring BlazeDS and your RIA/Thick/Thin/Fat client</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/spring_blazeds_and_your_riathickthinfat_client.html" />
    <author>
      <name />
    </author>
    <modified>2010-01-06T00:00:00Z</modified>
    <issued>2010-01-06T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;  How are you handling messaging in your thin client, thick client, 
fat client, RIA, or mobile client?  &lt;/p&gt;&lt;p&gt; &lt;a 
href="http://opensource.adobe.com/wiki/display/blazeds/BlazeDS"&gt;BlazeDS&lt;/a&gt; 
provides the ability to  proxy   messages from a JMS destination. Your 
AIR / Flex client can subscribe to it and provide a callback, very 
much like a Message Driven EJB or Spring's Message Driven POJOs. &lt;/p&gt; 
&lt;p&gt;Traditionally, reacting to an event on a bus in a client (which 
very well could exist outside the firewall) means polling some service 
or setting up a specialized proxy or perhaps having  separate DMZ-safe 
JMS destination where you forward client-bound messages. 
&lt;/p&gt;&lt;p&gt;Suffice it to say, all of this is tedious and imposes an 
unecessary burden on the architecture and the developers. When it 
comes to messaging and remoting based services, there is 
&lt;i&gt;definitely&lt;/i&gt; an extra burden on the developer of a RIA to secure 
or handle that requirement where this burden simply does not exist 
with traditional web applications. It is too frequently glossed over 
when architecting a system and then becomes a pain point. &lt;/p&gt;&lt;p&gt; 
There are &lt;i&gt;some&lt;/i&gt; tools... &lt;/p&gt;&lt;p&gt;If you are using AJAX for your 
RIA, then you will have mastered tools like comet for push-based 
messaging. Even here, though, the burden of connecting and configuring 
comet is on you, the developer. For example, &lt;a 
href="http://directwebremoting.org/dwr/index.html"&gt;DWR&lt;/a&gt; - which is 
fantastic - doesn't have a way of proxying a JMS destination that I 
know of. It &lt;i&gt;can&lt;/i&gt; be done, of course.&lt;/p&gt;&lt;p&gt;&lt;a 
href="http://www.dossot.net/"&gt;David Dossot&lt;/a&gt; showed me a very 
interersting, albeit specific, &lt;a 
href="http://docs.codehaus.org/display/JETTY/Integrating%20with%20ActiveMQ"&gt;solution&lt;/a&gt; 
that solves the problem for Ajax using ActiveMQ's JavaScript client. 
&lt;/p&gt; 
&lt;p&gt; So, back to the question at hand - how are you solving the 
problem? Do you just avoid building systems that have the problem? You 
truly can't think of at least one or two or a millino problems that 
would be better served by messaging? &lt;/p&gt; 
&lt;p&gt; To me, the most &lt;b&gt;complete&lt;/b&gt; solution appears to be Flex 
partnered with Spring and BlazeDS. If this post sounds like that of a 
gushing fan boy, you'll forgive me. It's true, unbounded enthusiasm. 
This technology is liberating, enabling! It reduces a real problem to 
a half hour of configuration - relegating the architectural burden 
back to the "gloss over" column, if you're using Flex. The Spring - 
BlazeDS integration is more than just a lot of "could"s. It provides 
out-of-the box support for connecting to JMS, and if you use the 
&lt;b&gt;excellent&lt;/b&gt; &lt;a 
href="http://www.springsource.org/spring-flex"&gt;Spring/BlazeDS&lt;/a&gt; 
solution, then you can do all of this with  aplomb, and you can  hook 
up any flex client to any channel on your Spring Integration bus with 
a minimum of fuss. 
  &lt;/p&gt; &lt;p&gt;Naturally, all of that will all be covered in &lt;a 
href="http://www.apress.com/book/view/1430224991"&gt;Spring Web 
Recipes&lt;/a&gt;, so stay tuned! &lt;/p&gt;&lt;p&gt; 
So: how are &lt;b&gt;you&lt;/b&gt; talking to your messaging middleware?  Remember 
- messaging is even MORE important in the wild Web 2.0 / cloud world 
than the client-server applications of yesteryear. Temporal decoupling 
brings scalability. 
&lt;/p&gt;</summary>
    <dc:date>2010-01-06T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>PostgreSQL 8.4 and Bitronix XA</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/postgresql_84_and_bitronix_xa.html" />
    <author>
      <name />
    </author>
    <modified>2009-12-31T00:00:00Z</modified>
    <issued>2009-12-31T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;I use &lt;a href="http://www.postgresql.org/"&gt;PostgreSQL&lt;/a&gt; 8.3 - 
highly recommended by the way - 
and I just updated an application to 8.4. 
The application is built principally using Spring, Hibernate, and JMS. 
Naturally, some level of 
cooperation among transactions is required, so I use an XA provider - 
&lt;a href="http://docs.codehaus.org/display/BTM/Home"&gt;Bitronix.&lt;/a&gt; 
Everything was working swimmingly 
with PostgreSQL 8.3, but the application buckled on startup with 
errors when I upgrade PostgreSQL to 8.4: 
&lt;/p&gt;&lt;PRE&gt;&lt;CODE&gt;Dec 30, 2009 11:25:50 PM 
bitronix.tm.twopc.AbstractPhaseEngine logFailedResources 
&lt;b&gt;SEVERE: resource xasql failed on a Bitronix XID [737072696E672D62746D2D- 
73656E64657200000125E3A04B9900000038 : 737072696E672D62746D2D73656E6465720- 
0000125E3A04BA40000003A] 
org.postgresql.xa.PGXAException: Error preparing transaction&lt;/b&gt; 
at org.postgresql.xa.PGXAConnection.prepare(PGXAConnection.java:254) 
at bitronix.tm.twopc.Preparer$PrepareJob.run(Preparer.java:134) 
at bitronix.tm.twopc.executor.SyncExecutor.submit(SyncExecutor.java:12) 
at bitronix.tm.twopc.AbstractPhaseEngine.runJobsForPosition(AbstractPhaseEngine.java:109) 
at bitronix.tm.twopc.AbstractPhaseEngine.executePhase(AbstractPhaseEngine.java:71) 
at bitronix.tm.twopc.Preparer.prepare(Preparer.java:68) 
at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:176) 
at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:95) 
at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1009) 
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754) 
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723) 
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:394) 
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:117) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) 
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) 
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) 
... 
&lt;b&gt;Caused by: org.postgresql.util.PSQLException: ERROR: prepared 
transactions are disabled&lt;/b&gt; 
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1592) 
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1327) 
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:192) 
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451 
&lt;/CODE&gt;&lt;/PRE&gt; 
&lt;P&gt; 
If you're in my situation, the immediate cure is to uncomment and set 
the &lt;code&gt;max_prepared_transactions&lt;/code&gt; 
attribute in &lt;code&gt;data/postgresql.conf&lt;/code&gt;. A safe value seems to 
be 10, though your mileage may vary. 
There must be a reason they've disabled this in 8.4, so further 
investigation is required. In the meantime, though, everything seems 
performant and works as it did before. 
&lt;/P&gt;</summary>
    <dc:date>2009-12-31T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>So Much to Do, So Little Time!</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/so_much_to_do_so_little_time.html" />
    <author>
      <name />
    </author>
    <modified>2009-12-28T00:00:00Z</modified>
    <issued>2009-12-28T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;&lt;a href="http://www.springsource.org/about"&gt;Spring 3.0's out (you 
didn't get the memo?),&lt;/a&gt; and there's a &lt;i&gt;lot&lt;/i&gt; of interesting 
stuff. 
This release has been long in coming due in no small part to the 
specifications it tracks and to the intense furvor and emphasis placed 
on quality assurance and testing. One target platform - JEE6 (and with 
it the final versions of JSR330) - also just recently went final, and 
you'll find support for these technologies, as well, where 
appropriate. 
Now that it's out, you can start certifying applications in production 
on it. I've found that - aside from dealing with the new Maven 
imports - the upgrade process has been flawless. I've taken complex 
applications and merely fixed the jars and they continue to work. You 
will find, however, that there are a lot of reasons to go through and 
start selectively enabling new features, and namespaces. 
&lt;/p&gt;&lt;p&gt; In our book &lt;a href= 
"http://www.apress.com/book/view/1430224975"&gt;Spring Enterprise 
Recipes&lt;/a&gt;, my co-author Gary Mak and I discuss a lot of the new, 
exciting Spring 3.0 features. Spring 3.0 debuts slightly more 
streamlined scheduling / TaskExecutor / thread pool support. The idea 
is that you can more readily model asynchronous, repeating (at a 
scheduled time, rate, or both), and concurrent programming problems 
using these facilities and - in some cases - do so while leveraging 
more advanced facilities underlying a given target platform, like the 
WorkerJ implementations, the Java5 task executors, and thread pools 
and more. &lt;/p&gt; 
&lt;p&gt; I won't go into much of that here as the book ablely covers most 
of it, but one thing I did want to cover (which we couldn't cover in 
time in the book as the feature was not ready as the book went to 
press) was the very elegant &lt;code&gt;task&lt;/code&gt; namespace. 
&lt;h2&gt;Background &lt;/h2&gt;&lt;p&gt; It should be noted that these features are 
not, exactly, novel. Spring has shipped with a Quartz scheduling 
framework integration for years. Among many other niceties included 
therein was (and still is, for what it's worth) a &lt;a 
href="http://static.springsource.org/spring/docs/1.2.x/reference/scheduling.html"&gt;MethodInvokingJobDetailFactoryBean&lt;/a&gt; 
that allowed you to schedule future executions of a method on a Java 
bean using Quartz. &lt;/P&gt;&lt;P&gt; A few years later, EJB 3 debuted support 
for a limited form of scheduling using the &lt;code&gt;Timer&lt;/code&gt; 
mechanism. One major limitation was the lack of support for CRON-like 
expressions and for asynchronous methods. Naturally, you could use JMS 
to acheive the same effect, in a way...&lt;/P&gt;&lt;P&gt;The JBoss gang debuted 
JBoss Seam support for &lt;a 
href="http://docs.jboss.org/seam/2.2.0.GA/reference/en-US/html_single/#d0e21502"&gt;scheduled 
and asynchronous method execution on a Seam component&lt;/a&gt; as well as a 
proprietary mechanism to &lt;a 
href="http://www.jboss.org/file-access/default/members/jbossejb3/freezone/docs/tutorial/1.0.7/html/Asynchronous_Invocations.html"&gt;do 
the same with EJB 3.&lt;/a&gt; In Seam, using these features was simply a 
matter of adding the appropriate configuration (as we do in Spring) to 
enable the executor (they have a few, including one based on the EJB3 
Timer and one based Quartz.) The usage here is familiar to what has 
recently been debuted in Spring 3.0. &lt;/p&gt;&lt;p&gt; Clearly, the need for 
such features is common enough that they've both been fully 
incorporated &lt;a 
href="http://docs.sun.com/app/docs/doc/820-7627/bnbpe?a=view"&gt;into 
JEE6 and EJB3.1.&lt;/a&gt; There, you can specify CRON expressions as well 
as defer the invocation of a method using the 
&lt;code&gt;@Asynchronous&lt;/code&gt; or &lt;code&gt;@Schedule&lt;/code&gt; annotations. A 
simple example looks like: 
&lt;/p&gt;&lt;P&gt;&lt;PRE&gt;&lt;CODE&gt;package com.joshlong.ejb.timer ; 
import java.util.Date; 
import java.util.logging.Logger; 
import javax.annotation.Resource; 
import javax.ejb.Schedule; 
import javax.ejb.Asynchronous; 
import javax.ejb.Stateless; 
import javax.ejb.Timeout; 
import javax.ejb.Timer; 
import javax.ejb.TimerService; 
@Singleton 
public class PeriodicGreeter { 
 // you could use this to schedule things manually 
 @Resource TimerService timerService; 
 // or use the annotations to do so automatically 
 @Schedule(minute="*/3", hour="*") 
 public void sayHelloPeriodically() { 
   System.out.println( String.format( "Hello, world, at %s" , new 
Date()) ) ; 
 } 
 @Asynchronous 
 public Future&amp;lt;String&amp;gt; sayHelloAsynchronously() { 
   System.out.println( String.format( "Hello, world, at %s" , new 
Date()) ) ; 
   // ... 
 } 
}&lt;/CODE&gt;&lt;/PRE&gt; 
&lt;/p&gt; 
&lt;h2&gt; Spring 3.0 Implementation &lt;/h2&gt; 
&lt;p&gt; 
The &lt;code&gt;task&lt;/code&gt; namespace let's you declaratively configure a 
&lt;code&gt;TaskScheduler&lt;/code&gt; and a &lt;code&gt;TaskExecutor&lt;/code&gt; instance 
using XML. From here, you can configure beans that have scheduled, or 
asynchronous, executions using the XML or - my personal favorite if 
you can get access to the code - via Java annotations. &lt;/p&gt; &lt;p&gt;Here's 
an example Spring application context featuring this namespace and 
configuring a scheduler and executor with default-ish settings:&lt;/p&gt; 
&lt;P&gt;&lt;PRE&gt;&lt;CODE&gt; 
&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt; 
&amp;lt;beans xmlns="http://www.springframework.org/schema/beans" 
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
   xmlns:task="http://www.springframework.org/schema/task" 
   xmlns:context="http://www.springframework.org/schema/context" 
   xsi:schemaLocation=" 
       http://www.springframework.org/schema/beans 
       http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
       http://www.springframework.org/schema/lang 
       http://www.springframework.org/schema/lang/spring-lang-3.0.xsd 
       http://www.springframework.org/schema/context 
       http://www.springframework.org/schema/context/spring-context-3.0.xsd 
       &lt;b&gt;http://www.springframework.org/schema/task 
       http://www.springframework.org/schema/task/spring-task-3.0.xsd&lt;/b&gt;"&amp;gt; 
 &amp;lt;context:annotation-config/&amp;gt; 
 &amp;lt;context:component-scan annotation-config="true" 
       base-package="com.yourbasepackage.scheduling" /&amp;gt; 
&lt;B&gt; 
 &amp;lt;task:scheduler id="scheduler" pool-size="10"/&amp;gt; 
 &amp;lt;task:executor id="executor" pool-size="10"/&amp;gt; 
 &amp;lt;task:annotation-driven scheduler="scheduler" executor = "executor" /&amp;gt; 
&lt;/B&gt; 
&amp;lt;/beans&amp;gt; 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt; 
&lt;P&gt; What you do from here is up to you. You could simply start 
defining tasks inline with your XML. 
That approach certainly has its redeeming qualities, not the least of 
which is that your code is more readily "documented" and 
&lt;i&gt;conceivably&lt;/i&gt; 
adjustable at runtime with some refresh trickery... sure.. you 
&lt;i&gt;could.&lt;/i&gt;&lt;/p&gt; 
&lt;CODE&gt;&lt;PRE&gt; 
&amp;lt;task:scheduled-tasks scheduler="myScheduler"&amp;gt; 
 &amp;lt;task:scheduled ref="greeter" method="sayHello" fixed-delay="5000"/&amp;gt; 
 &amp;lt;task:scheduled ref="greeter" method="sayHello" fixed-rate="5000"/&amp;gt; 
 &amp;lt;task:scheduled ref="greeter" method="sayHello" cron="*/5 * * * 
* MON-FRI"/&amp;gt; 
&amp;lt;task:scheduled-tasks/&amp;gt; 
&lt;/PRE&gt;&lt;/CODE&gt; 
&lt;p&gt;...In practice, however, the annotation approach just &lt;i&gt;FEELS&lt;/i&gt; 
soo much better! So, here is how you might write a scheduled or 
asynchronous bean in Spring. 
&lt;/p&gt; 
&lt;PRE&gt;&lt;CODE&gt;package com.joshlong.spring.timer ; 
import org.springframework.beans.factory.annotation.Autowired; 
import org.springframework.scheduling.annotation.Scheduled; 
import org.springframework.stereotype.Component; 
import javax.annotation.PostConstruct; 
import javax.annotation.Resource; 
import java.util.Date; 
@Component 
public class SpringPeriodicGreeter { 
 // you can do everything you normally would using Spring, obviously 
 @Autowired CustomerService customerService ; 
 // this runs once every 5 minutes 
 @Scheduled(fixedRate = 1000 * 60 * 5) 
 public void sayHelloEveryFiveMinutes() { 
   System.out.println( String.format( "Hello, world, at %s" , new 
Date()) ) ; 
 } 
 @Scheduled(cron="*/5 * * * * MON-FRI") 
 public void sayHelloOnlyOneWeekdays() { 
   System.out.println( String.format( "Hello, world, at %s" , 
new Date()) ) ; 
 } 
 @Async 
 public void doSomething(String s) { 
  // this will be executed asynchronously 
 } 
 @Async 
 public Future&amp;lt;String&amp;gt; returnSomething(int i) { 
   // this will be executed asynchronously, but you can get the 
   // result by blocking on &lt;code&gt;Future.get&lt;/code&gt; 
 } 
} 
&lt;/CODE&gt;&lt;/PRE&gt; 
&lt;p&gt; Thus, this is nothing too strange - very simialar in fact to 
what's in JEE6. Obviously, I've not mentioned &lt;i&gt;every&lt;/i&gt; permutation 
of the features from the various technologies, but hopefully this gets 
you past the initial cognitive "hump" of adapting a new technology. 
It helps that - at least in the Spring case - it's dead simple to 
start using it if you're already using Spring. 
I wonder if there will be support for working with 
the JEE6 annotations that describe the same things? The major 
takeaways are that you can get this simply by updating your version of 
Spring, which should be painless if you're not tied to Java 1.4. You 
can get the JEE6 functionality by updating your version of the 
platform and server, if the platform/server are ready (Glassfish is!). 
&lt;/p&gt; 
&lt;h2&gt;Use&lt;/h2&gt; 
&lt;P&gt; Now, as to &lt;i&gt;where&lt;/i&gt; this stuff might be used, well, I can only 
think of a few &lt;i&gt;thousand&lt;/i&gt; things... &lt;/p&gt; 
&lt;OL&gt;&lt;LI&gt; Quartz is probably still more powerful, but the 
implementation and usage are hackneyed - this new approach will feel 
much more elegant. You could probably get away with removing the old 
Quartz code and using this for most of your implementation needs. 
&lt;/LI&gt; 
&lt;LI&gt;Because Spring's implementations are swappable, you could back 
this functionality with varying TaskExecutors/TaskSchedulers of your 
own implementation, if you wanted.&lt;/LI&gt;&lt;LI&gt;The obvious use case is 
that you can now remove &lt;b&gt;CRON&lt;/b&gt;, &lt;b&gt;Autosys,&lt;/b&gt; &lt;b&gt;Flux&lt;/b&gt; and 
any number of other third-party, dedicated middleware schedulers from 
your architecture (if you're only using them to run Java 
services.)&lt;/LI&gt; 
&lt;LI&gt;As with Spring itself, this abstraction is useful because you can 
deploy it inside of a web applicatior or any other place you can 
imagine Spring running, so you don't need to install a scheduler if 
you just want something run periodically inside your web container 
&lt;/LI&gt; 
&lt;li&gt;If you have a Spring Batch job, this might be an ideal way to kick 
the jobs off periodically. You need to start processing the billing 
batch every night at 2am, but only on weekdays? This is a match made 
in heaven! How you get a Batch job to start running is left mainly as 
an exercise to the user. I recommend using an ESB (like Spring 
Integration) to react to events, or using a scheduler like this 
&lt;code&gt;task&lt;/code&gt; namespace (or Quartz) to kick the jobs off. &lt;/li&gt; 
&lt;li&gt;Spring Integration has a gateway mechanism that lets you front 
what is essentially a send (and/or) recieve operation on a channel 
(think: JMS queue/topic) with a method on an interface. I &lt;i&gt;love&lt;/i&gt; 
this feature and use it a lot because I don't want to surface JMS 
queues / topics to the client (that's a little &lt;i&gt;too&lt;/i&gt; loose and 
decoupled an API!). I also use it because it allows me to model 
fire-n-forget messaging using Java interfaces, which is exactly what 
the &lt;code&gt;@Async&lt;/code&gt; annotation does. The other benefit of the 
Spring Integration feature is that the processing leaves the VM and 
goes somewhere to finish (ostensibly, wherever the consumer for the 
topic/queue lives) the job and then return the result. This provides 
scalability benefits to both the client &lt;i&gt;and&lt;/i&gt; the server, whereas 
the &lt;code&gt;@Async&lt;/code&gt; annotation would only increase the thoroughput 
of the client, in this case: processing still takes place on the node 
with the &lt;code&gt;@Async&lt;/code&gt; annotation, it's simply deferred... 
Deferment &lt;i&gt;is &lt;/i&gt; a valid way to increase capacity while decreasing 
thoroughput.&lt;/li&gt; 
&lt;/ol&gt;</summary>
    <dc:date>2009-12-28T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>My Tweet Cloud</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/my_tweet_cloud.html" />
    <author>
      <name />
    </author>
    <modified>2009-11-29T00:00:00Z</modified>
    <issued>2009-11-29T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;Waiting for a long running process to finish up. Started screwing 
around on the internet and found a useful little application called &lt;a 
href="http://tweetcloud.icodeforlove.com"&gt;TweetCloud.&lt;/a&gt; It generates 
a neat looking image-based cloud of your tweets. Here's my &lt;a 
href="http://tweetcloud.icodeforlove.com/starbuxman/13025"&gt;tweet 
cloud&lt;/a&gt;. I'm &lt;a 
href="http://www.twitter.com/starbuxman"&gt;@starbuxman&lt;/a&gt;, if you're on 
that busy network and wanna chat.&lt;/p&gt; 
&lt;p&gt;&lt;img src="/jl/media/8888.png" 
width ="400" /&gt;&lt;/p&gt;</summary>
    <dc:date>2009-11-29T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Spring Batch's MultiResourceItemWriter</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/spring_batchs_multiresourceitemwriter.html" />
    <author>
      <name />
    </author>
    <modified>2009-11-28T00:00:00Z</modified>
    <issued>2009-11-28T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;If you've ever had to do batch processing, then you know how 
tedious it can be to write all the infrastructure code surrounding 
retries and error recovery and usefully handling long running 
processing and &lt;i&gt;all&lt;/i&gt; the other tedium that surrounds a typical 
batch application. For these types of applications, I use &lt;a 
href="http://static.springsource.org/spring-batch/"&gt;Spring Batch&lt;/a&gt;, 
a batch processing framework from Dave Syer and the fine people at 
SpringSource. 
 &lt;/p&gt; 
&lt;p&gt;The basic idea is that you setup &lt;code&gt;job&lt;/code&gt;s that have 
&lt;code&gt;step&lt;/code&gt;s, that have &lt;code&gt;tasklet&lt;/code&gt;s. This the normal 
use case, but by no means the only one. You use jobs and steps to 
string together  sequences of processing input and writing to output 
via a &lt;code&gt;reader&lt;/code&gt; and a &lt;code&gt;writer&lt;/code&gt;. 
Spring Batch has implementations for both reading and writing that 
will likely meet most of your needs: XML, files, streams, databases, 
etc. There's so much interesting stuff here, so of course I humbly 
recommend you take a crack at the documentation or read my book, &lt;i&gt;&lt;a 
href="http://www.apress.com/book/view/9781430224976"&gt;Spring Enterprise 
Recipes&lt;/a&gt;&lt;/i&gt;. 
&lt;/p&gt; 
&lt;p&gt; That said all said, there's no obvious way to read from an input 
source and then write to multiple files. The use case here, in my 
case, is &lt;a href="http://www.google.com/webmasters/tools/"&gt;Google's 
Sitemaps.&lt;/a&gt; These are XML files that describe the pages on your 
site. You list every URL possible. If you have more than 50,000 links, 
then you must create many files and list those files in a Sitemap 
index file. 
 So, I wanted to read from a database and derive all the URLs possible 
for content, and then write those to sitemap XML files, where each 
sitemap could not exceed 50,000 entries. Spring Batch ships with an 
adapter writer that serves exactly this purpose. It's called 
&lt;code&gt;org.springframework.batch.item.file.MultiResourceItemWriter&lt;/code&gt;. 
You define it just like you might any other writer, except that you 
wrap another writer with it. 
&lt;/p&gt; 
&lt;p&gt; Here's the salient bits from my configuration. Most of this is 
boilerplate. I don't include the configuration of the Spring Batch 
environment, or the configuration of the reader, because those are 
pretty typical. Note that here we configure the &lt;code&gt;writer&lt;/code&gt; 
for the &lt;code&gt;job&lt;/code&gt; and in turn configure its 
&lt;code&gt;delegate&lt;/code&gt; property, where we have the real writer 
implementation. In this case, there's no need to configure the 
delegate writer's &lt;code&gt;resource&lt;/code&gt; property.&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt; 
&amp;lt;beans:beans xmlns="http://www.springframework.org/schema/batch" 
             xmlns:beans="http://www.springframework.org/schema/beans" 
             xmlns:aop="http://www.springframework.org/schema/aop" 
             xmlns:tx="http://www.springframework.org/schema/tx" 
             xmlns:p="http://www.springframework.org/schema/p" 
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
             xsi:schemaLocation=" 
http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd 
http://www.springframework.org/schema/batch 
http://www.springframework.org/schema/batch/spring-batch-2.0.xsd 
http://www.springframework.org/schema/aop 
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd 
http://www.springframework.org/schema/tx 
http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"&amp;gt; 
    &amp;lt;beans:import resource="batch.xml"/&amp;gt; 
    &amp;lt;job id="batchForCreatingSitemaps"&amp;gt; 
        &amp;lt;step id="sitemap"&amp;gt; 
            &amp;lt;tasklet&amp;gt; 
                &amp;lt;chunk reader="reader" writer="writer" 
commit-interval="${job.commit.interval}"/&amp;gt; 
            &amp;lt;/tasklet&amp;gt; 
        &amp;lt;/step&amp;gt; 
    &amp;lt;/job&amp;gt; 
    &amp;lt;beans:bean id="siteMapLineAggregator" 
class="com...sitemapscreator.SiteMapLineAggregator"&amp;gt; 
        &amp;lt;beans:property name="domain" value="${sitemaps-domain}"/&amp;gt; 
    &amp;lt;/beans:bean&amp;gt; 
    &amp;lt;beans:bean 
class="com...sitemapscreator2.ResourceSuffixCreator" 
id="resourceSuffixCreator"/&amp;gt; 
    &amp;lt;beans:bean id="writer" scope="step" 
class="&lt;b&gt;org.springframework.batch.item.file.MultiResourceItemWriter&lt;/b&gt;"&amp;gt; 
        &amp;lt;beans:property name="resource" 
value="file:#{jobParameters[outputResourcePrefix]}"/&amp;gt; 
        &amp;lt;beans:property name="resourceSuffixCreator" 
ref="resourceSuffixCreator"/&amp;gt; 
        &amp;lt;beans:property name="saveState" value="true"/&amp;gt; 
        &amp;lt;beans:property name="itemCountLimitPerResource" value="50000"/&amp;gt; 
        &amp;lt;beans:property name="&lt;b&gt;delegate&lt;/b&gt;"&amp;gt; 
&lt;b&gt; 
            &amp;lt;beans:bean 
class="org.springframework.batch.item.file.FlatFileItemWriter"&amp;gt; 
                &amp;lt;beans:property name="encoding" value="UTF-8"/&amp;gt; 
                &amp;lt;beans:property name="shouldDeleteIfExists" value="true"/&amp;gt; 
                &amp;lt;beans:property name="lineAggregator" 
ref="siteMapLineAggregator"/&amp;gt; 
            &amp;lt;/beans:bean&amp;gt; 
&lt;/b&gt; 
        &amp;lt;/beans:property&amp;gt; 
    &amp;lt;/beans:bean&amp;gt; 
    &amp;lt;beans:bean id="siteMapUrlRowMapper" 
class="com...sitemapscreator.SiteMapUrlRowMapper"/&amp;gt; 
    ... 
&amp;lt;/beans:beans&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;</summary>
    <dc:date>2009-11-28T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Thanksgiving</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/thanksgiving.html" />
    <author>
      <name />
    </author>
    <modified>2009-11-26T00:00:00Z</modified>
    <issued>2009-11-26T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;I have a lot to be thankful for. This year saw my wife and I move 
to Los Angeles, where we've been well received in new jobs and by 
family. I've experienced  success speaking at various conferences, and 
this year saw the publication of my first book, Apress' "Spring 
Enterprise Recipes." Recently, I was in a pretty bad accident (a 
big-rig rear-ended me) and I emerged alive. I have a wonderful wife 
who has always supported me, and  I have made good friends. I am 
thankful for the readers of my blogs.  I am thankful for my  loving 
friends and family.&lt;/p&gt;&lt;p&gt;I hope you have a long list of things for 
which you're thankful, too. Happy Thanksgiving!&lt;/p&gt;</summary>
    <dc:date>2009-11-26T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>'Spring Enterprise Recipes,' from Apress</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/spring_enterprise_recipes_from_apress.html" />
    <author>
      <name />
    </author>
    <modified>2009-11-21T00:00:00Z</modified>
    <issued>2009-11-21T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; &lt;img style ="float:left;" 
src="/jl/media/8705.jpg" /&gt; 
&lt;span style = "font-size:larger;"&gt;Warning: Shameless Plug&lt;/span&gt; &lt;br/&gt; 
&lt;br/&gt; I am pleased to announce that, after a long time and a lot of 
work, my first book &lt;b&gt;&lt;i&gt;Spring Enterprise Recipes&lt;/i&gt;&lt;/b&gt; (which I 
co-authored with the indefatigable, epic and extraordinary Mr. Gary 
Mak, author of - among many other things, Apress' &lt;i&gt;Spring 
Recipes&lt;/i&gt;) has been released and is now purchasable.  It should be 
hitting book stores soon, but in the meantime, you can &lt;a 
href="http://www.apress.com/book/view/9781430224976"&gt;buy  the e-book 
at Apress.com&lt;/a&gt;, or you can pre-order it &lt;a 
href="http://www.amazon.com/Spring-Enterprise-Recipes-Problem-Solution-Approach/dp/1430224975"&gt;on 
Amazon.com&lt;/a&gt;. &lt;/p&gt;&lt;p&gt; The book discusses Spring 3, but also accounts 
for the many "modules" surrounding Spring with an eye towards building 
elegant, scalable systems with a minimum of fuss.  Many of these 
modules have come from SpringSource, and some are independent third 
party projects that integrate well with Spring.  &lt;i&gt;Spring Enterprise 
Recipes&lt;/i&gt; introduces concepts like business process management 
(BPM), enterprise application integration (EAI), distributed computing 
and messaging and then grounds these introductions with real-world 
examples using Spring and lead open source frameworks. 
 &lt;/p&gt; 
&lt;p&gt;This book discusses both the &lt;i&gt;why&lt;/i&gt; and the &lt;i&gt;how&lt;/i&gt;. It 
starts with  a discussion of the usual suspects, exploring the 
quintessential tools in any developer's toolbox: RPC (RMI, Hessian, 
Burlap, Web Services, HTTP/Invoker, EJB 2 and 3, and more), messaging 
(via JMS), database access (JdbcTemplate, and a few of Spring's 
numerous supported ORM abstractions), transactions (e.g., various 
transaction abstractions supported by Spring), and numerous services 
like e-mail, JMX, worker pools, and  scheduling infrastructure.&lt;/p&gt; 
&lt;p&gt;Then, we progress into more advanced solutions. This book includes 
the first-in-print or most updated coverage of a lot of technologies, 
including Spring Integration (a lightweight ESB-like integration 
framework for EAI),   Spring and jBPM 4 for business process 
management, GridGain for grid computing,  Terracotta for clustered 
state managment, Spring Batch for batch-processing solutions and OSGi 
to bring modularity to your application. 
&lt;/p&gt; 
 &lt;p&gt; In the large, this book is a gentle, but comprehensive 
introduction to the best-of-breed solutions for tomorrow's 
architecture using Spring and other lightweight, powerful tools. 
Having said all that, I hope you'll consider it for your next purchase 
and that it helps you solve some interesting problems and build even 
more interesting solutions! 
&lt;/p&gt;</summary>
    <dc:date>2009-11-21T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Understanding Go</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/understanding_go.html" />
    <author>
      <name />
    </author>
    <modified>2009-11-17T00:00:00Z</modified>
    <issued>2009-11-17T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; &lt;a href="http://www.golang.org"&gt;Go,&lt;/a&gt; a new language from 
Google, has created quite a stir. It has a great pedigree, owing to 
renowned experts like Rob Pike (a member of the Unix team, and a 
creator of the Plan 9 OS from Bell Labs.) The language is a procedural 
language (like C, or Python) which offers a strongly typed, but 
flexible type system (not centered around object-oriented facilities 
as we know them from languages like Java and Ruby). The syntax is a 
strange mix of C and Python. Honestly, it feels like C when you read 
it, but it writes more like Python - lots of features in the syntax 
that are designed to be consistent, predictable. &lt;/p&gt; &lt;p&gt; &lt;a 
href="http://www.cowlark.com/2009-11-15-go/"&gt;One blog entry&lt;/a&gt; 
prompted a very lively discussion of the language: it made the 
comparison that Go seemed awfully similar to Algol 68, a language 40 
years past irrelevance. The blog entry said that while Algol 68 was a 
nice language, Go might be considered an efficient language. It 
claimed that efficient languages are the ones that - ultimately - 
propagate. Witness COBOL, C, C++, and Java, for example. Go, thus, may 
very well be a very &lt;i&gt; efficient&lt;/i&gt; language, but it's not even 
close to a &lt;i&gt;nice&lt;/i&gt; language. It's a lost opportunity. &lt;/p&gt; &lt;p&gt; 
Programming languages tend to come and go, but they all advance basing 
their innovation in some small part on their predecessors. Programming 
languages &lt;i&gt;have&lt;/i&gt; to evolve slowly.  Languages do not exist in a 
vacuum. They must respect the work that's preceded them, while 
innovating. They must strike a careful balance, never alienating the 
existing community, the legacy base, and always advancing the state of 
the art. Doing so incorrectly can be the biggest sin a language can 
make. Kowtowing to the legacy of C crippled the evolution of C++, 
leaving it  a confusing mix of phantom requirements and artificial 
features. Conversely, Java achieved meteoric propagation because it 
looked and felt like C++ without many of the warts. This made the 
transition to Java easy. Compatibility is a double edged sword. &lt;/p&gt; 
&lt;p&gt; Most recent languages look and feel like C/C++. They've innovated 
ever so slightly, inducting into the syntax features  formerly handled 
by libraries. Or, the language is flexible enough to support 
requirement-specific DSLs. You can see this with Scala and Groovy, 
Ruby and C#. They're all fairly familiar, but offer advantages in 
their grammar over their predecessors. C#, for example, introduced 
LINQ, while Scala surfaced its concurrency facilities as an Actors 
DSL. The idea of a language syntax as a differentiators is even more 
relevant of late. The .NET runtime popularized the idea of a 
multi-language run time. It meant that choosing a language did not 
mean forsaking libraries. The JVM has matured, and there are many 
languages implemented atop it, as well. Other infrastructure VM 
projects have emerged, like the LLVM. &lt;/p&gt; &lt;p&gt; So, I don't blame Go 
for looking so much like its predecessors. That's the cost of doing 
business. It's intended to be a general purpose language, after all. 
It does have a few unique features surfaced as language constructs, 
like intrinsic concurrency facilities, which it calls 
&lt;i&gt;gorountines&lt;/i&gt;. &lt;/p&gt; &lt;p&gt; I don't understand why they have built 
another virtual machine. If Go is going to innovate, it will be in its 
Virtual Machine. Why not the CLI, JVM, or LLVM? The language has 
strong support for interop - easily wrapping native code much like you 
might using C++. The .NET CLI supports this sort of thing, though. I 
understand the language needed to run on Unix (at the moment, you 
&lt;i&gt;can't&lt;/i&gt; run it on Windows!), and perhaps Mono wasn't sufficiently 
advanced. Why not the JVM? Would building that kind of infrastructure 
be that hard? What about the LLVM? It seems well suited to working on 
Unix and to handling interop. Perhaps interop is not the only concern. 
The implementation of the &lt;i&gt;goroutines&lt;/i&gt; seems to have been a 
priority. The language does not yet have assertions or exceptions 
specifically because doing so would be awkward with goroutines. This 
language, as Mr. Pike explained it, was created for Google to build 
servers. Cheap, and efficient threading was priority #1. This piques 
my curiosity. Why could the JVM - which hosts Scala and Clojure - not 
be used to build goroutines. Is there some fundamental flaw that makes 
 concurrency on the JVM a non starter? I don't understand. &lt;/p&gt; &lt;p&gt; I 
would agree that the language is not particularly novel. What I don't 
understand is why the VM is novel. Clearly there are requirements I 
don't understand, and this is why I think Go will be worth paying 
attention to, in much the same way Erlang is. &lt;/P&gt; &lt;p&gt; There is also 
something refreshing about a genuinely new language. New platform, new 
libraries, new syntax. Programs written in a language like that 
represent advances. Shortly after the debut of the language, a &lt;a 
href="http://codingrobots.org/p/gotweet/doc/tip/www/index.wiki"&gt;command 
line Twitter client emerged&lt;/a&gt;. The example is promising - by 
definition the implementation was from-scratch. It was quick, and the 
result is imminently readable. &lt;/p&gt; &lt;p&gt; Perhaps I'm over thinking 
this. Perhaps the language will be successful &lt;i&gt;because&lt;/i&gt; it's 
simple, and efficient. Perhaps the VM is some how unique and better 
served by a custom implementation. Only time will tell. &lt;/p&gt;</summary>
    <dc:date>2009-11-17T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>The Last 2 Crazy Months</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/the_last_2_crazy_months.html" />
    <author>
      <name />
    </author>
    <modified>2009-11-12T00:00:00Z</modified>
    <issued>2009-11-12T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;What a busy couple of months!   &lt;/p&gt;&lt;p&gt;I started last month (from 
October 2nd to the 11th) at the &lt;a 
href="http://www.java2days.com"&gt;Java2Days&lt;/a&gt; conference in Sofia, 
Bulgaria. I gave three talks on Spring and JSF, Spring and jBPM, and 
Spring Integration (the Spring ESB-like framework). I think the slides 
will be available there in shortly. Meanwhile, here are some photos of 
the event below, though you're encouraged to log in to Facebook and 
check out the full galeries &lt;a 
href="http://www.facebook.com/pages/Sofia-Bulgaria/Java2Days/169979265960"&gt;there.&lt;/a&gt;&lt;/p&gt; 
&lt;table border="0" cellpadding="0" width="400"&gt;&lt;tr&gt;&lt;td&gt;&lt;img width = 
"400"  src="/jl/media/8436.jpg" 
/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;i style = "caption"&gt;The name of the gentleman 
on the far left escapes me, but that's John Lewis, Emo, and yours 
truly on the right &lt;/i&gt;&lt;/p&gt; 
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;img width ="400"  src 
="/jl/media/8435.jpg" 
/&gt; 
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;i style = "caption"&gt;From left to right: Ivo 
Penev, Gisele Consoline, Rob Harrop, yours truly, John Willis, and 
Heath Kesler &lt;/i&gt;&lt;/p&gt; 
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt; I had a great time at the conference.  The 
audience was great the discussions great, too. The drinking was good, 
too! :-) 
 &lt;/p&gt;&lt;p&gt; At some point, I got some sort of stomach bug (perhaps in 
Greece?) and when I returned home, I was severely dehyrdated. I spent 
a little time hooked up to an IV and then spent the subsequent week 
pounding antibiotics, gatorade, and soup. There's a   thousand ways to 
get sick, only one way to get better!  &lt;/p&gt;&lt;p&gt;After that, I got deep 
into the final edits for my book  "&lt;a 
href="http://www.amazon.com/Spring-Enterprise-Recipes-Problem-Solution-Approach/dp/1430224975"&gt;Spring&lt;/a&gt; 
&lt;a href="http://www.apress.com/book/view/9781430224976"&gt;Enterprise&lt;/a&gt; 
&lt;a href="http://search.barnesandnoble.com/Spring-Enterprise-Recipes/Gary-Mak/e/9781430224976"&gt;Recipes&lt;/a&gt;." 
Really enjoyed that process - it's fascinating to see what goes into 
writing a book. Trust me, the book is far better for the effort of the 
amazing editors at Apress! :-)  &lt;/p&gt; &lt;p&gt; I spoke at the &lt;a 
href="http://www.pasadenajug.org/2009/10/spring-in-fall.html"&gt;Pasadena 
Java User Group&lt;/a&gt; on using Spring Integration - that crowd was very 
cool and the discussion that ensued was also good. &lt;/p&gt;&lt;p&gt;  Recently, 
my sister got married. I wish her, and her husband, many happy days 
together. &lt;/p&gt;&lt;p&gt; I think that wraps up the highlights. I'll start 
chiming in more frequently. A lot has happened of late, including the 
debut of Google's &lt;a href="http://www.golang.org"&gt;Go programming 
language&lt;/a&gt;, The &lt;a 
href="http://www.motorola.com/Consumers/US-EN/Consumer-Product-and-Services/Mobile-Phones/Motorola-DROID-US-EN"&gt;Motorola 
Droid&lt;/a&gt;, the continued standoff between Sun/Oracle and the European 
Union over objections to Oracle's accquisition of MySQL, and more. 
Exciting times... 
&lt;/p&gt;</summary>
    <dc:date>2009-11-12T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>CRUD's Not The Answer</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/cruds_not_the_answer.html" />
    <author>
      <name />
    </author>
    <modified>2009-09-10T00:00:00Z</modified>
    <issued>2009-09-10T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; I was really glad to see  &lt;a 
href="http://www.udidahan.com/2009/09/01/dont-delete-just-dont/"&gt;Udi 
Dahan's, "Don't Delete. Just Don't."&lt;/a&gt; I wholely agree with the main 
premise - that deletion is rarely, if ever, a valid business state and 
that care should be taken in dealing with it. He cites various 
examples, saying, "The real world doesn't cascade." His example is of 
a marketing department that deletes an item from the catalog. Should 
all orders containing that item then be unlinked? Should they redo the 
company's profit and loss statments? &lt;/p&gt; &lt;p&gt; His example's a  perfect 
illustration of a valid case where care needs to be taken both in 
modeling the case and dealing with it in code. I fear a lot of people 
have gotten hooked on instant-models or CRUD "frameworks." The idea 
that you can annotate a few entity classes and suddenly you have a 
model and business logic all taken care. A lot of this became popular 
with Ruby on Rails and has only gotten worse in the JEE world. It's 
now common to expose &lt;code&gt;EntityManager&lt;/code&gt;s to the web tier (both 
the Seam and Spring Web Flow examples, not to mentino the Open Session 
in View pattern itself, speak to this) and to let web frameworks 
handle the lifecycle of entities and  committing transactions on that 
EntityManager to persist those entities. We now think of record 
creation and managment as so mundane that we've automated it and 
surrounded it in scaffolding. &lt;/p&gt; &lt;p&gt; Unfortuntately, this misses the 
true value. Objects in a system have state that has dependencies. Just 
because an entity has a (required) no-args constructor, it doesn't 
mean that you should not write a constructor with dependencies. A lot 
of this stems from the "active objects" or "naked objects" pattern, 
where objects are open books whose state can be mutated on the UI tier 
directly and those changes propagated directly. We tell ourselves that 
we can apply Hibernate validations (or validations in any other ORM 
framework) and that we'll guarantee valid business constraints thus, 
but it rarely works out that way. Prescribing the valid creation and 
destruction of an object is critical. &lt;/p&gt; &lt;p&gt; The most insidious part 
of this abuse is that it  rarely ever occurs in the first iterations 
of a project, only in maintenance.  People "forget" how an object is 
created, or destroyed. They forget details. Consistancy with other 
parts of the system is forsaken because, after all, how much could 
there be to it? This happens more often than you'd expect: new people 
come on to the team and are assigned to rework an existing feature and 
screen in a system. Institutional knowledge is important but it's not 
always easily transferred, so safe-guards need to be taken. &lt;/p&gt; &lt;p&gt; 
Plus, as business evolves, object creation is often only part and 
parcel with a larger process. If a new customer is added to a 
database, and nobody does anything with it, did it really get added? 
Put another way: if a new customer gets added to a database, there's 
an implied lifecycle that customer must follow. Perhaps a trial period 
window and then a follow up email? Perhaps a monthly subscriptio fee? 
Who knows, but the act of instantiating a &lt;code&gt;Customer&lt;/code&gt; object 
and then issuing &lt;code&gt;entityManager.persist( customer ) &lt;/code&gt; will 
rarely, if ever, be enough. &lt;/p&gt; &lt;p&gt; Indeed, I've seen  many projects 
build their models using only a &lt;code&gt;GenericDao&amp;lt;T&amp;gt;&lt;/code&gt; 
variant.  This is dangerous.  Transitions from one state to another 
for an entity can often cost money.  &lt;/p&gt; &lt;p&gt;Do things the old 
fashioned way, building services that handle the business operations, 
not merely &lt;b&gt;C&lt;/b&gt;reate, &lt;b&gt;R&lt;/b&gt;ead,&lt;b&gt;U&lt;/b&gt;pdate and &lt;b&gt;D&lt;/b&gt;elete 
objects.  Using Dao's in a view tier is almost as ghastly a sin as 
making JDBC calls from the view, and encourages the same kind of 
copy-n-paste code reuse we prided ourselves on having moved away from. 
&lt;/p&gt; &lt;p&gt; While the services approach isn't exactly code-generation 
friendly, it can pay off in the long run. As soon as you decide to use 
your services in a phsically separated tier, you'll be glad.  It's 
easier to build services that express every dependency as a method 
parameter. There are several reasons why this works out. While web 
service support is getting better, object marshalling is still the 
number one headache. Most toolkits make interoping with primitives a 
brease, though. It may seem like your losing ground by not taking 
advantage of the POJO you have floating around in the view tier, but 
in point of fact it's rarely that big a burden to unmarshal the 
relevant fields and use those instead. On the services side, reloading 
the relevant record is painless because the entity's usually cached 
and thus refetching it is cheap. &lt;/p&gt; &lt;p&gt; Take for example the idea of 
a shopping cart which surfaces methods for adding line items to 
orders, orders to shopping carts and shopping carts to customers.  A 
clean version of this might look like: &lt;pre&gt;&lt;code&gt; 
 public interface ShoppingCartService { 
     ShoppingCart createShoppingCartForCustomer( long customerId, 
                                                 Date 
whenShoppingSessionStarted ) ; 
     Order createOrderForShoppingCart( long shoppingCart ) ; 
     LineItem createLineItemForOrder( long orderId, long productId, 
int quantity) ; 
     void removeLineItemFromOrder( long orderId, long lineItem ) ; 
     void startOrderFulfillment( long orderId ) ; 
     /*  other methods for loading and removing the various 
         objects, as appropriate 
     */ 
  } 
&lt;/code&gt;&lt;/pre&gt; &lt;/p&gt; &lt;p&gt; In these methods, you can do sanity checks, 
care for business cases, handle the state of the various objects and 
not worry about having a transactional resource like an &lt;code&gt; 
EntityManager&lt;/code&gt; or Hibernate Session open in the client thread. 
In this example, you might imagine the &lt;code&gt; Order&lt;/code&gt; won't 
officially be fulfilled until it's paid for, at which point it'll move 
to the &lt;code&gt;PAID&lt;/code&gt; state.  Simialarly, adding a 
&lt;code&gt;LineItem&lt;/code&gt; might require a check to an inventory, 
decrementing how many of those &lt;code&gt;Product&lt;/code&gt;s are in stock. The 
same is true of the inverse operation: 
&lt;code&gt;removeLineItemFromOrder&lt;/code&gt; should appropriately restore the 
inventory count and update the &lt;code&gt;totalPrice&lt;/code&gt; field on the 
&lt;code&gt;Order&lt;/code&gt;.&lt;/p&gt; This requires one interface method 
declaration's work more than if you had simply obtained the 
&lt;code&gt;EntityManager&lt;/code&gt; from your Seam backing bean and executed 
the logic there, &lt;i&gt;except&lt;/i&gt; now the logic's codified and reusable. 
&lt;/p&gt;</summary>
    <dc:date>2009-09-10T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Setting Up jBPM 4's XSD File In Eclipse</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/setting_up_jbpm_4s_xsd_file_in_eclipse.html" />
    <author>
      <name />
    </author>
    <modified>2009-09-03T00:00:00Z</modified>
    <issued>2009-09-03T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt; I've recently been playing with jBPM 4.1 and, while I haven't 
quite gotten into it, I did manage to break an Eclipse setup of my 
"old" jBPM 4.0 code. This is definitely a user error. So, trying to 
ensure I have a reproduciable baseline,  I start setting everything up 
again (I don't have the jBPM plugins or anything installed -- I keep 
it mean and lean, if possible. ) &lt;/p&gt; &lt;p&gt; I got  to the point where 
everything was running fine again from the IDE, but I noticed I no 
longer had code   completion for my jBPM &lt;code&gt;.XSD&lt;/code&gt; file. I'm 
not sure if I ever did, or if I did, then I've forgotten how. So, I 
stumbled through getting it working with the Eclipse Resource Catalog. 
Here are the steps to reproducing it if you have the same issue. &lt;/p&gt; 
 &lt;ol&gt; &lt;lI&gt;  You'll need a copy of the &lt;code&gt;.XSD&lt;/code&gt; itself. For 
me, the simplest option was to just download the source 
&lt;code&gt;jar&lt;/code&gt; and use the &lt;code&gt;XSD&lt;/code&gt; file therein. 
&lt;code&gt;&lt;pre&gt;mkdir ~/xsds; cd ~/xsds ; 
wget http://repository.jboss.com/maven2/org/jbpm/jbpm4/jbpm-api/4.0/jbpm-api-4.0-sources.jar 
; 
jar xvf jbpm-api-4.0-sources.jar ; 
&lt;/pre&gt;&lt;/code&gt; &lt;/li&gt; &lt;li&gt; In Eclipse, go to Window &gt; Preferences 
&lt;/li&gt;&lt;li&gt;Search for "XML Catalog," under the "XML" node.    &lt;/li&gt; &lt;li&gt; 
Click "Add..." &lt;/li&gt; &lt;li&gt; &lt;li&gt; Fill out the dialog, using the values 
below. &lt;br/&gt; &lt;img src = 
"/jl/media/7965.png" 
/&gt; &lt;/li&gt; &lt;/ol&gt; &lt;p&gt; I hope this spares somebody some pain. Once you've 
got it working, go check out the awesome &lt;a 
href="http://jboss.org/jbossjbpm/"&gt;new jBPM 4.1&lt;/a&gt;! &lt;/p&gt;</summary>
    <dc:date>2009-09-03T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>My Christmas Wish, OR How the JVM Will Outlive the  Cockroach, and .NET</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/my_christmas_wish_or_how_the_jvm_will_outlive_the_cockroach_and_net.html" />
    <author>
      <name />
    </author>
    <modified>2009-08-29T00:00:00Z</modified>
    <issued>2009-08-29T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; It started with a Tweet from &lt;a 
href="http://twitter.com/migueldeicaza/status/3627322220"&gt;Miguel De 
Icaza&lt;/a&gt;. Miguel's the leader of the Mono project, whose goal's to 
bring .NET to Linux. He's also the former leader of the Gnome project. 
Generally, he's whip smart and not usually prone to flame baits. So, I 
tend to read his words carefully, as it usually pays off. He said: 
&lt;cite&gt;"I wish Java tried to compete with .NET, but they seemed to have 
given up a long time ago: &lt;a 
href="http://tinyurl.com/mfxmqm"&gt;http://tinyurl.com/mfxmqm&lt;/a&gt;"&lt;/cite&gt; 
&lt;/p&gt; &lt;p&gt;At this point I wanted to write him a terse letter stating 
my point of view, stating how he had clearly missed the obvious. I 
resisted, hugged the wife, cried a little, sat on the beach with 
candles, attended a book club meeting, found Jesus, and then came back 
and reconciled that I was just sad because he was right. He was also 
pointing out the obvious. (There, at least I can say that! &lt;span style 
= "font-size:smaller"&gt;in the anonymity of my blog, &lt;span style = 
"font-size:smaller;"&gt;far, far away from where he might see 
it...&lt;/span&gt;&lt;/span&gt;) &lt;/p&gt;&lt;p&gt; The link points to integrations in &lt;a 
href="http://openjdk.java.net/projects/coin/"&gt;Project Coin,&lt;/a&gt; a 
project that's taken the JDK and aggressivey evolved the language 
to try certain features out in an isolated fork. In general, I'm 
supportive of the movement, but it's a sad truth that any final 
edition of JDK 7 is already late, and will likely not incorporate many 
of those integrations in Project Coin, or even many of the originally 
announced - big ticket changes coming straight from Sun. JDK7 is the 
Windows Vista/&lt;i&gt;Longhorn&lt;/i&gt; of the JDKs.&lt;/p&gt;&lt;p&gt; You remember 
Longhorn, right? It was the code name for Windows Vista for a few 
years. If I recall, there was talk of integrating 4 pillars or waves 
of technology into the then-hyped next generation of Windows, 
including &lt;i&gt;WinFS&lt;/i&gt; (Am I wrong in thinking that it was called 
something else, then? Avalon? Or am I thinking of the now-defunct Java 
DI container?) &lt;i&gt;Indigo&lt;/i&gt;, and a slew of others. As the roadmap 
slipped further and further, more things were dropped. In fairness, in 
2009, some of those pillars have subsequently shipped, sort of, as 
parts of .NET 3.0-3.5x. Some are lost to the annals of history. &lt;/p&gt; 
&lt;p&gt;With a heavy heart I proceeded to code, ignoring what he said. I'm 
tougher than that. I can handle having the rug yanked out from under 
me. "Why would he say that about my precious Java??" I thought, typing 
as I thought it. "I wish I could come up with something to refute his 
claims!", I moaned. Something elegant, quick, crazy fast, and future 
proof. Something's got the best of C#, F#, Python, JavaScript and 
more. I tend to ignore skills I've built up over years of use and 
revert to primitive, conveniently blog-friendly samples from tutorials 
when I'm stressed (don't you?). And &lt;i&gt;boy&lt;/i&gt; was I stressed! I 
looked at my screen. I was really in a tizzy at this point, 
thrashing away at the keyboard! (Like in those movies where they 
feature somebody running their hands along the home row and suddenly 
they've infiltrated the FBI's secret-most files.) &lt;/p&gt;&lt;p&gt;Here's what I 
had typed: &lt;/p&gt;&lt;pre&gt;&lt;code&gt;object Maps { 
 val colors = Map("red" -&gt; 0xFF0000, 
 "turquoise" -&gt; 0x00FFFF, 
 "black" -&gt; 0x000000, 
 "orange" -&gt; 0xFF8040, 
 "brown" -&gt; 0x804000) 
 def main(args: Array[String]) { 
 for (name &lt;- args) println( 
 colors.get(name) match { 
 case Some(code) =&gt; 
 name + " has code: " + code 
 case None =&gt; 
 "Unknown color: " + name 
 } 
 ) 
 } 
} 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt; It was a Christmas miracle! A language on the JVM 
that already had most of the proposed changes in Project Coin and 
great deal otherwise &lt;i&gt;and&lt;/i&gt; was very fast &lt;i&gt;and&lt;/i&gt; that worked 
on all platforms, &lt;strike&gt;just like Mono!&lt;/strike&gt; Errr... that is, 
just like Java! &lt;/p&gt; &lt;p&gt;This language, &lt;a 
href="http://www.scala-lang.org/"&gt;Scala,&lt;/a&gt; has gained a great deal 
of traction in the Java community and even people you'd expect to 
offer otherwise have endorsed it. People like James Strachan, creator 
of Groovy, and James Gosling, creator of Java. &lt;/p&gt; &lt;p&gt;I just hope 
that other people can find out about this wonderful language. Why, 
wouldn't it be nice if -for Java 8 (will we ever get to have a Java X? 
How cool would that be??) - we just shipped Scala? &lt;/p&gt; 
&lt;p&gt;And that, boys and girls, is how Java outlived the cockroach, in 
our hearts.&lt;/p&gt; &lt;P&gt;&lt;i&gt;The End!&lt;/i&gt;&lt;/p&gt;</summary>
    <dc:date>2009-08-29T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>A Survival Guide to Maven, OR, Why Maven's Still Cool</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/a_survival_guide_to_maven_or_why_mavens_still_cool.html" />
    <author>
      <name />
    </author>
    <modified>2009-08-27T00:00:00Z</modified>
    <issued>2009-08-27T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;h2&gt;The Problem: Confusion&lt;/h2&gt; &lt;P&gt; I've had a lot of small 
discussions recently with people where they were just absolutely not 
interested in using Maven. Has it somehow gotten a bad reputation when 
I wasn't looking? Am I missing something? When did I suddenly become 
the guy using a tool that was too slow, or not agile enough for 
everybody? I can still sing and dance and jump like you guys, too! 
Even if I do use Maven... &lt;/P&gt;&lt;P&gt;So, let old Josh tell you a little 
bit about Maven. Maybe we're not all talking about the same thing. 
Consider this a survival guide to Maven. &lt;/P&gt;&lt;P&gt; Maven, like this 
guide, assumes you're trying to solve the 80% cases effectively. 
Already, we have a point of confusion! &lt;/P&gt;&lt;P&gt; I'm pretty confident 
that your first thoughts on that last sentence were to what Maven 
considers "80%," and you're probably wondering what you might 
reasonably call Ant's "80%" cases. I would argue that Maven's "80%" 
is 80% of a much, much bigger pie. &lt;/P&gt;&lt;P&gt; I haven't met an Ant build 
yet that couldn't be cut down in complexity by using Maven. Sure, 
sometimes the resulting Maven &lt;code&gt;pom.xml&lt;/code&gt; was more verbose 
(though, that doesn't happen all that often in practice, either), but 
that's not the same as complexity. Intrinsic complexity is one thing. 
Surface complexity is another. I define intrinsic complexity as the 
concepts required to effectively deal with a problem in a problem 
space. I define apparent complexity as the busy work a process 
presents you with to obtain a goal. &lt;/P&gt;&lt;P&gt; I'm pretty convinced Ant 
suffers from both of those kinds of complexities. I wasn't going to 
start any bar fights about it, but I was pretty sure. Then, Ruby On 
Rails debuted and made code generation popular again. It brought 
"convention over configuration" to the mainstream. Then, I knew I was 
on to something with Maven. &lt;/P&gt;&lt;P&gt; I might argue that when you 
download Ant and decide to keep it in your tool chain, you think of it 
as providing a solution, assuming you've configured it, to: 
&lt;/P&gt;&lt;OL&gt;&lt;LI&gt; compiling Java source files into classes &lt;/LI&gt;&lt;LI&gt; 
copying resources to the right place, such as .XML files, .properties 
files, etc. &lt;/LI&gt;&lt;LI&gt; generating .jar or .war artifacts from the 
aforementioned classes. &lt;/LI&gt;&lt;LI&gt; generating JavaDocs. I'm adding this 
one as a "maybe." Does anybody still do this and actually keep 
JavaDocs floating around? Is the Eclipse or IntelliJ support for 
rendering in-popup the contents of the JavaDoc not enough? &lt;/LI&gt;&lt;/OL&gt; 
&lt;P&gt;The enlightened Ant user will also, maybe, add dependency 
management with Ivy to Ant's 80% cases. I mention this to be fair, 
though I highly doubt it's that common. I suspect that a lot of Ant 
users  would still relegate that to the fringe 20% cases. &lt;/P&gt; &lt;p&gt; 
Alright, so we have our 80%. Most people have a sample ant build.xml 
that they've lugged around and, when it's time to seed a new project, 
they plop it into place and it's got some variables that need to be 
replaced and then it does most of the things above. Except JavaDocs 
and Ivy. I'd be surprised, anyway. &lt;/p&gt;&lt;p&gt; Maven's got all of those 
features - right out of the box - in 5 lines of XML and a standard 
directory structure. This is where it stops being a fair fight. 
   No matter how much you tug or pull against that list above, chances 
are you're &lt;i&gt;at least&lt;/i&gt; going to use Ant to compile. No way around 
it. Even the simplest Ant configuration requires more exertion to 
acheive that than Maven does. This point, and this point alone, is why 
I'm just not convinced people are taking a look at this and 
understanding it. If the goal is simplicity, then there's nothing 
simpler than &lt;i&gt;nothing&lt;/i&gt;.  If you've had to put even a moment's 
care into that list above, than you've already wasted time and could 
have been using Maven. 
&lt;/p&gt; &lt;p&gt; Now that I've gotten the soap-box speech out of the way, 
read on to understand a little bit about it, including how to set it 
up to do all the things in that list (and hundreds of other things) 
with a few directories and a 5-6 line XML file (the 5-6 lines comes 
from my formatting. It could easily be 3 lines of XML, if we're 
honest. &lt;/p&gt;&lt;h2&gt;Things To Know&lt;/h2&gt; &lt;p&gt; &lt;b&gt; Where Can I get Maven? 
&lt;/b&gt; Maven is freely available, just like Ant, &lt;a 
href="http://maven.apache.org/"&gt;from Apache&lt;/a&gt;. Alternatively, many 
distributions have it in their repositories. For Ubuntu, it's 
&lt;pre&gt;&lt;code&gt;sudo apt-get install maven2&lt;/code&gt;&lt;/pre&gt; This version, as 
with all repository packages, is slightly out of date. But, at least 
you're off and running.&lt;/p&gt; 
&lt;p&gt; &lt;b&gt; How Do I Install Maven?&lt;/b&gt; The simplest way is, like Ant, to 
unzip it, and add the &lt;code&gt;bin&lt;/code&gt; folder of the directory to your 
system's &lt;code&gt;PATH&lt;/code&gt; variable. Alternatively, skip to the next 
question and simply use your operating system's repository to install 
it, if possible. &lt;/p&gt; 
&lt;p&gt; &lt;b&gt; How Do I Build a Maven Project&lt;/b&gt; Building a Maven project 
is easy, as the command never changes. &lt;pre&gt;&lt;code&gt;mvn 
install&lt;/code&gt;&lt;/pre&gt; 
This is true whether it's your project or somebody elses. It's 
predictable, and consistant. 
To use it, ascend to the highest directory in the directory tree that 
contains a &lt;code&gt;pom.xml&lt;/code&gt; file. That's usually the parent 
project. Usually, Maven projects cascade downwards, so you might try 
issuing:&lt;pre&gt;&lt;code&gt;mvn install&lt;/code&gt;&lt;/pre&gt; This will generate a 
&lt;code&gt;target&lt;/code&gt; directory in each project (if there are any). 
Inspect the &lt;code&gt;target&lt;/code&gt; directory for your &lt;code&gt;.jar&lt;/code&gt; 
or &lt;code&gt;.war&lt;/code&gt;, or whatever you're expecting. 
If for some reason there's no &lt;code&gt;target&lt;/code&gt; directory in the 
directory that contains the source code you're trying to build, 
descend into it to the point where you're adjacent to the 
&lt;code&gt;pom.xml&lt;/code&gt;. Then, issue again: &lt;pre&gt;&lt;code&gt;mvn 
install&lt;/code&gt;&lt;/pre&gt; 
&lt;/p&gt; 
&lt;p&gt;&lt;b&gt;How Do I Bootstrap a New Maven Project &lt;/b&gt; The simplest setup 
requires the creation of directories as well as one XML file. But, 
you'd likely create these directories and at least one XML file with 
Ant, too. 
&lt;/p&gt;&lt;p&gt;Run the following on the command line. NB: I haven't translated 
for Windows. I'm sure it's easy enough, there, too. 
&lt;PRE&gt;&lt;code&gt;mkdir -p 
&lt;b&gt;myproject&lt;/b&gt;/src/{main,test}/{java,resources}&lt;/code&gt;&lt;/PRE&gt; 
You can change &lt;b&gt;myproject&lt;/b&gt; to whatever you want. 
This will create a directory structure like the following: 
&lt;PRE&gt;&lt;CODE&gt;jlong@studio:~/Desktop/myproject$ find . 
. 
./src 
./src/main 
./src/main/resources 
./src/main/java 
./src/test 
./src/test/resources 
./src/test/java 
&lt;/CODE&gt;&lt;/PRE&gt; 
If you're just getting started and aren't test-driven, then you can 
ignore &lt;code&gt;src/test/*&lt;/code&gt;. 
That leaves you with &lt;code&gt;src/main/{resources,java}&lt;/code&gt;. 
Java code goes in &lt;code&gt;src/main/java&lt;/code&gt;. Things you'd like on the 
classpath of the same artifact, such as Spring application contexts, 
go in &lt;code&gt;src/main/resources.&lt;/code&gt; 
&lt;/p&gt; 
&lt;p&gt; Finally, you're going to need an XML POM file. POM standards for 
"Project Object Model," I think. 
It's the sole center for configuration related to your project. No 
need to do includes, or externalized configuration or anything. 
The simplest &lt;code&gt;pom.xml&lt;/code&gt; looks like: 
&lt;pre&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" 
       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd"&amp;gt; 
 &amp;lt;modelVersion&gt;4.0.0&amp;lt;/modelVersion&amp;gt; 
 &amp;lt;groupId&gt;com.yourproject.crm&amp;lt;/groupId&amp;gt; 
 &amp;lt;artifactId&gt;utilities&amp;lt;/artifactId&amp;gt; 
 &amp;lt;version&gt;1.0-SNAPSHOT&amp;lt;/version&amp;gt; 
&amp;lt;/project&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;You can copy and paste that into a file called 
&lt;code&gt;pom.xml&lt;/code&gt;, at the root of the &lt;code&gt;myproject&lt;/code&gt; folder 
created above. You're done. 
&lt;/p&gt;&lt;p&gt;From here, so long as you're just planning on using the JDK, 
etc, then this will work fine.  &lt;/p&gt; 
&lt;p&gt;&lt;b&gt;What do those directories and 5 lines of XML buy me?&lt;/b&gt; 
Think of that as being equivalent to hundreds of Ant targets. The 
project already has enough information to, among other things: 
&lt;ol&gt;&lt;li&gt;Generate javadocs: &lt;code&gt;mvn javadoc:javadoc&lt;/code&gt;&lt;/li&gt; 
&lt;li&gt;Compile classes: &lt;code&gt;mvn compile &lt;/code&gt;&lt;/li&gt; 
&lt;li&gt;Compile and generate an artifact (a &lt;code&gt;.jar&lt;/code&gt;, in this 
case): &lt;code&gt;mvn install &lt;/code&gt;&lt;/li&gt; 
&lt;li&gt;Generate a Checkstyle report: &lt;code&gt;mvn 
checkstyle:checkstyle&lt;/code&gt;&lt;/li&gt; 
&lt;li&gt;Or, in the alternative (and perhaps a complement): generate a PMD 
report: &lt;code&gt;mvn pmd:pmd&lt;/code&gt;&lt;/li&gt; 
&lt;li&gt;Build a web site with documentation on the structure of the 
project (anemic thing that it is): &lt;code&gt;mvn site&lt;/code&gt;&lt;/li&gt; 
&lt;li&gt;Build a cross reference of the project's sources: &lt;code&gt;mvn 
jxr:jxr&lt;/code&gt; &lt;/li&gt; 
&lt;li&gt;Setup project files for your favorite IDEs: &lt;code&gt;mvn 
eclipse:eclipse&lt;/code&gt;, or &lt;code&gt;mvn idea:idea&lt;/code&gt; (&lt;b&gt;NB:&lt;/b&gt; if 
you're using &lt;a href="http://www.intellij.com/"&gt;IntelliJ IDEA&lt;/a&gt; 7 or 
later, or &lt;a href="http://m2eclipse.sonatype.org/"&gt;Eclipse with the 
fabulous m2Eclipse plugin&lt;/a&gt;, then you don't need these plugins. You 
can simply 'open' the project as you would any project by importing or 
opening the &lt;code&gt;pom.xml&lt;/code&gt;. &lt;a 
href="http://www.netbeans.org/"&gt;Netbeans&lt;/a&gt; also has incredible 
support for opening Maven projects directly. &lt;/li&gt; &lt;/ol&gt; 
&lt;/p&gt;&lt;p&gt; &lt;b&gt;How Do I Add JARs to the ClassPath? &lt;/b&gt; Short answer: you 
don't. You let Maven handle it for you. 
If you need a &lt;code&gt;.jar&lt;/code&gt;, more than likely, it's already 
available in some repository, in the same way that a package might be 
provisioned by an operating system (such as Windows Update on Windows, 
&lt;code&gt;apt&lt;/code&gt; on Debian distributions, &lt;code&gt;rpm&lt;/code&gt; on RedHat 
distributions, &lt;code&gt;port&lt;/code&gt; on OSX, etc..). For Maven, using a 
depdendency is as simple as identifying it and adding the metadata to 
the &lt;code&gt;pom.xml&lt;/code&gt;. &lt;/p&gt;&lt;p&gt; There are many ways to "find" a 
&lt;code&gt;.jar&lt;/code&gt;. The simplest is to start browsing &lt;a 
href="http://mirrors.ibiblio.org/pub/mirrors/maven2/"&gt;a central 
repository&lt;/a&gt; and opening the &lt;code&gt;pom.xml&lt;/code&gt; files. To add a 
dependency, you need it's &lt;code&gt;&amp;lt;artifactId&amp;gt;&lt;/code&gt;, its 
&lt;code&gt;&amp;lt;version&amp;gt;&lt;/code&gt;, and its &lt;code&gt;&amp;lt;groupId&amp;gt;&lt;/code&gt;. 
These elements are usually at the top of all &lt;code&gt;pom.xml&lt;/code&gt;s. To 
add a dependency on the &lt;a 
href="http://commons.apache.org/lang/"&gt;Apache Commons Lang&lt;/a&gt; library 
to our project above, add the following lines to your 
&lt;code&gt;pom.xml&lt;/code&gt;, right before the closing &amp;lt;project&amp;gt; 
element: 
&lt;pre&gt;&lt;code&gt;&amp;lt;dependencies&amp;gt; &amp;lt;!-- plenty of room to add 
dependencies --&amp;gt;&amp;lt;/dependencies&amp;gt;&lt;/code&gt;&lt;/pre&gt; 
Inside the &lt;code&gt;dependencies&lt;/code&gt; section, you will add all your 
dependency information. The information you enter could be that for a 
third party &lt;code&gt;.jar&lt;/code&gt;, or a &lt;code&gt;.jar&lt;/code&gt; in your own 
project. Perhaps one team's project depends on another's. If Maven 
can't find the cached version of the &lt;code&gt;.jar&lt;/code&gt;, it'll download 
it for you. 
&lt;pre&gt;&lt;code&gt; &amp;lt;dependency&amp;gt;&amp;lt;groupId&amp;gt;&lt;b&gt;commons-lang&lt;/b&gt;&amp;lt;/groupId&amp;gt;&amp;lt;artifactId&amp;gt;&lt;b&gt;commons-lang&lt;/b&gt;&amp;lt;/artifactId&amp;gt;&amp;lt;version&amp;gt;&lt;b&gt;2.4&lt;/b&gt;&amp;lt;/version&amp;gt;&amp;lt;/dependency&amp;gt; 
&lt;/code&gt;&lt;/pre&gt; 
&lt;/p&gt; &lt;p&gt; To test, simply rebuild it as before: &lt;code&gt;mvn 
install&lt;/code&gt;. Most of the IDE integrations will have suport for 
updating the project configuration in the IDE (i.e., the classpath) 
according to what's in Maven's configuration. If you'd rather not 
spelunk through the &lt;code&gt;ibiblio&lt;/code&gt; repository site, you can 
always use one of the many Maven repository indexes. A good one is &lt;a 
href="http://search.mvnsearch.org"&gt;Maven Search&lt;/a&gt;. Type in a 
fragment of what you're looking for and it'll provide you with 
matches. Thus: I entered "commons-lang" and it found &lt;a 
href="http://search.mvnsearch.org/query.action?cat=jar&amp;q=commons-lang"&gt;results&lt;/a&gt;. 
Additionally, most of the IDE's will have support for some form of 
repository browsing.&lt;/p&gt; 
&lt;p&gt;&lt;b&gt;I'm Test Driven!&lt;/b&gt; 
This one's easy. If you &lt;i&gt;do&lt;/i&gt; want to use JUnit (or TestNG), then 
fret not - that's Maven's default M.O.! By default, any JUnit classes 
put into the &lt;code&gt;src/test/java&lt;/code&gt; folder will be compiled and 
run before proceeding with the build. 
&lt;/p&gt;&lt;h2&gt; The Tour's Over, What Did You Think?&lt;/h2&gt;&lt;p&gt; In this guide, 
I've given a walk through to the questions I can imagine thinking 
about when setting up a project with Ant. The result is that you can 
get a LONG ways with nothing (the minimal &lt;code&gt;pom.xml&lt;/code&gt;). 
&lt;/p&gt;&lt;p&gt; The balance of a given effort is the 20% stuff. As they say, 
the 20% cases can take 80% of the time. I can't speak to whether this 
is true or not as Maven's never delayed me, for any particular length, 
except when I was pushing it to do stuff that nothing else, including 
Ant, could have done. 
Even so, if you hit the 20% cases, you can rest easy in the knowledge 
that Maven is built to be flexible and extendable. It's whole model is 
exposed as a lifecycle. If you want to inject custom logic at a custom 
point, doing so is easy. It's also insanely interoperable. In fact, 
even if you don't want to use Maven but wan't to get a very high 
quality build script, setup the project using Maven and then use 
&lt;code&gt;mvn ant:ant&lt;/code&gt;. It'll generate an ant script that'll handle 
most things you'd want to do. Finally, if you decide you absolutely 
can't live without, or translate effectively, an Ant script, there's 
good support for running Ant scriptlets inside of Maven. 
&lt;/p&gt;&lt;p&gt; Go ahead and give it a try if you haven't tried it before or 
if you were put off. It's truly powerful. The most visible testament 
to this are the ideas (like Ivy) that are inspired by it in Ant. 
&lt;/p&gt;</summary>
    <dc:date>2009-08-27T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Building Servlets With Spring</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/building_servlets_with_spring.html" />
    <author>
      <name />
    </author>
    <modified>2009-08-24T00:00:00Z</modified>
    <issued>2009-08-24T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;h2&gt;The Problem&lt;/h2&gt; &lt;p&gt; &lt;a 
href="http://www.joshlong.com/jl/blogPost/quick_update_to_rss.html"&gt;Earlier&lt;/a&gt;, 
I wrote about having to build a solution using servlets to write out 
the contents of the RSS feed for my blog. I am using JSF on this site. 
There are solutions - like Pretty Faces - that work and provide a 
lot of flexibility for mouting JSF logic at a given URL. So, 
initially, my RSS and Atom feeds were being handled by a backing bean 
in JSF. Being JSF, this necessitated the need for a session cookie 
(even though, clearly, the RSS / Atom feeds are stateless.) &lt;/p&gt; &lt;p&gt; 
The cookie wouldn't have been so bad, except that - I think as a 
consequence - RSS readers consuming the blog were being constantly 
refreshed for the entire contents of the feed, because to them the 
resultant blog requested was "different" than the previous version. 
&lt;/p&gt; &lt;h2&gt;The Solution &lt;/h2&gt; &lt;p&gt;So, I planned to write a servlet that 
handled the requests and I expose that in my JSF application.  This 
would be a clear differentiator between the new Spring + JSF version 
of the software running my blog and the old Spring MVC version: it's 
uselessly difficult to support stateless endpoints with JSF, where as 
it's as natural a goal as anything in Spring MVC. &lt;/p&gt;&lt;p&gt; Using a 
servlet meant I'd lose two advantages I'd had in the JSF application 
with Pretty Faces: bookmarkable URLs, and the convenient programming 
environment that Spring Faces afforded me, namely, configuration, 
dependency injection, etc. &lt;/p&gt; &lt;h2&gt;Refinements&lt;/h2&gt; &lt;p&gt; I decided to 
use &lt;a href="http://tuckey.org/urlrewrite/"&gt;URLRewrite&lt;/a&gt; to solve 
the boomkarkable URLs (yes, that means this site is hosting not one, 
but &lt;i&gt;two&lt;/i&gt; solutions for bookmarkable URLs in the same 
&lt;code&gt;.war&lt;/code&gt;!) and Spring's under appreciated 
&lt;code&gt;HttpRequestHandler&lt;/code&gt;. &lt;/p&gt; &lt;p&gt; 
&lt;code&gt;HttpRequestHandler&lt;/code&gt; is an interface that, when 
implemented, becomes serviceable by a Spring framework servlet. The 
interface looks like: 
&lt;pre&gt;&lt;code&gt; 
package org.springframework.web; 
&lt;br/&gt; 
public interface HttpRequestHandler {&lt;br/&gt; 
   void handleRequest(HttpServletRequest request, 
HttpServletResponse response)            throws 
ServletException, IOException;&lt;br/&gt; 
} 
&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&lt;p&gt;You then configure a Spring framework class 
(&lt;code&gt;org.springframework.web.context.support.HttpRequestHandlerServlet&lt;/code&gt;) 
in your web.xml and name the servlet  the same as the bean that 
implements the &lt;code&gt;HttpRequestHandler&lt;/code&gt; interface is named in 
your Spring application context. By virtue of the fact that your 
&lt;code&gt;HttpRequestHandler&lt;/code&gt; bean is a Spring component, you get 
all the advantages of using Spring or Spring MVC, without having to 
load an entire framework. 
&lt;/p&gt;&lt;p&gt; For my code, the implementation looks something like the following: 
&lt;PRE&gt;&lt;CODE&gt;package com.joshlong.blawg.site.view.servlets; 
&lt;br/&gt; 
import java.io.IOException; 
import java.util.ArrayList; 
import java.util.Collection; 
import java.util.List; 
&lt;br/&gt; 
import javax.servlet.ServletException; 
import javax.servlet.http.HttpServletRequest; 
import javax.servlet.http.HttpServletResponse; 
&lt;br/&gt; 
import org.apache.commons.lang.StringUtils; 
import org.apache.commons.lang.exception.ExceptionUtils; 
&lt;br/&gt; 
import org.springframework.beans.factory.annotation.Autowired; 
import org.springframework.stereotype.Component; 
import org.springframework.web.HttpRequestHandler; 
&lt;br/&gt; 
import com.joshlong.blawg.BlogService; 
import com.joshlong.blawg.model.Blog; 
import com.joshlong.blawg.site.view.util.RssFeedCreationUtils; 
import com.joshlong.blawg.utils.LoggingUtils; 
&lt;br/&gt; 
import com.sun.syndication.feed.synd.SyndEntry; 
import com.sun.syndication.feed.synd.SyndFeed; 
import com.sun.syndication.io.SyndFeedOutput; 
&lt;br/&gt; 
@Component("feed") 
public class BlogFeedServlet implements HttpRequestHandler { 
   static private String FEED_TYPE_VARIABLE = "feedType"; 
   static private int START_FEED = 0, STOP_FEED = 500; 
&lt;br/&gt; 
   @Autowired 
   private RssFeedCreationUtils rssFeedCreationUtils; 
&lt;br/&gt; 
   @Autowired 
   private BlogService blogService; 
&lt;br/&gt; 
   @Autowired 
   private LoggingUtils loggingUtils; 
&lt;br/&gt; 
   private SyndFeed buildEntryList(HttpServletRequest req, 
HttpServletResponse res, String type, int start, int length) { 
       SyndFeed feed = ... // build up the SyndFeed however you want 
       return feed; 
   } 
&lt;br/&gt; 
   private void showAllAtomBlogs(HttpServletRequest request, 
HttpServletResponse response) throws Throwable { 
       SyndFeed feed = buildEntryList(request, response, "atom_0.3", 
START_FEED, STOP_FEED); 
       response.setContentType("text/xml"); 
       SyndFeedOutput syndFeedOutput = new SyndFeedOutput(); 
       syndFeedOutput.output(feed, response.getWriter()); 
   } 
&lt;br/&gt; 
   private void showAllRssBlogs(HttpServletRequest request, 
HttpServletResponse response) throws Throwable { 
       SyndFeed feed = buildEntryList(request, response, "rss_2.0", 
START_FEED, STOP_FEED); 
       response.setContentType("text/xml"); 
       SyndFeedOutput syndFeedOutput = new SyndFeedOutput(); 
       syndFeedOutput.output(feed, response.getWriter()); 
   }&lt;br/&gt; 
   public void handleRequest(HttpServletRequest request, 
HttpServletResponse response) throws ServletException, IOException { 
       try { 
           String feedType = 
StringUtils.defaultString(request.getParameter(FEED_TYPE_VARIABLE)); 
           if (StringUtils.isEmpty(feedType)) 
               feedType = "rss"; 
           if (feedType.equalsIgnoreCase("rss")) 
               showAllRssBlogs(request, response); 
           else 
               showAllAtomBlogs(request, response); 
       } catch (Throwable th) { 
           loggingUtils.log(ExceptionUtils.getFullStackTrace(th)); 
       } 
   } 
} 
&lt;/CODE&gt;&lt;/PRE&gt; 
&lt;/p&gt; 
&lt;p&gt; Thus, it's simpler than a standard Spring MVC controller or a 
struts controller (though admittedly lacking a lot of the frills - 
this happens to be a simple use case.&lt;/p&gt; &lt;p&gt; I then configured the 
web.xml for all of this: &lt;code&gt;&lt;pre&gt; 
   &amp;lt;servlet&amp;gt; 
       &amp;lt;servlet-name&amp;gt;feed&amp;lt;/servlet-name&amp;gt; 
       &lt;b&gt;&amp;lt;servlet-class&amp;gt;org.springframework.web.context.support.HttpRequestHandlerServlet&amp;lt;/servlet-class&amp;gt;&lt;/b&gt; 
   &amp;lt;/servlet&amp;gt;&lt;br/&gt; 
   &amp;lt;servlet-mapping&amp;gt; 
       &amp;lt;servlet-name&amp;gt;feed&amp;lt;/servlet-name&amp;gt; 
       &amp;lt;url-pattern&amp;gt;/urlPatternForFeedServlet&amp;lt;/url-pattern&amp;gt; 
   &amp;lt;/servlet-mapping&amp;gt; 
&lt;/pre&gt;&lt;/code&gt; 
&lt;/p&gt; 
&lt;p&gt;Note that we've used the name fo the bean (configured using bean 
classpath scanning, so the name is in the &lt;code&gt;@Component&lt;/code&gt; 
stereotype at the top of the class - &lt;code&gt;"feed"&lt;/code&gt;.) for the 
servlet name. Sure, it smells a bit like engineered coincadence, but 
it works well. &lt;/p&gt; &lt;p&gt;From here, all that remained was configuring a 
URLRewrite rule to map the servlet to the endpoints visible on the 
site right now (&lt;code&gt;"/jl/entries/blog.atom"&lt;/code&gt;, and 
&lt;code&gt;"/jl/entries/blog.rss"&lt;/code&gt;)&lt;/p&gt;&lt;p&gt; Hope this helps 
somebody... &lt;/p&gt;</summary>
    <dc:date>2009-08-24T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Quick Update to RSS</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/quick_update_to_rss.html" />
    <author>
      <name />
    </author>
    <modified>2009-08-22T00:00:00Z</modified>
    <issued>2009-08-22T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; I just published a change to the code that should hopefully&#xD;
prevent readers (like &lt;a href="http://www.google.com/reader"&gt;Google&#xD;
Reader&lt;/a&gt;) from constantly requeuing all my old blog entries as&#xD;
"unread." ?I don't know if it'll work (I've never had to debug this&#xD;
particular web client!), but we'll see. &lt;/p&gt;&lt;p&gt;I suspect the issue is&#xD;
something like the following: the spider hits the page which in turn&#xD;
causes it to get a cookie from Java Server Faces, which makes the blog&#xD;
feed look "new." I've checked the last modified dates and so on using&#xD;
&lt;a href="http://livehttpheaders.mozdev.org/"&gt;Http Live Headers&lt;/a&gt; and&#xD;
the Last-Modified dates and everything look alright. Anyway, I'll post&#xD;
back with results once they manifest (or, hopefully, don't manifest!)&#xD;
&lt;/p&gt; &lt;p&gt;Succinctly, the change involved creating a servlet (sort of)&#xD;
and using that to write/render (I wanted to say "feed") the feed.&lt;/p&gt;</summary>
    <dc:date>2009-08-22T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Component Oriented Architectures</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/component_oriented_architectures.html" />
    <author>
      <name />
    </author>
    <modified>2009-08-20T00:00:00Z</modified>
    <issued>2009-08-20T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;Warning, this blog entry is as much a rant as a blog, and tends on&#xD;
the somewhat lengthy side. You've been warned. I'm looking for the&#xD;
secret of life, as always, and failing it, I'll settle for the secrets&#xD;
of software. This is a blog I don't know how to write, but have wanted&#xD;
to, for a long time. I suspect getting it out on paper will let me&#xD;
revisit with more clarity later. &lt;/p&gt; &lt;p&gt; Prompted by &lt;a&#xD;
href="http://twitter.com/bsbodden"&gt;Brian Sam-Bodden's&lt;/a&gt; musing on&#xD;
the subject a week or so ago on Twitter, I've been ruminating on the&#xD;
notion of a "component."   I think that the evolutions of modern day&#xD;
software development are embodied in the notion of a component, not a&#xD;
"service," or a "bean," or anything else. Those words don't convey&#xD;
enough. &lt;/p&gt;&lt;p&gt; Thinking about it, a "component" can be broadly&#xD;
defined as a thing which integrates readily into a bigger thing  -&#xD;
that is, it's adapted to the thing that uses it, and any other such&#xD;
thing could be made to follow suit, with the same adaptations. The&#xD;
container is composed of components. &lt;/p&gt;&lt;p&gt; Getting more specific, we&#xD;
think about a component in &lt;i&gt;software&lt;/i&gt; as a thing that is&#xD;
integrated into a &lt;i&gt;container&lt;/i&gt; and that can only  function as a&#xD;
subordinate entity to the container. In practice, this vague&#xD;
description manifests itself as class that implements an well-known&#xD;
interface. Sometimes, being a component means is simply a matter of&#xD;
letting the container control when the component starts working and&#xD;
when it is stopped. Here, you might not even need to implement an&#xD;
interface since object creation and destruction or (&lt;i&gt;typically!&lt;/i&gt;)&#xD;
built into the language itself, and thus there's no need to codify it&#xD;
further. &lt;/p&gt;&lt;p&gt; This ends up quite often being too much of an&#xD;
abstraction. Something that is everything is also nothing. So, again,&#xD;
in practice it's a matter of establishing a common interface. In&#xD;
recent years, the "interface" for a component has evolved beyond the&#xD;
literal notion of a language interface and can be any number of things&#xD;
now. After all, all the interface does is distinguish an object as&#xD;
being a &lt;i&gt;component&lt;/i&gt; in a sea of non-components. Such a&#xD;
distinction can otherwise be made, as with annotations or attributes&#xD;
in the Java and .NET platforms, respectively.  &lt;/p&gt;&lt;p&gt; So, a component&#xD;
is something that belongs to a container and that so marks itself as&#xD;
usable in that container with an interface or some other&#xD;
distinguishing feature. &lt;/p&gt;&lt;p&gt; Now, when the component is deployed,&#xD;
it sustains some sort of behavior, perhaps over a period of time.&#xD;
There is often a setup phase and a destruction phase.  This implies a&#xD;
lifecycle, to setup state to begin servicing requests and to stop&#xD;
servicing requests. This lifecycle might provide hooks tot he&#xD;
component unique the containing environment. &lt;/p&gt;&lt;p&gt; Because the&#xD;
component exists inside of a container, collisions are apt to occur.&#xD;
Language features like assemblies or packages help isolate a&#xD;
component, but often the container will provide addressing to further&#xD;
isolate a component from its siblings. &lt;/p&gt;&lt;p&gt; At this point, I think,&#xD;
the nuances are what qualify the application of a component. If we&#xD;
agree on the previous points applying to most components, then surely&#xD;
we agree that following aspects apply only to some components. The&#xD;
specification is where the term component is starts being prefixed,&#xD;
i.e., "web component," "service component," etc. &lt;/p&gt;&lt;p&gt; Analyzing&#xD;
these definitions, a HUGE number of things could be consider a&#xD;
component. &lt;/p&gt; &lt;ol&gt; &lt;/li&gt;&lt;li&gt; the now-defunct Avalon framework had&#xD;
"components" &lt;/li&gt;&lt;li&gt; Spring has a @Component stereotype that marks&#xD;
beans as "components" &lt;/li&gt;&lt;li&gt; JCDI  - the pending DI component model&#xD;
in JEE6 describes "components" &lt;/li&gt;&lt;li&gt; Indeed, EJB's original&#xD;
documentation spoke of EJB "beans," which you might argue was Sun's&#xD;
jargon for "component." &lt;/li&gt;&lt;li&gt; The web frameworks Tapestry, Wicket,&#xD;
Echo, etc, provide components for the user.  &lt;/li&gt;&lt;li&gt; The Java UI&#xD;
model, Swing, provides components &lt;/li&gt;&lt;li&gt; The J2ME and Android&#xD;
mobile phone platforms provide "components" &lt;/li&gt; &lt;/ol&gt; &lt;p&gt; The list&#xD;
goes on and on, but you can see plainly that the idea of a "component"&#xD;
is not new. A component by any other name... &lt;/p&gt;&lt;p&gt; These various&#xD;
notions of a component - though not all of them - share several more&#xD;
concepts which we might describe as key to any description of a&#xD;
component. &lt;/p&gt;&lt;p&gt; Most of them provide some way to export state. In&#xD;
Tapestry, Seam and JCDI, you can "outject" values, effectively binding&#xD;
an internal value to a client's state, so that the internal state is&#xD;
reflected in the external variable when state inside the component&#xD;
changes. This is often called just "binding," and is -usually -an&#xD;
abbreviated way of responding to some event and then synchronizing&#xD;
client state with the state of the component manually. JavaBeans&#xD;
themselves, a core tenant of the Java platform, provides this notion&#xD;
of properties, which are nothing more than accessor/mutator pairs by&#xD;
which state may be shared in a generic fashion. The Dojo JavaScript&#xD;
framework, Wicket, Echo, and Spring, ASP.NET, and Swing all provide&#xD;
support for broadcasting state changes as events. This tends to be&#xD;
very effective as it decouples the listeners from the component&#xD;
itself. &lt;/p&gt;&lt;p&gt; In this discussion I've lumped both events and&#xD;
properties as goals by which to achieve the same thing, and though&#xD;
these concepts are not present everywhere, they're key for good&#xD;
components in this author's experience. &lt;/p&gt;&lt;p&gt; In this respect,&#xD;
Delphi, C# and Scala and other languages that embrace these concepts&#xD;
and codify events and properties have the edge. Software development&#xD;
can't be about  being able to bundle state and functionality, it has&#xD;
to be about components that play nicely with each other, not in a box&#xD;
but in an ocean. Promoting the ideas behind a component promotes&#xD;
decoupled, and well behaved, software. &lt;/p&gt;&lt;p&gt; Indeed, the trends in&#xD;
software development themselves beg for components. Grids, with many&#xD;
concurrences and actors at play, are very well suited to components&#xD;
-services exposed behind a publish/subscribe mechanism. Services so&#xD;
exposed publish functionality that other actors in the system can&#xD;
consume if they can address them. This sort of dynamism is already&#xD;
alive and well in things like Jini or GridGain. The components&#xD;
themselves comply with a life-cycle for their respective containers.&#xD;
&lt;/p&gt; &lt;p&gt; The very idea of a component - things out of which something&#xD;
bigger is composed - implies composition. The biggest thing to come&#xD;
out of SOA is the push towards service reuse and composition, which&#xD;
components encourage.  &lt;/p&gt; &lt;p&gt; Clearly, I'm thinking this through as&#xD;
I write it, and so any input's appreciated (good, bad, or&#xD;
indifferent.) &lt;/p&gt;&lt;p&gt; The addressability part is key. Brian mentions&#xD;
the notion of a REST-ful component. In the specific, he was talking&#xD;
about a component on a page amight be addressable, but the question is&#xD;
equally well put to how to expose distributed components uniformally.&#xD;
&lt;/p&gt; &lt;p&gt; Is there an ideal way to build components and to model these&#xD;
concepts  - what's the next generation of software going to bring us?&#xD;
Clearly, functional languages are here to stay, but they don't&#xD;
preclude the idea of a component, in fact I imagine it might work for&#xD;
it.  &lt;/p&gt; &lt;p&gt; What do you think? What's the most succinct way to model&#xD;
software? Is your architecture composed of objects and services? Of&#xD;
global variables and functions? Or of components? What will the&#xD;
architectures of tomorrow look like?&lt;/p&gt;</summary>
    <dc:date>2009-08-20T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Ooops!</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/ooops.html" />
    <author>
      <name />
    </author>
    <modified>2009-08-17T00:00:00Z</modified>
    <issued>2009-08-17T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;Today started off nice enough...&#xD;
I went to &lt;a href="http://www.malibuseafood.com/"&gt;Malibu Seafood&lt;/a&gt;&#xD;
today and enjoyed a lovely day on the beach and came back to check my&#xD;
blogs and, &lt;b&gt;blam!&lt;/b&gt; mistake-in-the-face! &lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;In my last blog I discussed that I'd updated the software powering&#xD;
this blog, and that there might be some bugs to work out. &lt;/p&gt;&lt;p&gt;Boy,&#xD;
am was I on the money on that one! Turns out, I updated the logic used&#xD;
to implement my RSS feed and Atom feed (eh, mainly, the switch - I'm&#xD;
embarrassed to admit - was to actually use the token that ROME expects&#xD;
to generate an Atom feed instead of the RSS 2.0 type of feed.)&#xD;
Bluntly: if you subscribed to my Atom feed, you only got an RSS feed,&#xD;
because I fat fingered the &lt;code&gt;'feedType'&lt;/code&gt; parameter on that&#xD;
one!&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt; Apologies to all those were spammed this morning with 'duplicate'&#xD;
(essentially) blog entries! Everything except this and the one before&#xD;
it are old and can be marked as read... thanks. &lt;/p&gt;</summary>
    <dc:date>2009-08-17T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>You're looking at a work in progress..</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/youre_looking_at_a_work_in_progress.html" />
    <author>
      <name />
    </author>
    <modified>2009-08-16T00:00:00Z</modified>
    <issued>2009-08-16T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;h2&gt;Man at work&lt;/h2&gt;&#xD;
 &lt;p&gt; You're looking at a work in progress. &lt;/p&gt;&#xD;
 &lt;p&gt; The software that runs this site - joshlong.com - is home-brew. I&#xD;
built it myself, not because I feel like I'm going to do an inherently&#xD;
better job than any of the numerous pre-built options - furthest thing&#xD;
from it, actually.&#xD;
&lt;/p&gt;&lt;p&gt;&#xD;
 I built it myself to be able to eat my own dog food. If I had to&#xD;
learn at the same pace I take on a new job and get exposed to a new&#xD;
skill set by force, I'd know much less. Practice is the only thing&#xD;
that can be usefully attributed to improved skills.&#xD;
The previous version of this site was written in Spring MVC so I could&#xD;
refine my understanding of the @MVC model and truly get a feeling for&#xD;
how it works (very nicely, I should add).&#xD;
I've long been a fan of Tapestry and have built numerous sites with&#xD;
it. I figured, with all the new work going on in the JSF world that it&#xD;
was time for me to refresh myself on that platform, especially as JSF&#xD;
2.0 creeps ever closer.&#xD;
 &lt;/p&gt;&#xD;
&lt;p&gt; JSF has seen major "upgrades" (in lieu of &lt;i&gt;actual&lt;/i&gt; upgrades&#xD;
from the specification) from JBoss, with Seam, and with the Spring&#xD;
Faces support from SpringSource. Additionally, RichFaces and numerous&#xD;
other projects have evolved their component frameworks so much that&#xD;
result is rarely portable, but usually very nice. In effect these&#xD;
component libraries are their own sort of framework and often carry&#xD;
their own specialized support for core framework concepts like&#xD;
component development, JavaScript, rendering (i.e., view templates),&#xD;
Ajax and internationalization. These frameworks can make JSF very&#xD;
pleasant.&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;Except... when it isn't. It turns out that JSF's many weaknesses  -&#xD;
while in some places well addressed by some of these 3rd party&#xD;
solutions - are not completely surmountable, and in some cases you're&#xD;
forced to simply "grin and bear it."&#xD;
 This includes things like statelessness (you'll be greeted with a&#xD;
&lt;code&gt;JESSIONID&lt;/code&gt; on your first request, for example), binary&#xD;
responses, and SEO-friendly URLs. I've talked about solutions for some&#xD;
of these problems in Spring MVC before, but they were to augment a&#xD;
capability that was already there. Here, the solutions and the&#xD;
home-brew components I had to put together were to avail myself of&#xD;
these capabilities in the first place.&#xD;
&#xD;
&lt;/p&gt;&lt;p&gt; For SEO-friendly URLs, I found an incredible library called &lt;a&#xD;
href="http://ocpsoft.com/prettyfaces/"&gt;Pretty faces&lt;/a&gt;. I'm still&#xD;
using &lt;a href="https://jawr.dev.java.net/"&gt;JAWR&lt;/a&gt;, as before, but&#xD;
because I'm also using RichFaces - which has its own CSS/JS&#xD;
compression mechanism, the solution's not quite as effective as I&#xD;
would have liked. Still, 2 heavily compressed, minified JS files and&#xD;
CSS files (one from JAWR, one from RichFaces) still beats 10+ HTTP&#xD;
requests on non-minified/non-gzip compressed resources required&#xD;
otherwise!)&#xD;
&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt; The blog software itself has many components, only about 20% of&#xD;
which is the UI layer. Thus, porting to a new UI framework's pretty&#xD;
easy because the back end and most of the processing are divorced from&#xD;
the UI layer.&#xD;
 &lt;/p&gt;&#xD;
&#xD;
&lt;h2&gt;But... Why?&lt;/h2&gt;&#xD;
 &lt;p&gt;No good reason, really. I know what you're thinking - "what could&#xD;
possibly be more 'website site babysitting a database' than a blog?".&#xD;
Since I'm trying to experiment with things, I've hit a few different&#xD;
places where it's paid to invest in exploiting temporal decoupling,&#xD;
and thus in investing other technologies.&#xD;
&#xD;
Most of these features are part of the creation of blogs, thus, not&#xD;
something you'll ever notice.&#xD;
  There are two ways to create blogs on this site. An administration&#xD;
section in which I can log in and post blogs and save drafts is the&#xD;
sort of first-blush approach. It works well enough, but it's not&#xD;
nearly as full featured as the equivalent functionality inside GMail&#xD;
for composing an email. So, I create a Spring Integration integration&#xD;
that polls an email and posts that. It's got a white-list on incoming&#xD;
e-mail addresses, of course, and I've had to do a few unconventional&#xD;
things to make it work, but it's actually the most fluid way to deal&#xD;
with my blog. Not surprisingly, this feature's available in other&#xD;
blogging software, too.&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;&#xD;
Once I do send in a blog, processing occurs on the blog entry itself.&#xD;
The act of creating the blog triggers a jBPM process that prepares the&#xD;
blog for final publication. The jBPM process is handled  in a separate&#xD;
VM, with JMS serving as the transactional queue that pops tasks off of&#xD;
the queue and handles the work.&#xD;
 This is useful because it lets longer running tasks happen with no&#xD;
apparent delay to the readers of the site.&lt;/p&gt;&lt;p&gt;Any externally&#xD;
referenced images  in the blog are parsed and their URLs used to&#xD;
asynchronously download the image, which gets stored in managed file&#xD;
system. Then, in the published blog, you see a URL pointing to that&#xD;
managed image, not the original, which means if the original&#xD;
disappears, my blog will still look correct.&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt; Another part of the process involves submitting pings to the&#xD;
various syndicates for a blog to let them know they should update&#xD;
their listing.  This too is something that a lot of other blog&#xD;
software will do, but it can take a while which is why in my software&#xD;
it's modeled asynchronously.&lt;/p&gt;&#xD;
&lt;p&gt; The number one reason for building my own blogging solution is,&#xD;
simply, that I can say I did. Because the domain model and services&#xD;
tier are familiar, it's easy to gauge progress with a UI framework by&#xD;
how quickly I'm able to build for it. &lt;/p&gt;&#xD;
 &lt;p&gt; Naturally, there are many  (seemingly endless) reasons not to do&#xD;
what I've done. However, they all focus on practicality with respect&#xD;
to setting up a blogging solution. They fail as means by which to&#xD;
practice my craft. &lt;/p&gt;&#xD;
&#xD;
&lt;p&gt; Having said that, please excuse any inconsistency in this blog as&#xD;
I'm still tweaking things (as I tend to do every 6 months or so.&#xD;
 The software's more or less at parity with where it was in Spring&#xD;
MVC, having ported the UI layer over. Missing are keywords and&#xD;
descriptions in the meta tags, a working version of the admin section&#xD;
(though, as I indicated, I use the e-mail integration more frequently&#xD;
and that still works since it has nothing to do with JSF or servlets),&#xD;
working titles (ie, each post's title should appear between the&#xD;
&amp;lt;title&amp;gt; tags in the browser window,  and I'm sure there's more.&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt; There are many fixes in this new software, too, but ideally,&#xD;
you'll never notice them :-) &lt;/p&gt;&#xD;
&#xD;
 &lt;p&gt;If you notice anything I'm missing or you think might be worth&#xD;
experimenting with adding in a reasonably malleable blogging platform,&#xD;
leave a comment. Thanks!&lt;/p&gt;</summary>
    <dc:date>2009-08-16T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Composite components in JSF 1.2.x</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/composite_components_in_jsf_12x.html" />
    <author>
      <name />
    </author>
    <modified>2009-07-22T00:00:00Z</modified>
    <issued>2009-07-22T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;&#xD;
  I'm trying to build a component in JSF that in turn has several drop downs that, with the magic of RichFaces, updates the server on the state via Ajax and rerenders the components "downstream" of the component whose state has changed. &#xD;
 This is the classical idiom of a drop down has options depend on the previous selections made. &#xD;
The component's used in several places on the system and it would be magnificent if we could blackbox its internals. &#xD;
&#xD;
 &lt;/p&gt;&#xD;
&#xD;
&lt;p&gt; With Tapestry, you could build a component that does its work and then "outjects" or writes a value to a property upon completion. Imagine, for example, a login form. The login form has two text fields (email, password, or anything like that) and a backing class. As the login form component is rendered, you might have preconditions to establish, so you use the Tapestry component life cycle to setup state on the fields before rendering. Finally the text fields are rendered. When the form is submitted the fields values are updated and you have a chance to read the values and perhaps do something with them. For example, if the credentials are correct, you might do a query and create a valid &lt;code&gt;User&lt;/code&gt; object. The &lt;code&gt;User&lt;/code&gt; object is then set on a property and that property can be bound to a  property of the client of the component. If you use the same component 10 times on the same page, they all have their own internal copy of the property and they can all update the same one or they could update 10 individual properties. That is, the "backing bean" is scoped to the component, not the page.  &#xD;
&#xD;
 &#xD;
&lt;/p&gt;&lt;p&gt; &#xD;
 The difference with JSF is that for any kind of composite components you have to do soething like building the tree or using Facelets. These components will in turn require some place to store the values they submit. For the above example of the login form, the user name and the password need some place to be stored. Since facelet &lt;code&gt;ui:components&lt;/code&gt; don't have their own backing bean, you need to provide the backing bean for the values. Thus, it's up to the client of the component to provide storage for internal state of the component. Not very component oriented. And, more to the point, it quickly becomes untenable if you want to use the component more than one time in the scope the backing bean lives. That is, you can only use the component once per request or once per session (without creating new backing beans, at least).&#xD;
&#xD;
 &lt;/p&gt; &#xD;
&#xD;
&lt;p&gt; I know that JSF 2.0 will feature better support for composite components, but I need this to work on JSF 1.2, and have not managed to find many good resources / examples on how to build a sophisticated &lt;code&gt;UIComponent&lt;/code&gt; subclass so it can handle its own storage. &lt;/p&gt; &#xD;
&#xD;
&lt;p&gt; Anybody have any   ideas? &lt;/p&gt;</summary>
    <dc:date>2009-07-22T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>JoshLong.com on EC2</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/joshlongcom_on_ec2.html" />
    <author>
      <name />
    </author>
    <modified>2009-07-19T00:00:00Z</modified>
    <issued>2009-07-19T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; This is my first working version of the system being posted from the EC2 cloud. Performance seems alright. I'll update as I dig more into the capabilities. So far getting things up and running has been relatively painless. &#xD;
 There's something inherently awesome about being able to login and setup your own server without having to beg for certain extra capabilities.  &#xD;
&#xD;
&lt;/p&gt;&lt;p&gt; I like most that this could eventually grow with a minimum of fuss.  &lt;/p&gt;</summary>
    <dc:date>2009-07-19T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>My talk on Spring Integration At TheServerSide.com '09</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/my_talk_on_spring_integration_at_theserversidecom_09.html" />
    <author>
      <name />
    </author>
    <modified>2009-06-15T00:00:00Z</modified>
    <issued>2009-06-15T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; I did a talk &lt;i&gt;waaay&lt;/i&gt; back in March on Spring Integration for TheServerSide Symposium. If you're into Spring and want an hours worth of good wholesome ESB fun, may I humbly suggest you check out &lt;a href="http://library.theserverside.com/detail/RES/1242310424_817.html?asrc=vcatssc_sitepost_05_14_09"&gt;the talk.&lt;/a&gt; I'd love to know what you think so please feel free to leave a comment! &#xD;
&lt;/p&gt;</summary>
    <dc:date>2009-06-15T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Tapestry 5.1</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/tapestry_51.html" />
    <author>
      <name />
    </author>
    <modified>2009-06-07T00:00:00Z</modified>
    <issued>2009-06-07T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt; Recently, I've been playing with Tapestry 5. The experience has been extremely satisfying. Although there are issues that could be worked on, on the whole this is the most pleasant development environment I've ever use for Java Web development. Frankly, it started as just a way to keep my mind away from a main project I'm working on. I figured I'd give it the five minute test. Actually, this is the third time I 've given it the five minute test, and this time it took. What did it was release 5.1, which sports a few features that indicate that Tapestry 5 is becoming a very "practical" choice, not just the right one.&lt;/p&gt;&lt;p&gt; Tapestries 5.1 sports the ability to gzip compress, as well as consolidate, JavaScript files. It does other things with images and css, too. It's not just yet on par with JAWR - which, honestly, I love -  because there's something freeing about knowing that if your page needs libraries x, and y, that there's a component out there that's doing everything possible to make the impact of inclusion of that library acceptable. CSS and JavaScript are to the web what "jars" are to the JVM: an encapsulated packaging of externalized, reusable functionality. Being able to optimize loading them, then, is crucial. &lt;/p&gt;&lt;p&gt; Knowing this, I decided to give it a look. I got into it, just a little. I used the Maven Tapestry archetype and created a separate project. Downloaded Tomcat 6 and even loaded Eclipse 3.4. I imported the Maven project using the m2eclipse plug-in, setup a Tomcat 6 server instance, and deployed my application to the instance. I configured Tomcat to "serve modules without publishing," and disable auto publishing. Then I crossed my fingers and hoped for the best. I loaded the browser and hit the front page. The site that's generated is pretty, but boring. It does, however, prove inviting. I returned to Eclipse, associated the HTML editor to &lt;code&gt;*.TML &lt;/code&gt; files, and then started hacking. I started with a change to a &lt;code&gt;.TML &lt;/code&gt; file. &lt;code&gt;&amp;lt;h1&amp;gt;Hello, world!&amp;lt;/h1&amp;gt;&lt;/code&gt;, placed in the middle of the &lt;code&gt;Index.tml &lt;/code&gt; file. I refreshed. It worked...! I went to the Index class itself, and added &lt;/p&gt;&#xD;
 &lt;pre&gt;&lt;code&gt;&#xD;
 public String getMyMessage(){&#xD;
        return "Hello, moto.";&#xD;
 } &lt;/code&gt;&lt;/pre&gt;&#xD;
 &lt;p&gt;&#xD;
&lt;p&gt; Then, on the Index.tml file, I added &lt;code&gt;${myMessage}&lt;/code&gt;. &lt;/p&gt; &lt;p&gt;Again, I just refreshed the browser, and it worked! In comparison to Tapestry 3 and 4, this was great. But I've blogged about &lt;a href="http://www.joshlong.com/jl/blogPost/getting_started_with_zero_turnarounds_javarebel.html"&gt;Zero Turnaround's JavaRebel&lt;/a&gt; product and I've certainly seen Tomcat do some neat things with regular Struts projects or Spring MVC projects. I wasn't.. aghast, just yet. Finally, I started getting into it. &lt;/p&gt; &lt;p&gt; I have used the various versions of Tapestry before, so I knew  - essentially - what components to expect and essentially what to imagine possible. I had programmer courage. So I was a little more ambitious and decided I'd tackle something  a little more ambitious. I started with a component to provide a panel. The panel would have a parameter for a ValidationTracker, which is the object that keeps track of what validations have occurred on a &lt;code&gt;@Form &lt;/code&gt; component (very much like &lt;code&gt;ActionErrors&lt;/code&gt;/&lt;code&gt;ActionMessages &lt;/code&gt; in Struts. The panel would turn red if there were errors in the form it contained. This was a hard thing to do before because Tapestry had issues with the order of the layout of the components. &lt;/P&gt; &lt;P&gt; Suffice it to say, it worked. It was also blissfully simple. No interfaces, not even annotations if I didn't want them. I was able to parameterize the title of the panel using a &lt;code&gt;@Block &lt;/code&gt; (like a facet in JSF). In a package adjacent to my test page, I added a simple POJO, with a few accessor / mutators (a &lt;code&gt;Customer &lt;/code&gt; class, with the usual sort of properties..). I declared an instance of it on my test page's class and added a &lt;code&gt;@Property &lt;/code&gt; annotation to it - I didn't have to even create a java bean style accesor! I added a Form and a few TextField components to the class, too. &lt;/p&gt;&#xD;
&lt;PRE&gt;&lt;CODE&gt;&#xD;
@Component(parameters={"value=customer.email"}) private TextField email ;&#xD;
@Component(parameters={"value=customer.password"})  private TextField password ;&#xD;
@Component private Form form ;&#xD;
&lt;/CODE&gt;&lt;/PRE&gt;&#xD;
&lt;p&gt;On my page, the I had:&lt;/p&gt;&#xD;
&lt;pre&gt;&lt;code&gt;&#xD;
&amp;lt;form t:id="form"&amp;gt;&#xD;
 &amp;lt;t:label for="email" /&amp;gt; &amp;lt;input t:id="email" /&amp;gt; &amp;lt;br/&amp;gt;&#xD;
 &amp;lt;t:label for="password" /&amp;gt; &amp;lt;input t:id="password" /&amp;gt; &amp;lt;br/&amp;gt;&#xD;
 &amp;lt;input t:id="signup" type="submit" /&amp;gt;&#xD;
&amp;lt;/form&amp;gt;&#xD;
&lt;/code&gt;&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt; This seemed like enough, so I hit refresh and .. unsurprisingly, it worked!&#xD;
 Naturally, this doesn't do anything. I wanted to make the &lt;code&gt;Form&lt;/code&gt; component do something on successful submission.&#xD;
 I looked around, and the simplest way to do that was to name a method as though I was descrbing it in English:&#xD;
&#xD;
  &lt;pre&gt;&lt;code&gt;&#xD;
  void onSuccessFromForm()  {&#xD;
    System.out.println( new ReflectionToStringBuilder( this.customer).toString()) ;&#xD;
  }&#xD;
  &lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;And of course, &lt;i&gt;that&lt;/i&gt; worked!&#xD;
 It's worth mentioning that during all of this - method additions, field additions, component adjustments, etc, I've not redeployed or published or even waited for more than a split second even once.&#xD;
The 5 minutes had become an hour. The reason I write this blog is because I'm now well into hour 7, and I'm thoroughly impressed. It's actually &lt;i&gt;fun&lt;/i&gt; to work in.&#xD;
&#xD;
 If you've ever had that &lt;i&gt;wow!&lt;/i&gt; moment in a dynamic language where you just can't beleive how nice it is to hit refresh and work, then you'll appreciate Tapestry.&#xD;
 I can't usefully compare it to another Java framework because there's nothing like it. It's liberating. Check out Neal Ford's amazing &lt;a href="http://library.theserverside.com/detail/RES/1242309506_447.html?asrc=vcatssc_sitepost_05_14_09"&gt;"On the Lame From The Furniture Police"&lt;/a&gt;&#xD;
  to watch a discussion on keeping focus, flow while working. In it, he basically discusses just how damaging a minute idle time is when developing an application.&#xD;
  Tapestry breaks that cycle for you. No more flow stoppages. I've become impatient with the browser's ability to repaint, actually!&#xD;
&lt;/p&gt;&lt;P&gt;I wholely recommend you take a look at &lt;a href="http://tapestry.apache.org"&gt;Apache Tapestry 5.1&lt;/a&gt;.&lt;/p&gt;</summary>
    <dc:date>2009-06-07T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>My Los Angeles Musings, Seam, Tapestry 5, JavaOne, Spring Workflow, Spring Python and more</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/my_los_angeles_musings_seam_tapestry_5_javaone_spring_workflow_spring_python_and_more.html" />
    <author>
      <name />
    </author>
    <modified>2009-06-05T00:00:00Z</modified>
    <issued>2009-06-05T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;h1&gt;Hello, world. &lt;/h1&gt; &lt;p&gt;My life has been utterly and completely busy for the last several months. I don't know about you, but I love it when that happens, even if it does take me aay from priority things like maintaining this blog. I'll take this post to sort of stretch my blog legs out again, and then try to establish a blog with more frequency.  &lt;/p&gt; &lt;p&gt; &lt;a href="http://joshlong.com/jl/blogPost/moving_to_los_angeles.html"&gt;When last I wrote&lt;/a&gt;, I mentioned that I had moved from Phoenix, AZ to Los Angeles, CA. I started work on April 1 (cool company, nice people, interesting software, moving on...). I worked pretty consistently and started looking for a place to stay as I was at that point lodging with my mom. My wife came from Phoenix, AZ a month later, May 1. She stayed back while I sort of scouted ahead and started work. We've found a nice apartment in Canyon Country, CA, which is, honestly, very pleasant. It's far away from Los Angeles proper that the prices seem acceptable, but close enough that I can make my 20 mile commute in about 24 minutes, which I appreciate. I've also enjoyed (surprise surprise) the weather, which has been beautiful of late. As an example, as I write this it's very, very early in the morning, just after midnight, on Friday, June 5. The temperature is 88F in Phoenix, AZ right now, and 59F here in Los Angeles, CA. Couldn't be happier. Nothing like being able to program with the air conditioning off in the winter. Frankly, I've really just sort of enjoyed the little things.  &lt;/p&gt; &lt;p&gt;I don't mean to gloat, but it's amazing what you take for granted when you live here. It doesn't hurt that the economy's so bad  it's sort of leveled out the prices, making parts of Los Angeles very approachable for somebody who's used to Phoenix prices.  I'm a fan of AT&amp;ampT's Uverse ISP here in Los Angeles. I had COX cable in Phoenix, AZ. I paid about $130 a month to get two DVRs, cable internet with very limited storage and no ability to share among the bedrooms and almost no channels. Not to mention, I couldn't get a static IP (the shame, the humanity!) without a business account, which given how little I liked them was out of the question as it would've compelled me to accept a year long contract. Needless to say, all of that's been improved, and I pay less, and I have a much wider channel selection, to boot!  &lt;/p&gt;&lt;h2&gt;Of Web Frameworks&lt;/h2&gt; &lt;p&gt;I've had the chance to play with some very cool technologies in depth of late, one of which is Jboss Seam. I've had issues with Java Server Faces in the past, and have even spoken to some of the issues I've had, but nonetheless it works and, when taken together with something like Tomahawk, Facelets and the various Spring integrations, you can be productive using it. Naturally, JSF has it its battlegrounds, and really scalable, stateless applications with Google indexability is not one of them. Knowing that, you can get it to work. Seam rectifies some of this and worsens it, as well. I've had an amazing time sort of rethinking through problems, learning how to approach things the Seam way. If you let your mind wander, it seems like it's very easy to produce terrible code. Essentially, this stems from certain assumptions JSF, and Seam on top of it, make for you.  &lt;/p&gt; &lt;p&gt;One of them is that the HTTP Session is infinite. Seam addresses some of these issues by providing a very cool concept called a "conversation" - which I'm sure we've all seen before, but which really is quite refreshing in its application inside of Seam - which models the idea that you have a unit of work that is greater than a single request but smaller than a session. This is fine as it allows you to keep state around and use it as required and then trust that, when the conversation's finished, Seam will reap all that session memory back. Additionally, because Seam components are basically stateful session beans (unless you're using Seam POJOs, in which case they're basically stateful session beans that you can't use on another framework or EJB3 stack..) there's very little clear separation of tiers. You need to find an entity inside of a JSF action listener? Grab an entity manager and issue a query, and then add JSF validation messages if you can't find it! It almost seems like a step back, honestly.  This extra state, I find, has required me to whip out a debugger more times than I care to admit. In complex interactions it becomes very difficult to keep track of preconditions and postconditions for a given interaction.  &lt;/p&gt;&lt;p&gt;The real shame to me as a person who is very fond of &lt;a href="http://www.theserverside.com/tt/articles/article.tss?l=jBPMandSpring"&gt;jBPM&lt;/a&gt;,  Seam doesn't force the concept of conversational state far enough down the throat of the users. JBPM is definitely well integrated, but it's not required. It's also very possible to eschew altogether jPDL based Seam navigation, which makes for an application that has complex continuations and state without rail guards within which to advance. Anyway, giving it credit where credit is due, it's definitely better than raw JSF. I've also come to very much like Ajax4JSF and RichFaces. Part of me cringes when I realize that even simple Ajax requests are basically re rendering the whole page (or, rather, most of the body and several additional script tags), and in the process making the net burden of a given interaction with the server for certain pages on the order of several megabytes of un-cacheable Ajax JavaScript and HTML. The other part of me is utterly stunned with the richness of the results. It does, really, work. Taken together with some of the awesome features Seam itself provides (why couldn't they have just chosen Tapestry? Such apparently talented people working on JSF seems like a crime...) &lt;/p&gt;&lt;p&gt;I can't help but feel, sometimes, that we're heading down the path of ASP.net with JSF. ASP.net is a component based framework, and component based frameworks like Wicket, JSF, and Tapestry all fundamentally are familiar to somebody who knows ASP.net. ASP.net has a slew of components that you can use and which rammed a lot of state down the clients throat to keep the illusion that the programmer was dealing with a Windows Form application. This worked well until, one day, you wanted to override a style attribute on some component that had inline the CSS and no assigned ID. Now, you were fighting with the framework to restore your will. In this way, I feel like JSF is very similar. When I use Ajax4JSF, RichFaces, and Seam in general I am able to easily forget that I'm working n top of a statless protocol where every request has absolutely no idea what happened just one request before it but for the graces of a cookie or a state field in the request. This is why ASP.net MVC was birthed, to provide an approach for those that wanted more fine grained control. In this way, the .NET community has sort of reversed our evolution in the Java community, going from the action-oriented Strutses and Webworks and even Spring MVC, to the componented oriented JSF, Wicket, Tapestry and GWTs of the world.   &lt;/p&gt;&lt;p&gt;Using JSF/Seam,  I even forget about the cost of state a little bit. State's what it's all about. The Seam proponents will insist that storing state on the HTTP session is far more efficient than in the database, which is inherently less scalable. In theory, I agree with this. However, Seam still hits the database for non cached data (if you have that setup!), and you're still not excused from reconciling optimistic lock exceptions using Seam, and it leaves you with an HTTP Session brimming with state and a HTML that can easily grow to be several megabytes for midly complex UI interactions and their components.  &lt;/p&gt;&lt;p&gt;I have met people who were under the illusion that servlets (raw servlets) had a session by default, that it was to be taken for granted. I've spent a long time building applications where the goal was to avoid the session at all costs, until absolutely necessary (make your Struts beans request scope, turn of JSP sessions, and if you're going to do redirect after post, either encode the state in the redirect request or be darned sure you use what's now being called "flash" scope, session persistance in the service of just two HTTP requests. &lt;/p&gt;&lt;p&gt;Anyway, having invested so much in understanding and learning Seam, I decided I might as well give &lt;a href="http://tapestry.apache.org/tapestry5/"&gt;Tapestry 5.1&lt;/a&gt; a chance, as it's been a few years since I had a chance to work with Tapestry, and that was Tapestry 4. I always had a personal fondness for Tapestry. It's always been session friendly by default and to be efficient as a component oriented framework. This has led to some gimmicky approaches (the render/rewind cycle, and lack of support for dynamic (read: programmatic) component creation and attachment) &lt;/p&gt;&lt;p&gt;I spent a little time getting used to it. I have to tell you, given my experience with ZeroTurnaround's JavaRebel javagent for Java class reloading, I really appreciated the intrinsic support for class/component reloading in Tapestry. As a development environment goes, I haven't had this much fun since Python on a web application. Truly amazing. I was somewhat disappointed to see that Tapestry has slackened it's feverish refusal to use the session, and made everything redirect after post unless specified otherwise. The implication here is that there's some session. It's still very efficient, and I've not caught it trying to store an entire backing bean (page or component) in the session yet! If you have a chance, I wholely and completely recommend it. It's lacking support for the things JAWR (a JavaScript/CSS) compression filter) provides - though there seems to be at least some effort aimed at adding it at no additional technical cost to the developer. It just works.  &lt;/p&gt;&lt;h2&gt; The World At Large &lt;/h2&gt;&lt;p&gt;I sat, jaw agape, as the rumor milled tossed around the notion that IBM would buy Sun, and wondered what would become of some of the interesting technologies inside Sun. Imagine my surprise when I woke to find the rumors quashed and Sun bought, by Oracle of all things! I couldn't believe it. &lt;a href="http://www.theserverside.com/news/thread.tss?thread_id=54827"&gt;Larry Ellision&lt;/a&gt; took the stage at JavaOne and reaffirmed interest in JavaFX. JavaFx is one of the few decent options we have in the Java client landscape, and even if I never write an application in JavaFx itself (I once tripped and learned ActionScript 3 and Flex programming, and I don't think I could see the value in switching now..), the work done to support JavaFX has been a boon for the JVM/JDK. Hopefully, this innovation will continue.  &lt;/p&gt;&lt;p&gt;SpringSource has been doing a lot of great things of late. &lt;a href="http://www.springsource.org/roo"&gt;Spring Roo&lt;/a&gt; is a promsing mechanism by which useful prototype applications can be created on the fly, a sort of Spring-y version of Rail's application generarots. Spring IDE being released for free, which is a boon as somebody who's used OSGi without good tooling, and - most interesting to me - I discovered Spring Workflow, which looks very promising indeed. I am a huge fan of a good BPM engine, and it's something fundamentally hard to do correctly. Enterprise BPM engines are even harder. Hopefully, &lt;a href="http://www.springsource.org/extensions/se-workflow"&gt;Spring Workflow&lt;/a&gt; will remedy some of this. Finally, I couldn't help but note the amazing progress of &lt;a href="http://www.springsource.org/node/1482"&gt;Spring Python.&lt;/a&gt;  I &lt;i&gt;adore&lt;/i&gt; Python, and have used it &lt;i&gt;in anger&lt;/i&gt; many, many times over the last decade. It's never failed me. I'm pleased to see Spring's offerning not merely being a Java-Spring that happens to be written in Python. This framework seems to be geared towards the Python way, even going so far as to remind people  in the (incredible) documentation that if nothing else, the libraries Spring Python provides can, and very well may be, used independant of any XML format! &lt;/p&gt; &lt;/p&gt;&lt;p&gt;Additionally, May saw the debut of Google Wave, which seems to be an incredibly cool platform on which to build. I'll be very interested to see what comes of this.  &lt;/p&gt;&lt;p&gt;I wonder what the next month will bring. I'll do my best to keep this blog up to date. I've heads down on a lot of work, and a few cool surprises I'll share when appropriate.  By the by, I encourage you to follow me on Twitter at &lt;a href="http://twitter.com/starbuxman"&gt;http://twitter.com/starbuxman&lt;/a&gt;.  &lt;/p&gt;</summary>
    <dc:date>2009-06-05T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Moving to Los Angeles.</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/moving_to_los_angeles.html" />
    <author>
      <name />
    </author>
    <modified>2009-04-06T00:00:00Z</modified>
    <issued>2009-04-06T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; What a month! &#xD;
&#xD;
 I know this is a little late, but boy has it been a crazy month! April's shaping up to be no less crazy, too. &lt;/p&gt;&#xD;
&#xD;
 &lt;p&gt;  First, there was much ado about nothing early in the month when the court in Tempe, Arizona scheduled me for jury duty only to relieve me of it the day-of.  &#xD;
&#xD;
 &lt;/P&gt;&#xD;
&lt;p&gt; Then, on March 17th, I drove to Las Vegas for &lt;i&gt;the conference&lt;/i&gt;  -  my first big speech  - &lt;a href="http://javasymposium.techtarget.com/html/architecture.html#JLongEAI"&gt;at the The ServerSide Java Symposium&lt;/a&gt; in Las Vegas (which reminds me, I need to remove that banner on the right side of the page... ) which went off fine enough. More usefully, I have  some very interesting new friends.   I was especially happy to have had a chance to see the   &lt;a href="http://www.mandalaybay.com/entertainment/sharkreef.aspx"&gt;Mandalay Bay Aquarium,&lt;/a&gt; which was amazing. &#xD;
&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt; From Las Vegas, I drove to Los Angeles, CA to meet my friend Srinivas who I'd invited to join me for a weekend there. We drove 500 miles in 2 days just inside of Los Angeles, and another 400 when we shared the drive home to Phoenix, Arizona. We went to the Laugh Factory and were delighted to find that Dane Cook was a special, secret guest-of-honor. Awesome! &lt;/p&gt; &#xD;
&#xD;
&lt;p&gt; &#xD;
Then, I came home. I had given notice at my job at Wells Fargo and so the last week of March I spent closing up shop there and preparing for the next step. March 31st was my last, very sad day at Wells Fargo. I said good bye to everyone -- good people I should like very much to keep in contact with -- and packed up a few computers and books (and clothing, I suppose.) and drove to Los Angeles (again!) to start a new job there April 1. My wife and I are moving here, but the first step is getting out here and finding a place to live and so on. At the moment, I'm staying with family and my wife will join me soon. &lt;/p&gt; &lt;p&gt;These last few days have all about getting into the new job - interesting people there, too - and reuniting with some old friends. &lt;/p&gt;&lt;p&gt;Boy, am I glad to be back!&lt;/p&gt;</summary>
    <dc:date>2009-04-06T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>The Times, They Are A Changing</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/the_times_they_are_a_changing.html" />
    <author>
      <name />
    </author>
    <modified>2009-03-15T00:00:00Z</modified>
    <issued>2009-03-15T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; Not to cheapen such an awesome Bob Dylan song, but I felt it was a propos... &#xD;
 Things are really going to be busy pretty soon. &#xD;
&lt;/p&gt; &lt;p&gt; Lot's of things are happening in my life right now. It's going to be a pretty turmultuous two months.&#xD;
 &lt;/p&gt;    &lt;P&gt;For someone who's adamant about encouraging change, and reacting gracefully to change in the software development lifecycle, I'm about to be put to the test.&#xD;
 My wife and I are moving to Los Angeles, CA, where I'm from.&#xD;
&#xD;
 This will put us closer to family.&#xD;
 	As I move forward and start speaking and doing more open source in my career, I don't want my vacation time to be spent just going to see family if I can instead spend it going to more conferences and being involved in the software world. &lt;/P&gt;&lt;P&gt;It's a very interesting time to be in software: I haven't felt like this since the late 90s.&#xD;
 &lt;/p&gt;&lt;p&gt;&#xD;
  		I've resigned my current position at my job and am looking forward to the next opportunity.&#xD;
&#xD;
  		I expect I'll be challenged, and hopefully given a chance to&#xD;
  		institute oositive change.Getting to that opportunity, could be ... tedious, however. State or continental moves are always challenging.   &lt;/p&gt;&#xD;
&#xD;
&lt;P&gt; In the more immediate short term I'm looking forward to The Server Side Symposium in Vegas this week! &lt;a href="http://javasymposium.techtarget.com/html/speakers.html#JLong"&gt;I'm speaking&lt;/a&gt; on EAI and &lt;a href="http://www.springsource.org/spring-integration"&gt;Spring Integration&lt;/a&gt;, in particular. It's a very promising new technology and I hope to encuourage people to check it out. If you're coming and you want to read some more on it, there's always the site I just linked to, as well as an article I wrote about it a little while ago, &lt;a href="http://www.infoq.com/articles/Spring-Integration-Joshua-Long"&gt;"Getting Started With Spring Integration,"&lt;/a&gt; on Infoq.com. I definitely encourage you to check those out.&#xD;
&lt;/P&gt;&#xD;
&lt;p&gt; By the by, anybody know of what parties / events are happening after the event?&#xD;
	I'd love to meet and greet any of you who are going to be there.&#xD;
&lt;/P&gt;&#xD;
&#xD;
&lt;p&gt; After that, it's off to Los Angeles, where I'll be advance scouting for a place to stay. If anybody wants to grab a beer while I'm there, let me know. I can be reached at josh 'at' my domain name. Or, contact me on &lt;a href="http://www.twitter.com/starbuxman"&gt;Twitter&lt;/a&gt;.&#xD;
&lt;/P&gt;</summary>
    <dc:date>2009-03-15T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Embedding The Apache Mina FTP Server</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/embedding_the_apache_mina_ftp_server.html" />
    <author>
      <name />
    </author>
    <modified>2009-03-08T00:00:00Z</modified>
    <issued>2009-03-08T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;I had the requirement to provision users of a system with an FTP solution. I wanted something lightweight and very configurable. I chose to embed &lt;a href="http://mina.apache.org/ftpserver/downloads.html"&gt;The Apache Mina FTP Server&lt;/a&gt; since it's flexible, imminently hackable,  (it's written in Java and is deployed using Maven and Spring) and embeddable. This entry is about that process.&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt; Essentially, I didn't want to have to wrap it in a layer of abstraction just to support adding and removing users and configuration options like their home directory. It also had to be flexible, as there may be different requirements down the line oriented towards security. &lt;/p&gt;&lt;p&gt;&#xD;
&#xD;
My use case is simple: I want to build  a processing pipeline for images (who doesn't?). I want users of the system to be able to login to an FTP with their same credentials and upload media. On the server, &lt;a href="http://www.springsource.org/spring-integration"&gt;Spring Integration&lt;/a&gt; will watch for uploads and send off a message to the message queue which is where the BPM engine sits, and is waiting to begin image processing on inbound images.&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt; What could be simpler? In this blog entry, I will only discuss addressing the first requirement: provisioning system users with accounts on an FTP server.&#xD;
&lt;/p&gt;&#xD;
&#xD;
 &lt;p&gt; I did look at some other alternatives, namely HermesFTP and AxlRadius, which seemed both to be interesting projects. I really have no opinions  for  - or against - them, Apache just has the backing foundry's name and more sophisticated documentation.&lt;/p&gt;&#xD;
&#xD;
&#xD;
&lt;P&gt;To test, I suggest using  &lt;a href="http://filezilla-project.org/"&gt;FileZilla&lt;/a&gt;, because it's powerful, free and features  a no-pain installation for the big 3 operating systems,  &lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;&#xD;
&#xD;
 You can run the application as a stand alone server, but I'm running it as process that piggybacks the web application. In this blog, I'll simply introduce using it a   simple &lt;code&gt;public static void main(String [] args)&lt;/code&gt; context.&#xD;
&#xD;
&lt;/p&gt;&#xD;
&lt;h2&gt;Installation&lt;/h2&gt;&#xD;
&lt;p&gt; Getting the server is easy, as I'm using Maven. Below are the dependency elements to add to a POM if you don't already have them. Note the strangeness with &lt;code&gt;slf4j&lt;/code&gt;. I don't know if you'll encounter any issues with it in your configuration. My setup was riddled with ClassNotFound exceptions, and the configuration resolved them. You may very well be able to remove the exclusion from the &lt;code&gt;org.apache.ftpserver&lt;/code&gt; dependency as well as the two explicit  dependencies on &lt;code&gt;slf4j&lt;/code&gt; at the top.&#xD;
          I don't include the Spring framework dependencies here, but I do make use of Spring 2.5.x, though I suspect this would run just fine with Spring 2.0. Your mileage may vary.&#xD;
&lt;PRE&gt;&lt;code&gt;&#xD;
        &amp;lt;dependency&amp;gt;&#xD;
            &amp;lt;groupId&amp;gt;org.slf4j&amp;lt;/groupId&amp;gt;&#xD;
            &amp;lt;artifactId&amp;gt;slf4j-api&amp;lt;/artifactId&amp;gt;&#xD;
            &amp;lt;version&amp;gt;1.5.3&amp;lt;/version&amp;gt;&#xD;
        &amp;lt;/dependency&amp;gt;&#xD;
        &amp;lt;dependency&amp;gt;&#xD;
            &amp;lt;groupId&amp;gt;org.slf4j&amp;lt;/groupId&amp;gt;&#xD;
            &amp;lt;artifactId&amp;gt;slf4j-log4j12&amp;lt;/artifactId&amp;gt;&#xD;
            &amp;lt;version&amp;gt;1.5.3&amp;lt;/version&amp;gt;&#xD;
        &amp;lt;/dependency&amp;gt;&#xD;
        &amp;lt;dependency&amp;gt;&#xD;
            &amp;lt;groupId&amp;gt;org.apache.ftpserver&amp;lt;/groupId&amp;gt;&#xD;
            &amp;lt;artifactId&amp;gt;ftpserver-core&amp;lt;/artifactId&amp;gt;&#xD;
            &amp;lt;version&amp;gt;1.0.0&amp;lt;/version&amp;gt;&#xD;
            &amp;lt;exclusions&amp;gt;&#xD;
                &amp;lt;exclusion&amp;gt;&#xD;
                    &amp;lt;groupId&amp;gt;org.slf4j&amp;lt;/groupId&amp;gt;&#xD;
                    &amp;lt;artifactId&amp;gt;slf4j-api&amp;lt;/artifactId&amp;gt;&#xD;
                &amp;lt;/exclusion&amp;gt;&#xD;
            &amp;lt;/exclusions&amp;gt;&#xD;
        &amp;lt;/dependency&amp;gt;&#xD;
&#xD;
&lt;/code&gt;&lt;/pRE&gt;&#xD;
&lt;/p&gt;&#xD;
&#xD;
&lt;h2&gt;Code&lt;/h2&gt;&#xD;
&lt;p&gt; Now that the JARs are in place, you need some a Java class to launch it and some configuration.&#xD;
&#xD;
The java code is below. It loads the Spring application context and punts the chore of configuring the server to it and the Spring XML file I've setup, &lt;code&gt;ftp-server.xml&lt;/code&gt;. Once a freshly obtained instance of the server is obtained, the server is started.&#xD;
&lt;pre&gt;&lt;code&gt;&#xD;
package com.foo.integrations.ftp;&#xD;
&#xD;
import org.apache.ftpserver.FtpServer;&#xD;
import org.springframework.context.ApplicationContext;&#xD;
import org.springframework.context.support.ClassPathXmlApplicationContext;&#xD;
&#xD;
public class Main {&#xD;
    public static void main(String[] args) throws Throwable {&#xD;
        ApplicationContext classPathXmlApplicationContext =&#xD;
           new ClassPathXmlApplicationContext("ftp-server.xml");&#xD;
        FtpServer ftpServer = (FtpServer)&#xD;
           classPathXmlApplicationContext.getBean("server");&#xD;
        ftpServer.start();&#xD;
    }&#xD;
}&#xD;
&lt;/code&gt;&lt;/pre&gt;.&#xD;
&#xD;
&lt;/p&gt;&#xD;
&#xD;
&lt;h2&gt;Configuration&lt;/h2&gt; &lt;P&gt; The configuration's the most involved bit, but should be pretty self explanatory shortly. It's included below. The FTP server exposes configuration using a Spring XML Schema, which acts as something of a DSL in this case.&#xD;
The XML configures the server instance, tells it to defer authentication to a database. It seems like the component provide is expecting data to be available in a table called ftp_user. In this case I modeled a table called ftp_user and created columns in it for testing. The final solution will either be a view on top of existing data that vends the table and columns expected by the component, or a series of triggers that keep a real &lt;code&gt;ftp_user&lt;/code&gt; table in sync with the canonical user/password and status data in other tables.&#xD;
I'm not sure which is more performant, and will address that later. It should be evident how that might work, I hope. In the code below you can see we're giving the database authentication component the SQL queries to use. I'm not sure I want to keep the delete/update functionality in place there. I don't think it's accessible from the FTP protocol, but instead there are APIs that Mina ships with, and I think use of those APIs delegates to these queries.&#xD;
&lt;/p&gt; &lt;p&gt;  The &lt;code&gt;dataSource&lt;/code&gt; is just like any other dataSource inside of Spring. I'm not using the Apache Commons Connection Pool class here because I didn't want to require more jars for you, dear reader, to try this example out. But use your judgment. If your application server requires something else, then use that.  &lt;/p&gt;&#xD;
&#xD;
&lt;P&gt;Finally,&#xD;
a word about directories. Below, in the &lt;code&gt;&amp;lt;select-user&amp;gt;&lt;/code&gt; configuration, I return a result set that contains a column &lt;code&gt;homedirectory&lt;/code&gt;. The home directory in this case is not an Operating System home directory (~, for example), but instead the directory the logged in user should be dropped. Here I'm using ficticious UNIX path and suffixing it with the user's ID. The user ID and the path are then returned as the home directory when the user tries to login. As it's configured now, if the user's folder doesn't exist on login then Mina FTP server will create it. This behavior is controllable  by setting the &lt;code&gt;create-home&lt;/code&gt;  attribute on the &lt;code&gt;native-filesystem&lt;/code&gt; element below.&#xD;
&lt;/p&gt;&lt;p&gt;&#xD;
I tested this code on Unix and Windows. I set it to run on port 2121, so that I wouldn't have to get access to the privileged port 21 on Unix. The configuration for that is on the &lt;code&gt;nio-listener&lt;/code&gt; element. The other interesting behavior which only became evident to me when, surprisingy, it still worked on Windows, is that the path &lt;code&gt;/folder/to/store.. &lt;/code&gt; resolved under Windows! Now, I'm not sure if &lt;code&gt;java.io.File&lt;/code&gt; has some intrinsic support for POSIX-style paths, or there's some handler registered by cygwin on my particular system, or what, but I tried opening up a grails console and verifying the absolute path of a &lt;code&gt;java.io.File&lt;/code&gt; object for "/" and sure enough it returned "C:". So, don't worry if you want to test this on either operating system, I guess!&#xD;
&#xD;
&lt;/p&gt;&#xD;
 &lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&#xD;
&amp;lt;beans:beans xmlns="http://mina.apache.org/ftpserver/spring/v1"&#xD;
             xmlns:beans="http://www.springframework.org/schema/beans"&#xD;
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&#xD;
             xmlns:tx="http://www.springframework.org/schema/tx"&#xD;
             xmlns:aop="http://www.springframework.org/schema/aop"&#xD;
             xsi:schemaLocation=" http://www.springframework.org/schema/beans&#xD;
             http://www.springframework.org/schema/beans/spring-beans-2.0.xsd&#xD;
             http://www.springframework.org/schema/tx&#xD;
             http://www.springframework.org/schema/tx/spring-tx-2.0.xsd&#xD;
             http://www.springframework.org/schema/aop&#xD;
             http://www.springframework.org/schema/aop/spring-aop-2.0.xsd&#xD;
             http://www.springframework.org/schema/lang&#xD;
             http://www.springframework.org/schema/lang/spring-lang-2.0.xsd&#xD;
             http://mina.apache.org/ftpserver/spring/v1&#xD;
             http://mina.apache.org/ftpserver/ftpserver-1.0.xsd "&amp;gt;&#xD;
    &amp;lt;beans:bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"&amp;gt;&#xD;
        &amp;lt;beans:property name="driverClassName" value="JDBC_DRIVER"/&amp;gt;&#xD;
        &amp;lt;beans:property name="url" value="JDBC_URL"/&amp;gt;&#xD;
        &amp;lt;beans:property name="username" value="YOUR_USER"/&amp;gt;&#xD;
        &amp;lt;beans:property name="password" value="YOUR_PASSWORD"/&amp;gt;&#xD;
    &amp;lt;/beans:bean&amp;gt;&#xD;
    &amp;lt;server id="server"&amp;gt;&#xD;
        &amp;lt;listeners&amp;gt;&#xD;
            &amp;lt;nio-listener name="default" port="2121"&amp;gt;&amp;lt;/nio-listener&amp;gt;&#xD;
        &amp;lt;/listeners&amp;gt;&#xD;
        &amp;lt;db-user-manager encrypt-passwords="clear"&amp;gt;&#xD;
            &amp;lt;data-source&amp;gt;                &amp;lt;beans:ref bean="dataSource"/&amp;gt;&#xD;
            &amp;lt;/data-source&amp;gt;&#xD;
            &amp;lt;insert-user&amp;gt;INSERT INTO FTP_USER ( user_id, user_password, home_directory,&#xD;
                enable_flag, write_permission,&#xD;
                idle_time, upload_rate, download_rate ) VALUES ('{userid}', '{userpassword}', '{homedirectory}',&#xD;
                '{enableflag}', '{writepermission}', {idletime}, {uploadrate}, {downloadrate})&#xD;
            &amp;lt;/insert-user&amp;gt;&#xD;
            &amp;lt;update-user&amp;gt;UPDATE FTP_USER SET user_password&#xD;
                ='{userpassword}',home_directory='{homedirectory}',enable_flag={enableflag},&#xD;
                write_permission={writepermission},idle_time={idletime},&#xD;
                upload_rate={uploadrate},download_rate={downloadrate}&#xD;
                WHERE user_id='{userid}'&#xD;
            &amp;lt;/update-user&amp;gt;&#xD;
            &amp;lt;delete-user&amp;gt;DELETE FROM FTP_USER WHERE user_id = '{userid}'&amp;lt;/delete-user&amp;gt;&#xD;
            &amp;lt;select-user&amp;gt;SELECT user_id as userid, 100000 as maxloginperip ,&#xD;
                100000 as maxloginnumber , user_password as&#xD;
                userpassword, '/folder/to/store/files/uploads/'|| user_id as homedirectory, true as&#xD;
                enableflag, true as writepermission, true as readpermission, 100000 as idletime, 100000 as uploadrate,&#xD;
                100000 as downloadrate FROM FTP_USER WHERE user_id = '{userid}'&#xD;
            &amp;lt;/select-user&amp;gt;&#xD;
            &amp;lt;select-all-users&amp;gt;SELECT user_id FROM FTP_USER ORDER BY user_id&amp;lt;/select-all-users&amp;gt;&#xD;
            &amp;lt;is-admin&amp;gt;SELECT user_id as userid FROM FTP_USER WHERE user_id='{userid}' AND user_id='admin'&amp;lt;/is-admin&amp;gt;&#xD;
            &amp;lt;authenticate&amp;gt;SELECT user_password as userpassword from FTP_USER WHERE user_id='{userid}'&amp;lt;/authenticate&amp;gt;&#xD;
        &amp;lt;/db-user-manager&amp;gt;&#xD;
        &amp;lt;native-filesystem case-insensitive="false" create-home="true"/&amp;gt;&#xD;
    &amp;lt;/server&amp;gt;&#xD;
&amp;lt;/beans:beans&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&#xD;
&#xD;
&lt;p&gt;All in all, I'd say using the FTP Server's been pleasant - except for the ugliness concerning &lt;code&gt;slf4j&lt;/code&gt; - and I hope it works for you. I am well aware of the availability of other FTP servers that support database backends, but I really was looking for something lightweight and embeddable, and ideally something I could unit test in Java. This worked out well. It's interesting to see how much of our own dogfood we Java developers manage to get away with using. I used Apache's James email server several years ago. It was very powerful and not a little bit complicated, but it worked, and it was all Java. It scaled and was also very robust, and even with it's wharts was still easier to get working than &lt;code&gt;sendmail.&lt;/code&gt; So: I use a Java editor, Java web /application server, Java middleware, Java build tools, Java FTP servers and even a Java text editor. I should really start looking into H2 or Derby and see if I can't close the gap on a completely Java infrastructure stack! It'd be freaking sweet if I could &lt;code&gt;mvn clean install&lt;/code&gt; an entire environment (which, for that matter doesn't care which host operating system it's on...)&#xD;
&#xD;
 &lt;/p&gt; &lt;p&gt; Now to begin the count down to having a completely Groovy based stack! &lt;/p&gt;</summary>
    <dc:date>2009-03-08T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>The West Wing, House MD, and MythBusters</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/the_west_wing_house_md_and_mythbusters.html" />
    <author>
      <name />
    </author>
    <modified>2009-03-03T00:00:00Z</modified>
    <issued>2009-03-03T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt;&lt;img style = "float:left;padding-right:10px;" width  = "200" src = "/jl/media/4747.jpg"/&gt; My favorite show on television used to be &lt;i&gt;&lt;a href="http://en.wikipedia.org/wiki/The_West_Wing"&gt;The West Wing&lt;/a&gt;&lt;/i&gt;. The show was witty, and featured arcane, blissfully self contained plots and narrative.. dialogue... banter that would tickle Shakespeare. It was amazing. It was an ideal view of the White House and the men and women inside the executive branch. There were, with rare exceptions, no ludity, no over-the-top romances, no digressions into the characters' personal lives. Except, of course, where these digressions served the episode's plot. The plot - the challenges these characters faced in day-to-day governance - was the only thing respected. &lt;/p&gt; &lt;p&gt; It appealed to me in the same way that &lt;i&gt;&lt;a href="http://en.wikipedia.org/wiki/Watchmen"&gt;The Watchmen&lt;/a&gt;&lt;/i&gt; (which, btw, I'm going to see tomorrow, days ahead of the US premiere!) appealed to me. It was layered, multi faceted. Each episode featured many continuations that - while they often dovetailed nicely one with another by the end of an episode - didn't always have anything to do with each other in substance. Every show was like an essay. The series took the art of narrative to a new form, and entire episodes were often just very ornate interjections into an argument or discussion. People walking, and talking.&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt; My new favorite TV series is with no qualifications &lt;a href="http://en.wikipedia.org/wiki/House_(TV_series)"&gt;&lt;i&gt;House&lt;/i&gt;&lt;/a&gt;. I noticed that a lot of other nerds/engineer types like this show, as well. Follow any sampling of the programming world on twitter and you'll see people speaking to their fondness for the show in 140 character exclamations. It's riveting for a problem solver. Dr. Gregory House is a diagnostician in  at the ficticious Princeton Plainsboro Teaching Hospital where he and his team tackle medical mysteries deemed otherwise unsolvable. House's character is &lt;i&gt;brisk&lt;/i&gt;, lacking all tact. He doesn't suffer fools, hates wishy-washy ideas founded on expressions of feeling. He is a scientist to the last, often refusing to even see his patients and instead letting the symptoms - the facts - stand on their own.&#xD;
 &lt;/p&gt;&lt;p&gt; He would make  a very fine programmer. He is the quintessential "debugger."&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt; The Wikipedia page I linked you to elaborates on some of the parallels between House's character, a doctor, and Sherlock Holmes, a detective. Their staunch adherence to the facts, their disinterests in what people say or think, and their abilities of deduction.&#xD;
Apparently, Sherlock Holmes himself was based on a doctor, so it's something of a full circle.&#xD;
&lt;/p&gt; &lt;p&gt; Now, I'm wondering what other shows are popular among nerds. I appreciate shows that can pull off the art of satire, of deadpan, well. I also love shows with strong "whodunnit" plots. I appreciate shows aimed at resolution of issues. I love MythBusters. I appreciate shows dripping in irony, and really like a lot of the programs on the BBC, because a lot of that sort of humor is unavailable here in the states.&lt;/p&gt;&lt;p&gt;What do other people watch? What kind of show is interesting to a nerd?&lt;/p&gt;</summary>
    <dc:date>2009-03-03T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>And... we're back!</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/and_were_back.html" />
    <author>
      <name />
    </author>
    <modified>2009-02-26T00:00:00Z</modified>
    <issued>2009-02-26T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; A lengthy upgrade process caused my blog to die, but it's back! &lt;/P&gt; &#xD;
&#xD;
&lt;p&gt;  Usually when I upgrade the software it's not so big a deal, but this version introduced  a few new components into the architecture, which complicated things.  I really ought to open-source this sucker. &#xD;
&#xD;
&lt;/p&gt; &lt;p&gt;Anyway, there's very little that you - dear reader - would likely see in the new software. But stick around, that's to come! &lt;/p&gt;</summary>
    <dc:date>2009-02-26T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Obsolescence of Skills</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/obsolescence_of_skills.html" />
    <author>
      <name />
    </author>
    <modified>2009-02-24T00:00:00Z</modified>
    <issued>2009-02-24T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;h1&gt;&#xD;
&#xD;
&lt;/h1&gt;&#xD;
&lt;p&gt;In my last post I talked about habits geared towards acquisition of&#xD;
skills. It does sometimes happen the other way – where you need to&#xD;
unlearn something, or re-frame an existing skill in a different way in&#xD;
order to advance with it. This is a natural part o moving forward in&#xD;
life, of adapting. I like to think that I do an acceptable job of&#xD;
keeping current, of adapting.&#xD;
&lt;/p&gt;&lt;p&gt;The proof is in the pudding: how many skills do I have the have&#xD;
been obsolesced*? I hadn't counted, honestly. I'm still not going to&#xD;
count (not that you will see, anyway!) but you might try taking a look&#xD;
at the &lt;a href="http://www.obsoleteskills.com/skills/skills"&gt;Obsolete&#xD;
Skills Wiki&lt;/a&gt; to see if anything you've learned has become&#xD;
irrelevant, and whether you've successfully crossed that chasm.&#xD;
&lt;/p&gt;&lt;p&gt;&#xD;
Don't freak out if you see something you swore was still relevant –&#xD;
some of the entries are on the site, but are disputed! &lt;/p&gt;&lt;p&gt;&#xD;
Some are pretty dead on, or scary. &lt;a&#xD;
href="http://www.obsoleteskills.com/skills/countingbackchange"&gt;"Counting&#xD;
back change"&lt;/a&gt; is - saddeningly - appropriate. How many merchants do&#xD;
you know that employee people who can count back change? How many&#xD;
people do the math to leave a 20% tip?  &lt;/p&gt;&lt;p&gt;&#xD;
How many things do you know that have become irrelevant?  &lt;/p&gt;&#xD;
&#xD;
&#xD;
&lt;hr /&gt;&#xD;
 &lt;p&gt;&lt;i&gt;obsolesce &lt;/I&gt;- become obsolete, fall into disuse; "This word&#xD;
has not obsolesced, although it is rarely used"&lt;/p&gt;&#xD;
 &lt;p&gt; Has the word "obsolesce" ... obsolesced?&lt;/p&gt;</summary>
    <dc:date>2009-02-24T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>A Weekend With the Voices</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/a_weekend_with_the_voices.html" />
    <author>
      <name />
    </author>
    <modified>2009-02-21T00:00:00Z</modified>
    <issued>2009-02-21T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; My lovely and charming wife is out of town for 5 days, helping my mother out. They're going to go to Philadelphia, and my wife'll get a chance to see some of New York City, as well. &#xD;
 I'm excited for her, and happy that my mom invited her, but I'm most looking forward to the chance to get some code done unabated by distractions of living with somebody: synchronized meals, activities, favorite TV shows, etc. No disractions. &#xD;
 Not if I can help it. &#xD;
 &lt;/p&gt; &#xD;
 &lt;p&gt; Often, I will run across an idea or concept that I'd like to explore but don't have the time to immediately pursue. I acrrue these ideas in an email thread sent to myself.  I call it my "negative resume" - a listing of all the things I don't have any experience and can't claim to know. &#xD;
 &lt;/p&gt;&#xD;
  &#xD;
 &lt;p&gt;When that list gets too long (for me that's about 10 items), I start popping things off the queue, attacking each entry. The items on the list are usually innocuous. Occasionally I'll add significant changes / ideas that involve starting in on a rapidly new technology. In this case I make sure to either qualify a very specific, obtainable success scenario, or I diminish the other suggestions and move them to another list. &#xD;
  In a way, the process is very much like updating a bug tracker. &lt;/p&gt;&#xD;
  &#xD;
  &lt;p&gt; I'm tracking bugs in my knowledge. Deciding which bug to remedy first requires prioritization. &#xD;
  &#xD;
  &#xD;
 &lt;/p&gt; &#xD;
 &lt;p&gt;You can imagine how complicated this process was before I added, "learn basics of Project Managment" to a list!&lt;/p&gt;&#xD;
 &lt;p&gt;The last list  included the following: "try out H2 database",  "See if you can get Seam Framework 2.0 working under Maven," "check out  Hibernate Search," "Read a few chapters from Manning's &lt;i&gt;iPhone In Action&lt;/i&gt;," and so on. I don't like to let more than 10 things accrue because then there's no chance I could get it push through all of them in a weekend - even with intense focus (which I am not usually blessed with on weekends, above and beyond my day-job hours. )&lt;/p&gt;  &#xD;
 &#xD;
 &lt;p&gt; The sentiment behind these bursts of learning is simple. As my dad always said (I'm sure he still does, he's just no had reason to recite of late...): "It's a sinch by the inch, hard by yard." &#xD;
 &#xD;
  &lt;/p&gt; &#xD;
  &#xD;
  &lt;p&gt; This weekend I've got another such list. I'm looking forward to address some of the items on this list with no direction or instinct besides the chorus of prioritizing voices in my head.  &lt;/p&gt; &lt;p&gt; What do you want to learn?&lt;/p&gt;</summary>
    <dc:date>2009-02-21T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Mobile News Recap</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/mobile_news_recap.html" />
    <author>
      <name />
    </author>
    <modified>2009-02-18T00:00:00Z</modified>
    <issued>2009-02-18T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;&#xD;
As I like to do every now and then I'm checking into the world of mobile. Theres been a flurry of activity in this space recently, so it's high time I recap, lest I forget. Among the headlines: Adobe announces massive Flash Mobile deployments: iPhone not accounted for, WebKit's just about the official  mobile platform browser of choice, though irrelevant for mobile platform development, and finally JavaFX Mobile announced (surprisingly) amidst questions of relevance. &#xD;
&lt;/p&gt;&lt;p&gt;&#xD;
Let's tackle each of these one by one. &#xD;
&lt;/p&gt;&lt;p&gt;&#xD;
First, Adobe's FlashPlayer 10 for SmartPhones debuts. Adobe has also unveiled eBook and PDF Mobile support. Palm's joining the OpenScreen project – Adobe's initiative to bring Flash to the handset as a platform (announced later last year) and finally Flash 10 itself will ship on the Palm Pre, which lends big name brawn to Flash's platform claims. This, and a lot more, is &lt;a href="http://scobleizer.com/2009/02/15/did-adobe-snub-apple-with-flashplayer-10-and-development-fund-announcements/"&gt;recapped here on Scoble's site.&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&#xD;
&#xD;
All of this brings to the foreground just how prevalent the WebKit platform is. WebKit's now the main browser agent on Apple's iPhone in the form of Safari. It's the browser on Google's Android platform, as Chrome. It's the WebOS on Palm. Nokia's Series 60's using it, and a lot more. This means that a consistant browsing experience can be had on many of the new smartphones. Missing from that lineup, curiously, is the Storm. I expect that it'll catch up, eventually, though in the meantime I think there are other issues more prominent in deterring users of the &lt;a href="http://www.msnbc.msn.com/id/28158098"&gt;"Flopberry"&lt;/a&gt;. &#xD;
&lt;/p&gt;&lt;p&gt;&#xD;
Having said all of this, don't get too excited. The presence of this browser doesn't mean what it would if a browser shared that level of prominence on the desktop specifically because a browser simply isn't rich enough to model typical mobile application development scenarios. Things like backgrounding – the ability of a client to "pause" during a phone call - and "actions" or "intents" are simply something that must be modeled at a lower level closer to the firmware. &#xD;
&lt;/p&gt;&lt;p&gt;&#xD;
The only thing potentially helpful is that your investment in languages that terminate statements with ";" is safe! Today, the modern development environment – with the glaring exception of the iPhone – is Java (though not the JME platform!) or JavaScript. The iPhone of course requires Objective C.&lt;/p&gt;&lt;p&gt; &#xD;
&#xD;
Adding another Java platform to the roster, JavaFX 1.1 was just announced and with it news of release and adaptation plans for JavaFX Mobile. Information on the main site (http://www.javafx.com) is sparse, but the list of &lt;a href="http://www.javafx.com/partners"&gt;partners is interesting&lt;/a&gt;: LG, Sony Ericsson, among them. It'll be interesting to see what traction this platform gets especially in light of Flash Mobile and the iPhone. &#xD;
&#xD;
&lt;/p&gt;</summary>
    <dc:date>2009-02-18T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Getting Started With Zero Turnaround's JavaRebel</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/getting_started_with_zero_turnarounds_javarebel.html" />
    <author>
      <name />
    </author>
    <modified>2009-02-14T00:00:00Z</modified>
    <issued>2009-02-14T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;&#xD;
I go out of my way to make the development experience quick. I'm still a java developer and not, say, a Python developer, but I loathe the iteration time. It's the number one thing I wish we could do better in Java. Sure, during development I go out of my way to make iteration less painful. One aspect of this is using Maven's Jetty plugin, which lets me edit HTML, JSP(X), CSS, JS files without undo redeploys. However, it's not enough.  I keep my model and services tier in a separate VM for testing, so that the code isn't collocated by default. This has the effect of making the occasional redeploy of a web application much more bearable.  However, even thoere, sometmes you find yourself fidgeting with things inside of an Action or a Spring MVC controller that aren't broad strokes but really sort of fine granularity changes. Each time you redeploy you lose your session and it's just generally an unnerving mental interference, even if it is only a few seconds.&#xD;
&lt;/p&gt;&lt;p&gt;&#xD;
Recently, I was trying to show this application to a friend (one of those PHP people I keep hearing about...) and he complained that the redeploys on changes to the Java class were annoying. I know he was just trying to spread some religion. That's alright. In this case, he was right. If you use a scripting language and are used to the instant feedback cycle, then Java's a hard sell (even in light of the less and less meaningful, "well, it scales," or "it has a broad library" arguments).&#xD;
&lt;/p&gt;&lt;p&gt;&#xD;
This next paragraph reads something like a sales pitch. I'm in no way affiliated with JavaRebel. You may, however, skip the next paragraph if you want.&#xD;
&lt;/p&gt;&lt;p&gt; &lt;a href="http://www.zeroturnaround.com"&gt;&lt;img border = "0" src = "/jl/media/3602.gif" style = "float:left; margin-right :10px; " /&gt;&lt;/a&gt;&#xD;
I'd heard of, and even experimented with, JavaRebel before when it came out, so I knew of the solution. My main reservation was that it was proprietary. There's a US $99.00 personal license fee to pay in its use. However, the license wasn't a license for deployment, it was a license for development, in much the same way you can deploy a million instances of software written using one license for IntelliJ IDEA, the same applies here. Additionally, the jar doesn't need to be deployed in the production artifact. You carry it with you and use it on any development. As tools go for engineers - it's really cheap. I already spend on (or win! Thank you &lt;a href="http://www.phxjug.org"&gt;Phoenix Java User Group!&lt;/a&gt; ) copies of IntelliJ because as a craftsman I demand the best tools. An extra US $99.00 for hassle-free development seemed a great compromise. More to the point, there's a proven productivity gain had in zero turnaround development iteration from other languages, so this would only be a win-win for any projects I worked under. I might even be able to pitch it to a boss one day and get them to spring for it!&#xD;
&lt;/p&gt;&lt;p&gt;&#xD;
&#xD;
At this point I decided I'd need to walk the walk if I want to talk the talk. I set about integrating it. My setup's pretty plain:&#xD;
&lt;/p&gt;&lt;p&gt;&#xD;
&lt;ul&gt; &lt;LI&gt;&#xD;
Maven 2.0.8&lt;/li&gt;&lt;li&gt;&#xD;
IntelliJ IDEA 8.1 for edits (by the by, have you tried the new &lt;a href="http://www.intellij.com"&gt;IntelliJ&lt;/a&gt;? Markedly faster, in some cases especially related to large projects.)&#xD;
&lt;/li&gt;&lt;li&gt;&#xD;
Java 5 &lt;/li&gt;&lt;li&gt;&#xD;
Spring MVC 2.5&lt;/li&gt;&lt;/ul&gt;&#xD;
&lt;p&gt;&#xD;
My definition of success would be to be able to update a Controller, compile that one class, and then refresh the page and have those changes reflected. This meant that all code relying on Spring itself should also work. For example&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;&#xD;
You can declare variables to be injected into you controller via annotations.&#xD;
&lt;/p&gt;&#xD;
&#xD;
&lt;code&gt;&lt;pre&gt;@Autowired private IServiceInterface service;&lt;/pre&gt;&lt;/code&gt;&#xD;
&lt;p&gt;&#xD;
And, similarly, you can add new configurations for Spring MVC requests inside a Controller with no problem, thus:&#xD;
&lt;/p&gt; &lt;code&gt;&lt;pre&gt;&#xD;
@RequestMapping("foo.do")&#xD;
public String handleRequestForFooDo( Model model) {&#xD;
  model.addAttribute( "message", "Hello, World!" ) ;&#xD;
 return "foo" ;&#xD;
 }&#xD;
 &lt;/pre&gt;&lt;/code&gt;&#xD;
 &lt;p&gt;Both of these code snippets should just do the right thing and work when I refresh the page.  &lt;/p&gt;&#xD;
 &lt;p&gt;&#xD;
&#xD;
So, the first part of the solution was getting JavaRebel installed for development at all.&#xD;
&lt;/p&gt;&lt;p&gt;&#xD;
This was relatively straight forward. Go to zeroturnaround.com and &lt;a href="http://www.zeroturnaround.com/download"&gt;download the Jar for the trial.&lt;/a&gt; Unzip it and put the &lt;code&gt;javarebel.jar&lt;/code&gt; someplace you can find it.  I created a folder called javarebel in my home directory and put the jar in there. You will put the license in the same folder if you buy the product.&#xD;
&lt;/p&gt;&lt;p&gt;&#xD;
The next trick is to make sure it's available to your Java server's process as a boot agent. Since I'm using Maven's Jetty plugin, my configuration was simply to update &lt;code&gt;MAVEN_OPTS&lt;/code&gt;, before running Maven, thus:&#xD;
&lt;/p&gt; &lt;code&gt;&lt;pre&gt;&#xD;
export MAVEN_OPTS="-noverify -Drebel.log=true -javaagent:~/javarebel/javarebel.jar "     ;&#xD;
mvn jetty:run ;&#xD;
&lt;/pre&gt;&lt;/code&gt;&#xD;
&lt;p&gt;&#xD;
This is already an improvement.&#xD;
&lt;/p&gt;&lt;p&gt;&#xD;
I did one more thing, which was to disable Intellij's urge to build a .war itself each time I compiled anything. Do this by right clicking on the web application in Intellij, File &gt; Project Structure, clicking on the Web component of your web project (it's a blue icon.), then clicking on Java EE Build Settings. I unchecked both "Create web facet war file", and "Web Facet Exploded Directory."&#xD;
&lt;/p&gt;&lt;p&gt;&#xD;
At this point, if I modify a class in IntelliJ (say I have a controller open and I change a method body) the change will be manifest if I reload the controller in the browser. However, if I add any new fields, or change any method signiatures, it won't be reflected in the reloaded class because Spring won't have had a chance to "refresh" the class. Any annotations for Spring injections will be there, but the Spring runtime won't have had the chance to react to them.&#xD;
&lt;/p&gt;&lt;p&gt;&#xD;
So the next piece is to ensure you give Spring a chance to react to the new class. This is done using a plugin. The plugin's free open source software, which you can download readily from &lt;a href="http://www.zeroturnaround.com/javarebel/plugins"&gt;here&lt;/a&gt;. You can add the plugin however you like. I'm using Maven. While I know that ZeroTurnaround has a repository, I found that the jar didn't work. So, I just downloaded that one and deployed it to my own repository and dependended on that .jar, which has worked just fine. At this point, I can now edit a controller in Intellij, including addding methods, etc, without more than a compile (&lt;code&gt;ctrl + shift + F9&lt;/code&gt;) - it's tantamount to the time it'd take to save a class in Eclipse) and a page refresh.&#xD;
&lt;/p&gt;&lt;p&gt;&#xD;
Hope this helps somebody else looking for information on how to get started. This is really quite powerful.&#xD;
&lt;/p&gt;</summary>
    <dc:date>2009-02-14T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Revised Spring Integration Maven &lt;code&gt;pom.xml&lt;/code&gt; Example</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/revised_spring_integration_maven_codepomxmlcode_example.html" />
    <author>
      <name />
    </author>
    <modified>2009-02-04T00:00:00Z</modified>
    <issued>2009-02-04T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; I published an article on &lt;a href="http://www.infoq.com/articles/Spring-Integration-Joshua-Long"&gt;Infoq.com recently&lt;/a&gt;.&#xD;
The code was sound but it used the cock-a-many OSGi friendly&#xD;
 Maven jar dependencies that were being provided off the Spring Source Maven repository.&#xD;
 	The problem was that these jars were custom to SpringSource's build of the product. If you had&#xD;
 	an existing Spring application and then you introduced the Spring Integration jars it would&#xD;
 	bring down a different set of jars -- possibily conflicting with your existing jars' classes.&#xD;
&#xD;
It wasn't addressable using Maven's &lt;code&gt;dependencyManagement&lt;/code&gt; element either, as the &lt;code&gt;artifactId&lt;/code&gt;s were different.&#xD;
&#xD;
A bug was &lt;a href="http://jira.springframework.org/browse/INT-245"&gt;filed&lt;/a&gt;. Finally - and regretfully after the article was beyond my editorial control  - the correct&#xD;
 jars are in the public Maven repository using the correct for the Spring Framework proper.&#xD;
 &lt;/p&gt; &lt;p&gt;What follows is my sample POM for another project. Use it at your discretion. Please note that in this case &lt;code&gt;&amp;lt;spring.version&amp;gt;&lt;/code&gt; is &lt;code&gt;2.5.6&lt;/code&gt; and &lt;code&gt;&amp;lt;spring.integration.version&amp;gt;&lt;/code&gt; is &lt;code&gt;&lt;b&gt;1.0.1.RELEASE&lt;/b&gt;&lt;/code&gt;. That updated version is the release that contains the corrected revisions. Upgrade time!&#xD;
&lt;pre&gt;&#xD;
    &amp;lt;dependencies&amp;gt;&#xD;
             &amp;lt;dependency&amp;gt;&#xD;
                 &amp;lt;groupId&amp;gt;log4j&amp;lt;/groupId&amp;gt;&#xD;
                 &amp;lt;artifactId&amp;gt;log4j&amp;lt;/artifactId&amp;gt;&#xD;
                 &amp;lt;version&amp;gt;1.2.14&amp;lt;/version&amp;gt;&#xD;
             &amp;lt;/dependency&amp;gt;&#xD;
             &amp;lt;!-- COMMONS STUFF --&amp;gt;&#xD;
             &amp;lt;dependency&amp;gt;&#xD;
                 &amp;lt;groupId&amp;gt;commons-lang&amp;lt;/groupId&amp;gt;&#xD;
                 &amp;lt;artifactId&amp;gt;commons-lang&amp;lt;/artifactId&amp;gt;&#xD;
                 &amp;lt;version&amp;gt;2.2&amp;lt;/version&amp;gt;&#xD;
             &amp;lt;/dependency&amp;gt;&#xD;
             &amp;lt;dependency&amp;gt;&#xD;
                 &amp;lt;groupId&amp;gt;commons-io&amp;lt;/groupId&amp;gt;&#xD;
                 &amp;lt;artifactId&amp;gt;commons-io&amp;lt;/artifactId&amp;gt;&#xD;
                 &amp;lt;version&amp;gt;1.1&amp;lt;/version&amp;gt;&#xD;
             &amp;lt;/dependency&amp;gt;&#xD;
             &amp;lt;dependency&amp;gt;&#xD;
                 &amp;lt;groupId&amp;gt;commons-collections&amp;lt;/groupId&amp;gt;&#xD;
                 &amp;lt;artifactId&amp;gt;commons-collections&amp;lt;/artifactId&amp;gt;&#xD;
                 &amp;lt;version&amp;gt;3.2&amp;lt;/version&amp;gt;&#xD;
             &amp;lt;/dependency&amp;gt;&#xD;
             &amp;lt;dependency&amp;gt;&#xD;
                 &amp;lt;groupId&amp;gt;commons-beanutils&amp;lt;/groupId&amp;gt;&#xD;
                 &amp;lt;artifactId&amp;gt;commons-beanutils&amp;lt;/artifactId&amp;gt;&#xD;
                 &amp;lt;version&amp;gt;1.7.0&amp;lt;/version&amp;gt;&#xD;
             &amp;lt;/dependency&amp;gt;&#xD;
             &amp;lt;!-- SPRING FRAMEWORK --&amp;gt;&#xD;
             &amp;lt;dependency&amp;gt;&#xD;
                 &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;&#xD;
                 &amp;lt;artifactId&amp;gt;spring-context&amp;lt;/artifactId&amp;gt;&#xD;
                 &amp;lt;version&amp;gt;${spring.version}&amp;lt;/version&amp;gt;&#xD;
             &amp;lt;/dependency&amp;gt;&#xD;
             &amp;lt;dependency&amp;gt;&#xD;
                 &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;&#xD;
                 &amp;lt;artifactId&amp;gt;spring-webmvc&amp;lt;/artifactId&amp;gt;&#xD;
                 &amp;lt;version&amp;gt;${spring.version}&amp;lt;/version&amp;gt;&#xD;
             &amp;lt;/dependency&amp;gt;&#xD;
             &amp;lt;dependency&amp;gt;&#xD;
                 &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;&#xD;
                 &amp;lt;artifactId&amp;gt;spring-context-support&amp;lt;/artifactId&amp;gt;&#xD;
                 &amp;lt;version&amp;gt;${spring.version}&amp;lt;/version&amp;gt;&#xD;
             &amp;lt;/dependency&amp;gt;&#xD;
             &amp;lt;dependency&amp;gt;&#xD;
                 &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;&#xD;
                 &amp;lt;artifactId&amp;gt;spring-core&amp;lt;/artifactId&amp;gt;&#xD;
                 &amp;lt;version&amp;gt;${spring.version}&amp;lt;/version&amp;gt;&#xD;
             &amp;lt;/dependency&amp;gt;&#xD;
             &amp;lt;dependency&amp;gt;&#xD;
                 &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;&#xD;
                 &amp;lt;artifactId&amp;gt;spring-aop&amp;lt;/artifactId&amp;gt;&#xD;
                 &amp;lt;version&amp;gt;${spring.version}&amp;lt;/version&amp;gt;&#xD;
             &amp;lt;/dependency&amp;gt;&#xD;
             &amp;lt;dependency&amp;gt;&#xD;
                 &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;&#xD;
                 &amp;lt;artifactId&amp;gt;spring-aspects&amp;lt;/artifactId&amp;gt;&#xD;
                 &amp;lt;version&amp;gt;${spring.version}&amp;lt;/version&amp;gt;&#xD;
             &amp;lt;/dependency&amp;gt;&#xD;
 	  		&amp;lt;dependency&amp;gt;&#xD;
 				&amp;lt;groupId&amp;gt;org.springframework.integration&amp;lt;/groupId&amp;gt;&#xD;
 				&amp;lt;artifactId&amp;gt;spring-integration-core&amp;lt;/artifactId&amp;gt;&#xD;
 				&amp;lt;version&amp;gt;${spring.integration.version}&amp;lt;/version&amp;gt;&#xD;
 			&amp;lt;/dependency&amp;gt;&#xD;
 			&amp;lt;dependency&amp;gt;&#xD;
 				&amp;lt;groupId&amp;gt;org.springframework.integration&amp;lt;/groupId&amp;gt;&#xD;
 				&amp;lt;artifactId&amp;gt;spring-integration-httpinvoker&amp;lt;/artifactId&amp;gt;&#xD;
 				&amp;lt;version&amp;gt;${spring.integration.version}&amp;lt;/version&amp;gt;&#xD;
 			&amp;lt;/dependency&amp;gt;&#xD;
 			&amp;lt;dependency&amp;gt;&#xD;
 				&amp;lt;groupId&amp;gt;org.springframework.integration&amp;lt;/groupId&amp;gt;&#xD;
 				&amp;lt;artifactId&amp;gt;spring-integration-file&amp;lt;/artifactId&amp;gt;&#xD;
 				&amp;lt;version&amp;gt;${spring.integration.version}&amp;lt;/version&amp;gt;&#xD;
 			&amp;lt;/dependency&amp;gt;&#xD;
 			&amp;lt;dependency&amp;gt;&#xD;
 				&amp;lt;groupId&amp;gt;org.springframework.integration&amp;lt;/groupId&amp;gt;&#xD;
 				&amp;lt;artifactId&amp;gt;spring-integration-jms&amp;lt;/artifactId&amp;gt;&#xD;
 				&amp;lt;version&amp;gt;${spring.integration.version}&amp;lt;/version&amp;gt;&#xD;
 			&amp;lt;/dependency&amp;gt;&#xD;
 			&amp;lt;dependency&amp;gt;&#xD;
 				&amp;lt;groupId&amp;gt;org.springframework.integration&amp;lt;/groupId&amp;gt;&#xD;
 				&amp;lt;artifactId&amp;gt;spring-integration-adapter&amp;lt;/artifactId&amp;gt;&#xD;
 				&amp;lt;version&amp;gt;${spring.integration.version}&amp;lt;/version&amp;gt;&#xD;
 			&amp;lt;/dependency&amp;gt;&#xD;
        &amp;lt;/dependencies&amp;gt;&#xD;
        &lt;/pre&gt;</summary>
    <dc:date>2009-02-04T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Dust</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/dust.html" />
    <author>
      <name />
    </author>
    <modified>2009-02-04T00:00:00Z</modified>
    <issued>2009-02-04T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;Sometimes people tell me, "Josh, you're an idiot!" Then I have myself a good cry and walk it off.&#xD;
&lt;/p&gt; &lt;p&gt;&#xD;
 Then people ask me about the 7-node grid I keep in my home office. &lt;/p&gt; &lt;p&gt;They wonder why I would keep that many computers in so small a space. They wonder, "why?"&#xD;
 Besides providing something of an electric heater (the room's consistently 10F warmer than the rest of the place!), the computers let me test algorithms/concepts in scale. Frameworks like &lt;a href="http://terracotta.org/"&gt;Teracotta&lt;/a&gt; don't test very consistently on a single node, after all. And, of course, there's nothing like having 2TB of space exposed as one giant mount.&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;Finally, people ask me if there are any disadvantages. They ask if the electric bill's high. It isn't, but that's a side effect of living in Arizona, where my air conditioner's on 24/7 and so an extra few computers doesn't really make a difference.&#xD;
&#xD;
 They ask if I spend my time maintaining them.I tell them I run &lt;a href="http://en.wikipedia.org/wiki/Ubuntu"&gt;Ubuntu&lt;/a&gt;, so I never get viruses. If a PC malfunctions then I simply repair it and reimage the node.&#xD;
&#xD;
 They press me. Surely there's &lt;i&gt;something&lt;/i&gt; disadvantageous to running so many computers. I tell them the honest truth. It's the &lt;a href="http://en.wikipedia.org/wiki/Dust"&gt;dust&lt;/a&gt;. The dust alone is the reason I want to just invest in EC2. And of course, I'm an asthmatic &lt;b&gt;and&lt;/b&gt; a green fiend. So I can't use the aerosol canisters to dispel the dust. Nor can I use the Ozone-friendly canisters -- they both trigger my asthma or offend my green sensibilities. So, I have to clean them with a rag on occasion (once every couple of weeks).&#xD;
&#xD;
&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;Next time I get a home office, I'm going to get it with tile. Remember, if you're going to setup a grid, the biggest challenge you face may not be technical.&#xD;
&lt;/p&gt;</summary>
    <dc:date>2009-02-04T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>"Scalability Is Not An Architectural "Capabity" Anymore," on Artima.com</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/scalability_is_not_an_architectural_capabity_anymore_on_artimacom.html" />
    <author>
      <name />
    </author>
    <modified>2009-02-02T00:00:00Z</modified>
    <issued>2009-02-02T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">I've just posted a new blog entry on my Artima.com blog: &lt;a href="http://www.artima.com/weblogs/viewpost.jsp?thread=248983"&gt;"Scalability Is Not An Architectural "Capabity" Anymore"&lt;/a&gt;. Any input's appreciated.</summary>
    <dc:date>2009-02-02T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>My Favorite Month</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/my_favorite_month.html" />
    <author>
      <name />
    </author>
    <modified>2009-01-31T00:00:00Z</modified>
    <issued>2009-01-31T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;&#xD;
&lt;img alt ="This is Pancit. I'm vegetarian, so there's no Shrimp or sausage in the variety I eat. But still: yummy!" style = "float:left; margin-right:10px;" width ="300" src="/jl/media/3227.jpg"/&gt;Today - the 31st of January  - is my birthday. I celebrated it by sharing a wonderful meal of Pancit (http://en.wikipedia.org/wiki/Pancit ) with my amazing wife last night, and then finally going to see &lt;a href="http://en.wikipedia.org/wiki/Russell_Peters"&gt;Russel Peters&lt;/a&gt;  last night at the Improv at the invitation of my good friend Venkatesh. That was probably the hardest I've laughed in a month. My brother from another mother Mario took me out drinking last night afterwards, and the fact that I don't remember much of it attests to how well we did!&#xD;
&lt;/p&gt;&lt;p&gt;January 31st's also my dad's birthday! Yes, that's right, I was an awkward birthday gift :-) He's 71, now. Astonishing. I'm very surprised that a man's years can so belie a man's youth. I hope everybody gets to be as interesting, and wonderful a man as he is - even once in there lives. I love my dad very much, and owe a large debt of gratitude to him. I wouldn't be the man I am without his unique contributions. I'll be going to Los Angeles next Friday to see him. I can't wait.&#xD;
&lt;/p&gt;&lt;p&gt;January in recent years has become more involved because there are two new special occasions to celebrate.&#xD;
&lt;/p&gt;&lt;p&gt;My buddy's daughter Makani - a light in dark, boring times - joined the eternal conversation of life on January 26th, 2007. She's one year old now. Long may she live, and smile.  I don't normally like babies. It's not that I dislike them - I just don't know what to do with them. This one's different. She's humbling. She inspires. I can't believe it's been one year, and I can't believe she's come as far as she has. She's been 100 different Makanis over the last year - constantly, and manifestly, evolving and growing. Part of that is biological imperative. Part of that is... something else altogether miraculous.&#xD;
&lt;/p&gt;&lt;p&gt;Finally, my wonderful, beautiful wife and I married 2 years ago, January 13th, 2007. I'm excited, exhilarated, by how fast time flies when I'm with her. She's indulgent and patient. It's like she read &lt;a href="http://www.randsinrepose.com/archives/2007/11/11/the_nerd_handbook.html"&gt;The Nerd Handbook&lt;/a&gt; and understood it, perfectly. Frankly, it's more amazing than that: I know she &lt;i&gt;hasn't&lt;/i&gt; read that particular bit of HTML. She just gets it. Thank you.&#xD;
&lt;/p&gt;&lt;p&gt;&lt;b&gt;Here's to January&lt;/b&gt;.&lt;/p&gt;</summary>
    <dc:date>2009-01-31T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Thinking About Meebo's Enterprise Service Bus</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/thinking_about_meebo_s_enterprise.html" />
    <author>
      <name />
    </author>
    <modified>2009-01-27T00:00:00Z</modified>
    <issued>2009-01-27T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt;I don't know if they're using an ESB, but they should be.&#xD;
&lt;/P&gt;&lt;P&gt;Meebo.com's a very novel little Ajax-oriented IM client. It's acheived some stunning success, all very well deserved. Recently (a few weeks ago), I noticed Meebo.com has added support for talking to Facebook as well as MySpace users via their presence-aware messaging feature ("Instant Messaging"). This means that they're exposing connectivity with services provided by the platform. They built their previou lot of IM connectivity/functionality using a concurrency-friendly version of libpurple (&lt;a href="http://en.wikipedia.org/wiki/Meebo"&gt;This article on Meebo on WikiPedia metnions that&lt;/a&gt;, and so does &lt;a href="http://blog.meebo.com/?p=126"&gt;these&lt;/a&gt; &lt;a href="http://blog.meebo.com/?p=428"&gt;two&lt;/a&gt; from Meebo's Blog). &lt;code&gt;libpurple&lt;/code&gt; is the library behind the ubiquitous F/OSS &lt;a href="http://www.pidgin.im/"&gt;Pidgin (formerly, GAIM)&lt;/a&gt;. Essentially, it knows how to speak/receive messages from all sorts of IM protocols/platforms.  &#xD;
&#xD;
&lt;/p&gt;  &#xD;
&lt;P&gt; I want to take this opportunity to imagine their architecture a little bit, and explore it as an ideal  candidate for an ESB-based solution. Architecting an application like that requires some of the features that an ESB best provides: messaging, routing, transformation. &lt;/p&gt;&lt;p&gt; The &lt;b&gt;messaging&lt;/b&gt; quality I attribute to their natural requirement to send and receive messages. Their application has endpoints that know how to "receive" messages and endpoints that know how to "send" messages. That these endpoints are written on top of &lt;code&gt;libpurple&lt;/code&gt; or on top of the &lt;a href="http://developers.facebook.com"&gt;Facebook Chat&lt;/a&gt; and &lt;a href="http://developer.myspace.com/community"&gt;MySpace IM API's&lt;/a&gt; is irrelevant.&#xD;
  &lt;/p&gt;  &lt;p&gt;Naturally, Meebo needs to provide &lt;b&gt;routing&lt;/b&gt;. It wouldn't be kosher if you sent a message to &lt;i&gt;Fred&lt;/I&gt;, and a complete stranger &lt;i&gt;Wilma&lt;/I&gt; got it!&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt; Finally, Meebo must provide support for &lt;b&gt;transformation&lt;/b&gt; - I can only imagine - if for no other reason than that's a requirement in the &lt;a href="http://www.eaipatterns.com/CanonicalDataModel.html"&gt;Canonical Data Model Pattern&lt;/a&gt;, which describes integration across many disparate endpoints made possible by reducing the permuations of connective channels. This is feasible by having all endpoints "adapted" into a normalized message format. All channels to and from those endpoints undertand this format. This makes adding a new endpoint as simple as adding an adapter from its format to the normalized system format. Thus, for Meebo, it is imperative that for any messages being passed from point to point, the message model itself is normalized and then pased on to a channel bound for an adapter. This avoids "&lt;i&gt;architectural spaghetti!&lt;/I&gt;"&lt;/P&gt;&#xD;
&lt;p&gt;&#xD;
    Finally, their architecture must make use of certain design patterns, for example a &lt;a href="http://www.eaipatterns.com/CorrelationIdentifier.html"&gt;correlation ID&lt;/a&gt; would be invaluable in a cloud application where anybody can send messages at any time but they must consistantly show up in a normalized sequence for all clients of the discussion involved.  &#xD;
&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;&#xD;
  I don't know what Meebo's made of, though I am happy to speculate. Plenty of people have tried to build solutions, like &lt;a href="http://soashable.sourceforge.net"&gt;SOAShable&lt;/a&gt;, for example, which has since stopped functioning. But, it's a good start at the project, and is worth a look. There are other explanations of some of the hard core nitty gritty behind Meebo. One such article, &lt;a href="http://news.oreilly.com/2008/07/how-comet-brings-instant-messa.html"&gt;How Comet Brings Instant Messaging To Meebo&lt;/a&gt;, is a good read. Finally, to see how some of this might be implemented it's worth noting that there's already support for some of this functionality in a few different ESBs. &lt;a href="http://ankiewsky.blogspot.com/2008/12/integrating-xmpp-into-jboss-esb.html"&gt;Here's an example using XMPP and JBoss ESB&lt;/a&gt;. &lt;a href="http://www.google.com/url?sa=U&amp;start=2&amp;q=http://www.mulesource.org/display/MULE2USER/XMPP%2BTransport&amp;ei=86F_SbDsKpmRmQeanp2tBA&amp;sig2=iKUf0hUSAa17G9xPbd9ebw&amp;usg=AFQjCNEjeFLNFj1KDsIpcdSFVI4qRNcUwQ"&gt;This example  provides XMPP support for the popular Mule ESB&lt;/a&gt;.  Who knows, perhaps with a little work and some C I'm sure you could get a server-ready, concurrency friendly version of &lt;code&gt;libpurple&lt;/code&gt; running yourself!  &#xD;
&lt;/p&gt; &lt;p&gt; Just food for thought.. &lt;/p&gt;</summary>
    <dc:date>2009-01-27T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Whatever is Ray Ozzie Going To Do?</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/whatever_is_ray_ozzie_going.html" />
    <author>
      <name />
    </author>
    <modified>2009-01-26T00:00:00Z</modified>
    <issued>2009-01-26T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;&#xD;
I'm catching up on some of my reading (more on that later). I was reading the&#xD;
December issue of&#xD;
&lt;a href=http://www.wired.com/techbiz/people/magazine/16-12/ff_ozzie?currentPage=all id=lvmq title=WIRED&gt;WIRED&lt;/a&gt;.&#xD;
I don't envy Ray Ozzie his situation. He's the new chief software architect at&#xD;
Microsoft (taking over Bill's job). Questions need to be asked about whether&#xD;
Microsoft's viability is certain. Ozzie is himself a wunderkind that Bill Gates&#xD;
hs called the "one of the top five programmers in the universe". Certainly,the&#xD;
proof is in the pudding. He invented Lotus Notes based on the research and&#xD;
learning environment Plato (see this&#xD;
&lt;a href=http://thinkofit.com/plato/dwplato.htm id=b4ro title="good article"&gt;good&#xD;
article&lt;/a&gt; ), which he tinkered with during his college years. As an aside, I&#xD;
note that the WIRED article attributes&#xD;
&lt;a href=http://www.pwc.com/ id=hah: title="Price Waterhouse"&gt;Price&#xD;
Waterhouse&lt;/a&gt;'s purchase of Notes as a turning point for Ozzie and his work one&#xD;
that eventually made it attractive to IBM, which then bought Lotus two years&#xD;
later. My mother worked at Price Waterhouse during that time, and I remember her&#xD;
having this incredible workgroup software on her laptop. It was only later that&#xD;
I'd understand how powerful it was. Now, Ozzie isn't just changing the face of&#xD;
office workgroups, he's chaning the landscape of the computer desktop in&#xD;
general, and he's got to do it through Windows and Office.&lt;/p&gt;  &lt;p&gt;&#xD;
He's come on strong. In 2005 he wrote, and with Bill Gates, sent a memo to high&#xD;
level executives at Microsoft whose purpose was two-fold: evaluate the current&#xD;
situation and landscape and map out what the future holds. He was writing on he&#xD;
money in describing the next computing platform as a cloud based paradigm. The&#xD;
latest and greatest out of Redmond confirms this. A lot of the stuff that was&#xD;
supposed to be in Vista, including a cohesive service-oriented platform, seems&#xD;
to be present in this new version of Windows,&#xD;
&lt;a href=http://www.microsoft.com/azure/default.mspx id=g3j9 title="Windows Azure"&gt;Windows&#xD;
Azure&lt;/a&gt;. It seeks to make the internet as much a fiber of the next generation&#xD;
of applications as an operating system's kernel is today.&lt;/p&gt;  &lt;p&gt;&#xD;
He's also previewed the cloud-friendly version of Office. For a good review,&#xD;
check out this&#xD;
&lt;a href=http://channel9.msdn.com/posts/PDCNews/First-Look-Office-14-for-Web/ id=a1s1 title="MSDN webcast"&gt;MSDN&#xD;
webcast&lt;/a&gt;. The cloud-friendly Office -- honestly, Linux and Java zealot that I&#xD;
am -- looks really cool. The idea is that you can drift between the web, the&#xD;
web, and the mobile version of the client. Finally, communal workflows are&#xD;
supported natively -- they're showcasing examples where somebody makes a change&#xD;
in a thick client and that change is propogated instantly to the ajax version of&#xD;
a document. I'd love to see how that particular ESB's being secured. I wonder if&#xD;
it's channeled centrally through Microsoft's servers, or if it's installable on&#xD;
the client's servers? I know they mentioned Sharepoint, but I genuinely hope&#xD;
they don't compel users to buy that whole boondoggle of a stack just to get the&#xD;
integration features. 'Sides, what am I griping about? And, really, perhaps I'm&#xD;
not their customer anyway. I'm using&#xD;
&lt;a href=http://extensions.services.openoffice.org/project/ooo2gd id=xyqd title="OpenOffice and Google Docs to write this"&gt;OpenOffice&#xD;
and Google Docs to write this&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&#xD;
But the question is -- is it too late?&#xD;
&lt;a href=http://docs.google.com id=ftau title="Google Docs"&gt;Google Docs&lt;/a&gt; is&#xD;
already thoroughly entrenched, and even Apple's&#xD;
&lt;a href=http://www.apple.com/iwork/ id=c3g5 title=iWork&gt;iWork&lt;/a&gt;&#xD;
/&lt;a href=http://www.apple.com/ilife/ id=p5_8 title=iLife&gt;iLife&lt;/a&gt; suite are in&#xD;
the cloud already.&#xD;
&lt;a href=http://www.iTunes.com id=uulm title=iTunes&gt;iTunes&lt;/a&gt;, the number one&#xD;
music application and service by far, has been a thick-client/cloud hybrid since&#xD;
day one, and has been doing it successfully. Even infrastructure has&#xD;
successfully, and comercially, been made available through services like&#xD;
&lt;a href=http://code.google.com/appengine/ id=ybg_ title="Google's App Engine"&gt;Google's&#xD;
App Engine&lt;/a&gt; and&#xD;
&lt;a href=http://aws.amazon.com/ec2/ id=v66t title="Amazon EC2"&gt;Amazon EC2&lt;/a&gt;.&#xD;
The list goes on and on (photo albums, email, etc.) for all the things Microsoft&#xD;
might do that it doesn't do. It seems like the only thing they have left,&#xD;
realistically, is the operating system itself. And in this respect, perhaps&#xD;
Windows Azure is viabe. After all, I haven't yet heard about a cloud-oriented&#xD;
version of OS X or Linux, though I'm not sure what makes Azure cloud-friendly in&#xD;
the first place.&lt;/p&gt; &lt;p&gt; Perhaps he can turn the ship around. So far, I'm impressed with what I've seen. &#xD;
 What, exaclty, does "success" look like for Microsoft, though? &#xD;
&lt;/p&gt;</summary>
    <dc:date>2009-01-26T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>If You Build It, They Will Come: Communally Crazy</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/if_you_build_it_they.html" />
    <author>
      <name />
    </author>
    <modified>2009-01-25T00:00:00Z</modified>
    <issued>2009-01-25T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; Do the web 2.0 communities remind any one else of the glory days of the wild dot-com boom (and bust?) of the early 2000s? &lt;/p&gt;&#xD;
&lt;P&gt; The communal web (isn't that redundant?) has inspired so many different applications that one wonders why any startup would want for  a business model. Upstart and favorite Twitter just raised &lt;A HREF="http://www.techcrunch.com/2009/01/24/twitter-raising-new-cash-at-250-million-valuation"&gt;250 million US&lt;/A&gt;   through an unknown VC. Meebo &lt;A HREF="http://techland.blogs.fortune.cnn.com/2008/04/30/meebo-snags-25-million"&gt; went through similar&lt;/A&gt;  rounds of funding a year ago. At the time, it was unclear what the business model behind the then naked/unadorned Ajax-powered IM client would be. Twitter, with a similarly large proliferation, faces the same question: what is the business model? Meebo.com solved the problem by adding advertising to its property, which works well because the property is what the users interact with. Twitter, I imagine, is something that people use from their cell phones, from desktop rich clients like Spaz and Twitterific, and so on. Twitter is the network, not the home page. I don't know - short of suffixing every 140 character update with an ad on all outbound messages ? how they can monetize it. &lt;/P&gt;&#xD;
&lt;P&gt;  &#xD;
But, as we've seen time and time again, if you build it, they will come. Or, they will build it on top of what you built. Or something. Twitter is valuable as it's become the standard bearer for any type of "status" requirement. &lt;A HREF="http://www.facebook.com/apps/application.php?id=2231777543"&gt;Facebook&lt;/A&gt;,  &lt;A HREF="http://www.plaxo.com"&gt;Plaxo.com&lt;/A&gt;, etc, all incorporate it. You can embed a Twitter status on your home page, should you like. It's become an platform for an essential part of a community: presence. &lt;/P&gt;&#xD;
&lt;P&gt;  &#xD;
In the same vein, Facebook has become so menacing a threat to established giant MySpace by encouraging development on top of its platform, where MySpace had done everything possible to thwart it. MySpace failed to provide an API and a marketplace for such improvements. There were ambitious ?hacks? that tried to integrate with the site, but were ceremonially squashed through MySpace's various ?security? enhancements. This is the same tact that Microsoft took with Windows in its early growth: it made development on top of Windows a very cheap proposition and promised an entrenched market for those applications. &#xD;
Now a days it seems like Facebook integration's de rigueur, an absolute must for any application wishing to get off the ground and into the hands of a large audience quickly. There's also a cross pollination between larger apps, such as the one between the various applications on the Facebook platform itself and other standalone services, like Yelp.com, or the new &lt;A HREF="http://losangeles.beta.citysearch.com/listings?geoId=56050&amp;what=restaurants&amp;where=los+angeles,+ca"&gt;Citysearch beta&lt;/A&gt;. &lt;/P&gt;&#xD;
&lt;P&gt;  &#xD;
There's no way to monetize these integrations in of themselves except that they broaden the applicability of the application.  &lt;/P&gt;&#xD;
&lt;P&gt;  &#xD;
The iPhone has had a simialar effect; it's marketplace has birthed many different applications that have been carried to exorbitant levels of profitability simply by being accessible to the audience that the iPhone application marketplace carries with it. Witness: the &lt;A HREF="http://blog.wired.com/gadgets/2008/12/iphone-fart-app.html "&gt;iFart application&lt;/A&gt;.&lt;/p&gt;&lt;P&gt; &#xD;
This all makes me wonder: are we seeing another dot-com boom? Do these new folksonomy-based applications rely on a quality that isn't by itself profitable and achieve profitability solely through VC investment? &lt;/P&gt;</summary>
    <dc:date>2009-01-25T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>New article on Infoq.com</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/new_article_on_infoq_com.html" />
    <author>
      <name />
    </author>
    <modified>2009-01-20T00:00:00Z</modified>
    <issued>2009-01-20T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; I wrote an article about getting started with Spring Integration, available at &lt;a href="http://www.infoq.com/news/2009/01/Spring-Integration-Joshua-Long"&gt;Infoq.com&lt;/a&gt;. If you get a chance, please check it out. &lt;/p&gt;</summary>
    <dc:date>2009-01-20T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>New Entry on Artima.com: "Modeling to Avoid Hacking Your Model in ORM Mapping Format"</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/new_entry_on_artima_com.html" />
    <author>
      <name />
    </author>
    <modified>2009-01-17T00:00:00Z</modified>
    <issued>2009-01-17T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">I just posted another blog entry on Artima.com, called "Modeling to Avoid Hacking Your Model in ORM Mapping Format," and naturally would appreciate any feedback. The entry is available &lt;a href="http://www.artima.com/weblogs/viewpost.jsp?thread=247671"&gt;here.&lt;/a&gt; The entry is a discussion on modeling, and its advantages, using either UML or ER. A solution using Maven is provided to provide a work flow using ER modeling.</summary>
    <dc:date>2009-01-17T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Web Framework Utility Llibraries: URLRewrite, JAWR, DWR, and HeaderFilter</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/web_framework_utility_llibraries_urlrewrite.html" />
    <author>
      <name />
    </author>
    <modified>2009-01-09T00:00:00Z</modified>
    <issued>2009-01-09T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;
I've had the dubious pleasure of doing some web programming in the last week (actually, 4 days) and I've had quite a few different requirements which, frankly, I was surprised to find weren't eally me by the framework I was using (Spring MVC). Instead, I came upon a sle of single-focused, quality components out there that I think ever Java web developer should have in his or her arsenal. These component usually work across frameworks and are Servlet agnostic. They seem to be reasonably well documented. While I promise I will go into great depth about them in a future post, I want to at least list them here right now i the hopes that they save some people some trouble.  &lt;/p&gt;

&lt;H3&gt;Url Rewriting For Servlets&lt;/H3&gt;
&lt;p&gt;
I've had to do some URL rewriting to support search engine optimization. SEO is something of a black art, I admit, but there' still something to be said for building your web application wit search engine navigability in mind.  Naturally, this means man things, not the least of which exposing your pages on friendly book markable URLs. Spring MVC supports accessing low level servle configuration, but what is most appropriate for this sort o requirement is mod_rewrite. Mod_rewrite let's you map URLs coming into the server and transform them into other types of URLs, which then are used to access HTTP resources on your application. I didn't have - and didn't want to commit to ? a full installation of Apache HTTPD or anything like that. Instead, I wanted something inside the servlet container. I stumbled upon &lt;a href="http://tuckey.org/urlrewrite/"&gt;UrlRewriteFilter&lt;/a&gt;. It's fairly well documented and definitely powerful enough for 80% of your usecases. It can even match against request variables. It's got support for wildcard syntax as well as regular expressions. My regex-fu was strong enough that it just made sense to use that from the get-go. &lt;/p&gt;

&lt;h3&gt;JavaScript, CSS Minification and GZIP Compression  &lt;/h3&gt;
&lt;p&gt;
I had to deploy quite a bit of CSS and JavaScript, but wanted to take advantage of the compression savings of gzip, css and JavaScript minification and of the enormous HTTP latency reduction had by consolidating my JavaScript and css into one file. Lacking the discipline and time, I turned to &lt;a href="https://jawr.dev.java.net"&gt;JAWR&lt;/a&gt;, which does all of the above an plays nicely with your choice of frameworks. It's got smarts enough that you won't have to have to deploy/build yourself, like knowing whic revision of IE 6 should not be served gzip content. I wrote about this &lt;a href="http://www.joshlong.com/jl/entry/20080412"&gt;filter before&lt;/a&gt;.  &lt;/p&gt; &lt;h3&gt;Ajax&lt;/h3&gt; &lt;p&gt;The following are pretty commonly known, but they bear repeating.
I needed to do Ajax and talk to a simple Spring bean I was exposing as a client facade from the servlet. I used a package called &lt;a href="http://directwebremoting.org"&gt;DWR&lt;/a&gt;, which stands for "Direct Web Remoting." This package has been well documented and covered elsewhere. Suffice it to say that it allows you to invoke methods on a JavaScript object from your web page and it takes care of marshaling that to the server and invoking methods on a server-side bean. It's got all sorts of options and definitely merits some investigation of your own.  &lt;/p&gt; 
 &lt;h3&gt;Performance With YSlow and &lt;code&gt;Expire Headers&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;

I wanted to make sure that any page elements I use were reasonably performant and in line with good standards like what the &lt;a href="http://developer.yahoo.com/yslow"&gt;Yslow&lt;/a&gt;  plugin from Yahoo! Recommends.  One of the main improvements was  sending &lt;code&gt;Expire Headers &lt;/code&gt; for  &lt;code&gt;*.jpgs&lt;/code&gt;, &lt;code&gt;*.gifs&lt;/code&gt;, &lt;code&gt;*.css&lt;/code&gt; and &lt;code&gt;*.js&lt;/code&gt; resources. I did this using &lt;a href="http://juliusdev.blogspot.com/2008/06/tomcat-add-expires-header.html"&gt;a very powerful filter by "Julius, A simple dev", to add headers to requests&lt;/a&gt; whose code is similar in spirit to this &lt;a href="http://www.onjava.com/pub/a/onjava/2004/03/03/filters.html"&gt;oldie but goodie by Jason Falkner&lt;/a&gt;. Either is powerful enough to do the job. 
 &lt;/p&gt;  
&lt;h3&gt;Synergies of the Solutions &lt;/h3&gt; 
&lt;p&gt; The synergy between JAWR and DWR is wonderful. DWR tends to expose your beans as JavaScript, which it dynamically writes for you. The onus is on you to include that JavaScript file in your page. So, if you have 10 server side beans and you want to talk to all of them on the client, then you'd end up with 10 different HTTP requests and JavaScript &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags. JAWR, however, sports an integration option with DWR and will treat your dynamic DWR URLs exactly as if they were standard JavaScript using special configuration elements.&lt;/p&gt;
&lt;p&gt; The synergy between JAWR and the HeaderFilter's been wonderful. JAWR's gzip compressing and minifying content. It servers content on random URLs based on a hash of the content itself. So, if content changes it gets a new URL, which is immune to the cache issue, if you need to upgrade your application. Otherwise, the existing content is cached for a long time. Beautiful! 
&lt;/p&gt;
 &lt;p&gt;What a week! I had a fascinating time building this solution. Because of all the techniques I've used, the application is now very SEO friendly, very performant (it has a grade 'B' on the YSlow plugin, which Yahoo.com itself does, as well. I wouldn't want to have had to do all that manually, though. Thanks again to the creators of those many brilliant utilities!&lt;/p&gt; 

&lt;/p&gt;</summary>
    <dc:date>2009-01-09T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>My other blog on Artima.com, and my first post, "The New Old"</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/my_other_blog_on_artima.html" />
    <author>
      <name />
    </author>
    <modified>2008-12-18T00:00:00Z</modified>
    <issued>2008-12-18T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;&lt;a href="http://www.artima.com/weblogs/viewpost.jsp?thread=245528"&gt;The
New Old&lt;/a&gt;, my first post on Artima.com&lt;/a&gt;. Check it out. Let's
talk.
&lt;/p&gt;</summary>
    <dc:date>2008-12-18T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Anyone else noticing the extreme slowness of Java applications on Ubuntu 8.10?</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/anyone_else_noticing_the_extreme.html" />
    <author>
      <name />
    </author>
    <modified>2008-12-17T00:00:00Z</modified>
    <issued>2008-12-17T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; Anyone else noticing the extreme slowness of Java applications on&#xD;
Ubuntu 8.10?  I upgraded and was expecting that the seminal Java 6u10&#xD;
(strike that!&lt;b&gt; 11! &lt;/b&gt;)  would do better than this.&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt; I was expecting draggable applets and for the performance of my&#xD;
Java applications to not deteriorate. I was disappointed on both&#xD;
fronts.&#xD;
&#xD;
If you're having issues with IntelliJ crawling, a lot of people have&#xD;
downgraded to 8.04 Ubuntu. &lt;/p&gt;</summary>
    <dc:date>2008-12-17T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Apple News, Mobile and Otherwise</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/apple_news_mobile_and_otherwise.html" />
    <author>
      <name />
    </author>
    <modified>2008-12-17T00:00:00Z</modified>
    <issued>2008-12-17T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt;&lt;img STYLE = "float:left; padding-right:10px;" width = "100"&#xD;
src="/jl/media/1762.png"/&gt;&#xD;
 &lt;a href="http://livelabs.com/seadragon-mobile/" target =&#xD;
"_blank"&gt;SeaDragon&lt;/a&gt;, an application from Microsoft that extracts&#xD;
the "Deep Zoom" component from Silver Light and enables it on an&#xD;
iPhone, has been released to the Apple Application Store (Wonders&#xD;
never cease!) because the Apple iPhone has a fantastic GPU.&#xD;
 &lt;/p&gt; &lt;p&gt;What's very interesting to me about this feature is not the&#xD;
mobile component, but &lt;a href="http://livelabs.com/seadragon-ajax/"&#xD;
target = "_blank"&gt;the ajax one&lt;/a&gt;.&#xD;
&#xD;
&#xD;
 &lt;p&gt; &lt;a href="http://www.internetnews.com/bus-news/article.php/3791651/MacPainful+Apple+Bows+Out+of+Macworld+Expo.htm"&#xD;
target="_blank"&gt;Apple, Steve Jobs, bow out of MacWorld Expo.&lt;/a&gt;&#xD;
 This fuels the usual debate on Steve Jobs' health, as usual, and&#xD;
rumors run rampant. What do you think? Sick? Disincentivized?&#xD;
 &lt;/p&gt;&#xD;
&lt;p&gt;&#xD;
       PLUS: My new favorite iPhone Application: &lt;a&#xD;
href="http://www.techcrunch.com/2008/12/16/taxi-magic-hail-a-cab-from-your-iphone-at-the-push-of-a-button/"&gt;Taxi&#xD;
Magic&lt;/a&gt;. Seriously -- how slick is that? When do you usually need a&#xD;
Taxi? When you're most impaired, likely, say perhaps after drinking?&#xD;
One button. Finally, technology for fun and profit.&#xD;
&lt;/p&gt;</summary>
    <dc:date>2008-12-17T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>A journey of a thousand miles begins with a single step: ?Programming Collective Intelligence?, by O'Reilly</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/a_journey_of_a_thousand.html" />
    <author>
      <name />
    </author>
    <modified>2008-12-17T00:00:00Z</modified>
    <issued>2008-12-17T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; Working through my reading list. You might infer that I'm a bit
behind because this review is about a book published in September of
2007.&lt;/p&gt;
&lt;p&gt;You'd be correct.&lt;/p&gt;

&lt;p&gt;"Programming Collective Intelligence" is astonishingly clear and
concise in the examples, and a brilliant introduction to the
foundations of a lot of fields of study. A well presented discussion
on many of the key items in the AI/algorithm world. Why is this so
worth repeating? Because these concepts ? genetic algorithms/ AI /
optimization, etc, are NOT common nor are they simple. Anybody who
manages to make them appear so is worth of praise. The examples are
further interesting because they're written in Python, which is as
simple as a language can get. (Digression: Python 3.0's out! How come
I didn't see a flurry of news? How come there was no ball drop in
Times Square? I'm excited, and proportionately confused by some
people's reactions, &lt;a href=
"http://www.mooseyard.com/Jens/2008/12/python-30-whats-the-point/"&gt;like
this one&lt;/a&gt;. Get your &lt;a
href="http://python.org/download/releases/3.0"&gt;copy while it's
hot!&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;
The book is sort of the first rung of knowledge on a whole gamut of
complex topics, but that's OK because these topics become approachable
only once you've gotten the introductory tour. Finding that "tour",
the source for the inevitable epiphany, is what's so hard about these
concepts. It's even further difficult because it's not like there's a
lot of mainstream thinking going on here and these concepts just
represent a slight tangent on what you're already dealing with.
Anything but. People who know why they want to use something like
JBoss Rules already knew it. You'll notice there's no good "sales"
rhetoric on the JBoss website. It's the chicken and egg problem.
Understanding the concepts in this book is key to caring about, and
eventually understanding, things like JBoss Rules.
&lt;/p&gt; &lt;p&gt; All in all, a very worthy read. If nothing else, it's a good
refresher.   &lt;/p&gt;</summary>
    <dc:date>2008-12-17T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>A Quick Guide to Posting To (A Few) Blogs with Java</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/a_quick_guide_to_posting.html" />
    <author>
      <name />
    </author>
    <modified>2008-12-17T00:00:00Z</modified>
    <issued>2008-12-17T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">First, How to Post to Any API that supports the (admittedly) outdated&#xD;
MetaWeblog API.&#xD;
&lt;p&gt;&#xD;
&lt;b&gt;How to Publish A Blog Entry For Roller 4.0 Software&lt;/b&gt;&#xD;
&#xD;
I found very little in the way of a solid API in Java on top of this&#xD;
XMLRPC API. However, I did find quite a bit using just good old Apache&#xD;
XMLRPC 3.0. Here's how that solution looks:&#xD;
&#xD;
&lt;pre&gt;&lt;code&gt;&#xD;
 /**&#xD;
 * @param serverUrl if youve unpacked a stock Roller 4.0 url, it's&#xD;
likely going to be http://www.YOURHOST.com/roller-services/xmlrpc&#xD;
 * @param user the user you have configured on Roller itself&#xD;
 * @param the password for the user name&#xD;
 * @param blogId the id of the blog. When you log into the Admin&#xD;
screen most pages will mention it.&#xD;
 * @param title the title of the post&#xD;
 * @param content the content of the post (can be in HTML)&#xD;
*/&#xD;
  public String createPost( String serverUrl, String user, String&#xD;
pass, String blogID, String title, String content) throws IOException&#xD;
{&#xD;
        String ret = null;&#xD;
        try {&#xD;
            XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();&#xD;
            config.setServerURL(new URL(serverUrl));&#xD;
            XmlRpcClient client = new XmlRpcClient();&#xD;
            client.setConfig(config);&#xD;
            Map&lt;String, Object&gt; m = new HashMap&lt;String, Object&gt;();&#xD;
            m.put("title", title);&#xD;
            m.put("description", content);&#xD;
            m.put("dateCreated", new Date());&#xD;
            m.put("category", "Java");&#xD;
            Object[] params = new Object[]{blogID, user, pass, m, true};&#xD;
            ret = (String) client.execute("metaWeblog.newPost", params);&#xD;
        } catch (Throwable th) {&#xD;
            System.out.println( "blam!") ;&#xD;
        }&#xD;
        return ret;   // a unique ID generated by Roller&#xD;
    }&#xD;
&#xD;
&lt;/code&gt;&lt;/pre&gt;&#xD;
&#xD;
&lt;/p&gt;&#xD;
&#xD;
&#xD;
&lt;P&gt;&#xD;
&lt;b&gt;How to do the same thing with Blogger Usign Google's GData.&lt;/b&gt;&#xD;
 &lt;pre&gt;&lt;code&gt;&#xD;
 GoogleService service = new GoogleService("blogger", "");&#xD;
        service.setUserCredentials(user, pass);&#xD;
        Entry myEntry = new Entry();&#xD;
        myEntry.setTitle(new PlainTextConstruct(title));&#xD;
        myEntry.setContent(new PlainTextConstruct(content));&#xD;
        Person author = new&#xD;
Person(StringUtils.defaultString(authorName), null, null);&#xD;
        if (!StringUtils.isEmpty(authorName)) myEntry.getAuthors().add(author);&#xD;
&#xD;
        URL postUrl = new URL("http://www.blogger.com/feeds/" + blogID&#xD;
+ "/posts/default");&#xD;
        return service.insert(postUrl, myEntry);&#xD;
&lt;/code&gt;&lt;/pre&gt;&#xD;
 &lt;/P&gt;&#xD;
&#xD;
&lt;p&gt; The Google Data stuff was using the Java Google Data APIs. The&#xD;
XMLRPC library is quite formidable. I'd not recommend using Apache XMLRPC&#xD;
3.1.1 from Maven, as it didn't seem to be a valid artifact. &lt;/p&gt;</summary>
    <dc:date>2008-12-17T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>How to Ride Spring Integration Head</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/how_to_ride_spring_integration.html" />
    <author>
      <name />
    </author>
    <modified>2008-12-13T00:00:00Z</modified>
    <issued>2008-12-13T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;How to build Spring Integration (for Maven) locally... &#xD;
Posting this for my own reference as much as anyone else.&lt;/p&gt; &#xD;
&lt;p&gt;&#xD;
&lt;code&gt;svn co  https://src.springframework.org/svn/spring-integration/trunk/build-spring-integration &lt;br/&gt;&#xD;
cd trunk/build-spring-integration &lt;br /&gt;&#xD;
ant clean jar package publish-maven-local  &lt;br/&gt;&#xD;
&lt;/code&gt;&#xD;
&lt;/p&gt;</summary>
    <dc:date>2008-12-13T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Maven 2.0.9, Andromda 3.[2,3]</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/maven_2_0_9_andromda.html" />
    <author>
      <name />
    </author>
    <modified>2008-12-06T00:00:00Z</modified>
    <issued>2008-12-06T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;P&gt; I was building a project I have that's using the &lt;a href="http://galaxy.andromda.org/docs-3.3"&gt;Maven Andromda plugin&lt;/a&gt; to cross compile UML class diagrams into Java EJB3 entity classes. The plugin's worked flawlessly for a long time now, but this time it failed. It complained that it couldn't find the UML file that was referenced in the configuration file. It's no wonder: the file path it was looking for was doubled up, that is, it was equivalent to &lt;code&gt;/myfolders/foo/uml.uml2/myfolders/foo/uml.uml2&lt;/code&gt;. I did some research and &lt;a href="http://galaxy.andromda.org/forum/viewtopic.php?t=5862&amp;sid=0d9daa204dea84e3141a98af9c57ea3d"&gt;found this bug report&lt;/a&gt;. This proves that it wasn't my Andromda installation, but the Maven installation. This makes sense as I'd just recently upgraded from &lt;u&gt;Ubuntu Hardy Heron (8.04)&lt;/u&gt; to &lt;u&gt;Ubuntu Intrepid Ibex&lt;/u&gt; (what's an Ibex?; 8.10) and the package I was using (&lt;code&gt;maven2&lt;/code&gt;) had been updated to 2.0.9. So, the moral of the story here is: &lt;b&gt;make sure your Maven package didn't change under your nose.&lt;/b&gt;&#xD;
&lt;/p&gt;</summary>
    <dc:date>2008-12-06T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>JavaFX 1.0 Released</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/javafx_1_0_released.html" />
    <author>
      <name />
    </author>
    <modified>2008-12-04T00:00:00Z</modified>
    <issued>2008-12-04T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;Finally, &lt;a href="http://www.javafx.com"&gt;JavaFX 1.0&lt;/a&gt; ? it's been 2 long years, but I'm glad to see this thing get going. Even if it shares the same fate as Silverlight and becomes a clumsier Flash, it's still a MUCH more agile Java. As the libraries enabled via JavaFX are all just Java code, you can still leverage them in standard Java. You needn't use JavaFX, for example. This means that the amazing integration with video and audio is yours for the taking. &#xD;
 &lt;/p&gt;&#xD;
&lt;p&gt;&#xD;
It is unfortunate that they haven't released the Linux bits, yet. But that will change, and in the meantime, 1.0 is chock full of goodies. The blogosphere's been abuzz with information leading up tot the 1.0 release. People are interested in graphics on the Java platform (again?)! I've seen everything from information on using &lt;a href="http://blogs.sun.com/mobility_techtips/entry/how_to_develop_and_run"&gt;Java Webstart with JavaFX&lt;/a&gt; (do you remember Java Webstart? That was something I always wished had taken off), information on using the toolkit &lt;a href="http://m2-javafxc.sourceforge.net "&gt;with Maven&lt;/a&gt;, information on using it &lt;a href="http://www.weiqigao.com/blog/2008/12/04/using_javafx_1_0_on_linux.html"&gt;on Linux&lt;/a&gt; (why does every neat graphical platform have to support Linux last? Flash: I don't understand why Flex took so long to get there. Silverlight... well, I'm pleased it ran on more than one version of Windows, so no complaints, I suppose as I should've known. But Java?) and &lt;a href="http://java.dzone.com/articles/javafx-10-this-could-be-someth"&gt;more&lt;/a&gt;. &#xD;
 &lt;/p&gt;&#xD;
&lt;p&gt;&#xD;
I have some questions: what's the video streaming solution look like on this platform? On the Flash platform you typically use something like LightHTTPD or Nginx and use Flash Video (or, now, H264). I understand that On2 is going to be providing a format for video (similar to FLV?) just as they did for the Flash platform. Do the same rules apply with respect to security and performance? What about remoting? My understanding is that JavaFx will have considerable support for this (which should come as no surprise given the incredible wealth of remoting toolkits on the Java platform) and will even respect the crossdomain.xml file (which comes from the Flash platform). &#xD;
 &lt;/p&gt;&#xD;
 &lt;p&gt; All in all, this is exciting and I can't wait to see where the platform goes from here. The other redeeming value about JavaFX is the unification of the paradigms: working in J2ME meant learning one set of APIs (CLDC, Midlets, J2ME Polish, and more recently, LWUIT), working on Java on the desktop meant SWT, or Swing (which meant... clawing your eyes out using a toothbrush), and working on the server meant using a web framework that didn't have any rich client functionality. Now, it's JavaFX for the desktop, the client, the mobile clients and soon, the TV. This is very promising. &lt;/p&gt;</summary>
    <dc:date>2008-12-04T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Spring Integration 1.0 Released</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/spring_integration_1_0_released.html" />
    <author>
      <name />
    </author>
    <modified>2008-12-03T00:00:00Z</modified>
    <issued>2008-12-03T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;Spring Integration is almost ready (&lt;a href="http://www.theserverside.com/news/thread.tss?thread_id=52095"&gt;website updates notwithstanding!&lt;/a&gt;) &lt;/p&gt;&lt;p&gt;  &#xD;
Spring Integration is an API for building integration solutions using Spring. It works, conceptually, very much like Axway Integrator or Mule or ServiceMix or Petals or, well, you get the idea: it provides functionality to respond to messaging / interactions in a system and route / transform the message to an endpoint. These messages could be JMS, FTP submission, a file suddenly appearing, etc. Spring Integration is an API that provides ESB like functionality. Usually, the ESB is a server to which application integrations are deployed. This API flips that idiom on its head and lets your application become the endpoint by which integration is achieved. &lt;/p&gt;&lt;p&gt;Spring Integration itself is significant because it codifies in a Spring API  the whole field of knowledge surrounding ESBs, which itself can be said to stem from &lt;a href="http://www.amazon.com/Enterprise-Integration-Patterns-Designing-Addison-W&#xD;
esley/dp/0321200683"&gt;Enterprise Integration Patterns&lt;/a&gt;: this has the boon of making it a commodity. And of course, there are the usual reasons: it works better for the things it does, it's well tested, easy-to-test, etc. But you knew about those already.   &lt;/p&gt;&lt;p&gt;&#xD;
&#xD;
I'm waiting with baited breath for the Maven releases :-) &#xD;
   &lt;/p&gt;&lt;p&gt;&#xD;
Congratulations to the Spring Integration team! Wonderful tool and I look forward to being able to recommend it moving forward. &lt;a href="http://www.springsource.com/download/community?project=Spring%20Integration"&gt;Get the bits!&lt;/a&gt;   &lt;/p&gt; &#xD;
&#xD;
&lt;P&gt;&lt;B&gt;Update&lt;/B&gt;: The old way still works and they've updated those bits already if you're &lt;a href="http://forum.springframework.org/showpost.php?p=194665&amp;postcount=6"&gt;looking to get the Maven jars&lt;/a&gt;&lt;/p&gt;&#xD;
&#xD;
&#xD;
&lt;P&gt;&lt;B&gt;Update&lt;/B&gt;:I linked to the wrong book and gave the wrong title, despite having the correct book sitting on a computer tower right next to me. Now &lt;i&gt;that's&lt;/i&gt; impressive! Thanks to Mark Fisher (lead on the Spring Integration project!) for the correction.  &lt;/p&gt;</summary>
    <dc:date>2008-12-03T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Intellij 8.0</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/intellij_8_0.html" />
    <author>
      <name />
    </author>
    <modified>2008-11-11T00:00:00Z</modified>
    <issued>2008-11-11T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;&lt;a href = "http://www.intellij.com"&gt;IntelliJ&lt;/a&gt; &lt;a href="http://www.jetbrains.com/idea/features/newfeatures80.html"&gt;8.0's&lt;/a&gt; &lt;a href="http://www.jetbrains.com/idea/features/25-can.html"&gt;a large&lt;/a&gt; step forward (and none back!)&lt;/p&gt;&#xD;
&lt;p&gt;I just downloaded the latest and greatest revision of Jetbrain's flagship product, Intellij IDEA 8.0.  It is, in a word, pretty awesome. This is due in large part to the refactoring of the core that has occurred between 7 and 8 to improve the application of the IDE for different languages. Support includes, but is not limited to, Groovy, Scala, Ruby, and Java (wherein you also have a dozen different DSLs with which IDEA contends admirably). &lt;/p&gt;&#xD;
&lt;p&gt;What seems to happen with Intellij is that they include  feature and support for a feature that's, shall we say, half baked. Don't get me wrong: a half baked Intellij feature's usually worth 2 or 3 fully baked Eclipse features. Compared to the usual level of quality, some times things slip through that don't meet expectations but that do ? nonetheless ? work. Where 7.0 of the IDE was pretty revolutionary, version 8.0 seems evolutionary (at least in terms of features.) &lt;/p&gt;&#xD;
&lt;p&gt;Instead, things are better polished, faster. Maven support was good when it was introduced in 7.0. Now, it's remarkably well thought and configurable. Intellij has supported displaying test coverage data when unit tests are running. Now it's possible to jump from a class to a test case. Ever wanted to be able to ride the data flow analysis and see where values in the system come from? Now you can. The support for Subversion and Subversion 1.5 is pretty stellar, and includes the ability to see which version of a change have already been integrated into a branch. Actually, the Subversion support is one of the things I've long liked from Intellij. Eclipse hasn't until version 3.4 officially supported Subversion at all. Eclipse 3.4 includes part of the functionality for accessing Subversion, but due to licensing issues you're on your own to install the remaining bits yourself. Intellij already had support for Flex (and the best JavaScript integration I've ever seen), but not much more than support for referencing and coding ActionScript. Now, you can almost effectively remove Flex Builder from your life if you're not planning on doing anything graphical. &lt;/p&gt;&#xD;
&lt;p&gt;And of course, there are new features, too. Support for Seam, better support for Jruby (which was already being called the best in the industry, and is now the extracted core of Intellij's RubyMine product), 20+ new intelligent refactoring capabilities, the ability to assign and swatch of text a ?language? so that Intellij can enable proper editing for it, and the UML capabilities round out the features. One of my favorite new features is the ability to... remove... features. Intellij has a LOT of features. While they're not obtrusive or glaringly present like an overloaded Eclipse instance can be, they are there when you launch the application and they consume RAM.  I loaded IntelliJ and it gave me a Plugin configuration wizard by which I could &lt;I&gt;disable&lt;/I&gt; plug ins. I'm not likely going to be using the Perforce SCM integration, and nor am I likely going to be using the FreeMarker and Struts configuration tools. So, why not disable them?  The speed boost at both runtime and startup is marked. &#xD;
&lt;/p&gt;&#xD;
&lt;P&gt;&#xD;
There are many more new features to like in this tool as well as the coder-friendly editor itself, which is just as tight a fit now as it's ever been. IntelliJ has always taken refactoring to a new plateau hiterto unmatched by Eclipse or Visual Studio, and this release is now exception. &lt;/p&gt;&lt;P&gt;&#xD;
What I didn't like: the tool had some JSP validation errors because of a URL that needs to be downloaded to resolve. In previous versions a little intelligent tooltip would prompt you to let IntelliJ download the file. Not so much in this case. Instead, I was prompted by IntelliLang's tool tip, asking me if I wanted to declare the URL to be a fragment of .. insert your favorite schema/dialect/language/grammar here. &#xD;
&#xD;
Annoying. I still don't know how to get the old functionality to return. Thankfully, in this case, the code was one "old" style JSP and the rest of the site consists of JSP Documents, which all displayed and edited perfectly. And quickly! IntelliJ is pretty quick, anyway, but it seems like the price you pay for invalid HTML is more pronounced in the IDE than, say, with DreamWeaver. )&#xD;
 &lt;/P&gt; &lt;p&gt;All in all, a worthy upgrade and I wholeheartedly recommend it.&lt;/p&gt;</summary>
    <dc:date>2008-11-11T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>How to get your twitter results visible on your site</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/how_to_get_your_twitter.html" />
    <author>
      <name />
    </author>
    <modified>2008-11-08T00:00:00Z</modified>
    <issued>2008-11-08T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">Matt Raible added &lt;a href="http://www.twitter.com"&gt;Twitter&lt;/a&gt; updates to his blog. (&lt;a href="http://www.raibledesigns.com"&gt;Exhibit A&lt;/a&gt;). I decided to the do same. First, you'll need the twitter.js JavaScript. This can be found &lt;a href="http://twitterjs.googlecode.com/"&gt;here&lt;/a&gt;. I would download &lt;a href="http://twitterjs.googlecode.com/files/twitter-1.11.2.min.js"&gt;this one&lt;/a&gt;.  Install that script onto your site, ie:&lt;br/&gt;&#xD;
&lt;code&gt;&#xD;
 &lt;pre&gt; &amp;lt;script type = "text/javascript" src="/js/twitter-1.11.2.min.js" &amp;gt;&amp;lt;/script&amp;gt; &#xD;
&lt;/pre&gt; &lt;/code&gt;&#xD;
&#xD;
&lt;p&gt; Finally, add the code on your page to configure and use it.  &lt;/p&gt;&#xD;
&lt;p&gt;&#xD;
This looks something like this:  &lt;br/&gt;&#xD;
&#xD;
&lt;code&gt;&lt;pre&gt;&#xD;
&amp;lt;script type = "text/javascript"  &amp;gt; &#xD;
     getTwitters('twitter_box', {&#xD;
        id: 'YOUR_TWITTER_ID', &#xD;
        prefix: '', &#xD;
        clearContents: false, // leave the original message in place&#xD;
        count: 3, &#xD;
        withFriends: true,&#xD;
        ignoreReplies: false&#xD;
    });&#xD;
&amp;lt;/script&amp;gt; &#xD;
  &lt;/pre&gt;&lt;/code&gt;&#xD;
&#xD;
&lt;p&gt; This javascript tells the script to load the latest 3 updates (&lt;code&gt;count&lt;/code&gt;) in the HTML element (in my case, a regular old DIV element) having ID "twitter_box". It tells the script that, if there's already something inside that DIV element, it should merely append to it, not overwrite it. &lt;/p&gt; &#xD;
&#xD;
&lt;p&gt;The &lt;code&gt;prefix&lt;/code&gt; attribute let's you specify what code you want to have inserted above and beyond the link and status text. This javascript has its own little macro substitution routine! You can dynamically insert variables like the url of your tweet ("&lt;i&gt;tweet&lt;/i&gt; being what a single status update on twitter is called.) into the prefix string and it'll get replaced at runtime. &lt;/p&gt; &#xD;
&#xD;
&lt;p&gt;Finally, make sure to insert the HTML element where you want the Twitter updates to display somewhere on your page. &#xD;
&lt;/p&gt;&lt;p&gt;The html is easy, and could be as simple as &lt;br/&gt;&#xD;
&lt;code&gt; &lt;PRE&gt; &amp;lt;div id = "twitter_box"&amp;gt; My &amp;lt;a href="http://www.twitter.com"&amp;gt;Twitter.com&amp;lt;/a&amp;gt;. &amp;lt;div&amp;gt;  &lt;/PRE&gt;&lt;/code&gt; &#xD;
 &lt;/p&gt;&#xD;
&lt;p&gt; Thanks, Matt!&lt;/p&gt;</summary>
    <dc:date>2008-11-08T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>And now for something completely different, OR, The code That Almost Toppled Microsoft. Almost.</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/the_code_that_almost_toppled.html" />
    <author>
      <name />
    </author>
    <modified>2008-11-06T00:00:00Z</modified>
    <issued>2008-11-06T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;&#xD;
I just visited the Phillipines. While there, my-brother-in-law gave me a hard disk with 60GBs of photographs. I wanted them on Flickr. Complicating matters further were the photos that my wife and I took. Her photos - every blessed one of them -- were perfect. Mine, on the other hand, were an affront to  color, tone, lighting and God. Nothing short of a week in front of GIMP and Flickr could save them.  &lt;/p&gt; &#xD;
&lt;p&gt;&#xD;
Nothing, that is, except perhaps some automation. I devised a plan: auto color correct the images using ImageMagic (You know how Photoshop has the "Auto Levels" command that transforms images from Warhol's to Monet's?), correct some of the EXIF issues I had, and then upload all 65GBs of photos to Flickr.  &lt;/p&gt;&#xD;
&#xD;
 &lt;h2&gt;Approach &lt;/h2&gt; &#xD;
&lt;P&gt;&#xD;
I chose Ruby for the solution because I've worked with some of these APIs before. I know how I would approach this problem from Java: &lt;a href="http://jmagick.wiki.sourceforge.net"&gt;JMagick&lt;/a&gt; for ImageMagick access,  &lt;a href="http://flickrj.sourceforge.net/"&gt;FlickrJ&lt;/a&gt; for Flickr, and I'd probably just shell out to &lt;code&gt; &#xD;
&lt;a href="http://www.sno.phy.queensu.ca/~phil/exiftool"&gt;exiftool&lt;/a&gt;&lt;/code&gt;, which is a command line tool on Linux. I've disabused myself of the notion that this script going on to become the 100 lines of code that topples Microsoft, and thus I don't care if it just works on Linux. &lt;/p&gt; &#xD;
&lt;P&gt;&#xD;
I chose not to use Java because, frankly, I'm really picky about how I build my Java applications. Picky, to the point that sometimes it hinders me when I'm just trying to express an application. Unless it's for the most trivial of applications (where "trivial" most certainly does NOT include assimilating 3 different libraries and performing image processing for 2 days) I can't help but introduce elements from my war chest. &#xD;
&lt;/p&gt;&lt;p&gt;&#xD;
My war chest is derived from years of doing this singular task, from programming in Java. Years of experience have taught me to readily employ, for example: Maven, unit testing, persistence (so that I can keep track of what's been processed, for example) and with all of that, why not Spring? After all, I was going to write to interfaces anyway. My years of experience have taught me that I should plan the application out a little bit before I take to coding. After all, by the time I've integrated all those APIs, change will be slower going, and it's easier to refactor UML than DDL. My years of experience have made me slow for the small applications and fast for the big applications. &lt;/p&gt; &#xD;
&lt;p&gt;&#xD;
I chose not to use Python because I didn't know the APIs for Flickr that well in Python. Simple enough. I always use Python. It's the language I write my one-offs in. It's the language I go to when I want to express a solution without UML. It would have been perfect for this job. It's most redemptive quality is, in fact, how frequently I find myself thinking it would be perfect for a job. It inspires hope. But again, I don't know the API very well, no need to get lost in the weeds of Ruby offers a paved road.  &lt;/P&gt; &#xD;
&lt;h2&gt;Prerequisites &lt;/h2&gt;&#xD;
&lt;p&gt;&#xD;
The players having been selected, I wrote a small checklist of what I'll need. &lt;/p&gt; &#xD;
 &lt;OL&gt;&lt;LI&gt;&lt;a href="http://www.flickr.com/services/api/keys/apply/"&gt;Flickr API License key&lt;/a&gt; Make sure you choose the non professional version. &lt;/li&gt; &#xD;
 &lt;li&gt; Photos &lt;/LI&gt;  &#xD;
&lt;LI&gt;&#xD;
Ruby compiler. And the gem command, definitely don't forget those. You'll need some packages to get this running. I installed the packges using my Operating Systems package manager. I'm using Ubuntu Hardy Heron. The script I used to reproduce the solution on another machine (and thus to whose viability I can speak) is: &lt;br/&gt;&lt;CODE&gt;&lt;PRE&gt;&#xD;
sudo apt-get install libimage-exiftool-perl &#xD;
sudo apt-get install libfreetype6-dev libfreetype6  &#xD;
sudo apt-get install libwmf0.2-7 ghostscript libjpeg62 &#xD;
sudo apt-get install libpng3 libpng3-dev  &#xD;
sudo apt-get install imagemagick  &#xD;
sudo apt-get install make gcc autoconf ruby rubygems ruby1.8-dev libmagick9-dev  &#xD;
 &#xD;
sudo gem install rflickr &#xD;
sudo gem install rmagick &#xD;
sudo gem install mini_exiftool &#xD;
sudo gem install openwferu-extras &#xD;
&lt;/CODE&gt; &lt;/li&gt;&#xD;
&lt;/oL&gt;&lt;h2&gt;&#xD;
Code!  &lt;/h2&gt; &lt;P&gt;&#xD;
I took large swatches of this from loadr.rb script that ships with the Flickr library's source code. The application is anything if not fragile, and perhaps not even very efficient, but it does work, and that's what mattered here. &#xD;
 &lt;/p&gt;  &#xD;
&lt;CODE&gt;&lt;PRE&gt;&#xD;
#!/usr/bin/ruby&#xD;
&#xD;
require 'rubygems'&#xD;
require 'pp'&#xD;
require 'find'&#xD;
require 'RMagick'&#xD;
require 'fileutils'&#xD;
require 'mini_exiftool'&#xD;
require 'flickr'&#xD;
&#xD;
&lt;B&gt;#you will get these values when you sign up with Flickr. Make sure you choose the non professional version. &lt;/b&gt;&#xD;
$flickr_email = 'YOUR_YAHOO_EMAIL'&#xD;
$api_key = 'YOUR_YAHOO_FLICKR_API_KEY'&#xD;
$shared_secret =   'YOUR_YAHOO_SHARED_SECRET'&#xD;
$flickr = Flickr.new("/tmp/flickr.cache", $api_key, $shared_secret) &lt;B&gt;# change the path as you like &lt;/b&gt;&#xD;
setname = 'the_set_to_which_I_want_to_upload_these_photos'&#xD;
&#xD;
def filename_to_title(filename)&#xD;
    arr = filename.split(File::SEPARATOR).last.split('.')&#xD;
    arr.pop&#xD;
    my_title = arr.join('.')&#xD;
end&#xD;
&#xD;
&lt;B&gt;# this will run each time. The first time it runs &#xD;
# it will cause Flickr to display a screen prompting you&#xD;
# to give permission to the application, which you will do.&#xD;
 &lt;/B&gt;&#xD;
def auth_rflickr(api, secret)&#xD;
    unless $flickr.auth.token&#xD;
        $flickr.clear_cache&#xD;
        $flickr.auth.getFrob&#xD;
        url = $flickr.auth.login_link&#xD;
        `firefox '#{url}'`&#xD;
        puts "A browser is being opened to bring you to:\n#{url}. When you are done authorizing this application, hit enter."&#xD;
        gets&#xD;
        $flickr.auth.getToken&#xD;
    end&#xD;
end&#xD;
&#xD;
&lt;b&gt;# change the paths as you like &lt;/b&gt;&#xD;
dir_for_output =Dir.new( FileUtils.mkdir_p("../output"))&#xD;
dir_for_input = Dir.new "/home/yourUser/Desktop/photos/" &#xD;
&#xD;
&lt;b&gt;# here we run through the input folder and examine &#xD;
#the contents, building up the array of files to upload.&lt;/b&gt;&#xD;
files= []&#xD;
Find.find(dir_for_input.path) do |path|&#xD;
    if !FileTest.directory?(path)&#xD;
        tags = File.dirname(path )[dir_for_input.path.length .. -1]&#xD;
        if tags[-1]== '/' or tags[0] == '/'&#xD;
            tags = tags[1 .. -1]&#xD;
        end&#xD;
        if  ['.jpg', '.tiff', '.tif'].include? File.extname(path).downcase &lt;b&gt;#only include images&lt;/b&gt;&#xD;
            files &lt;&lt; path&#xD;
        end&#xD;
    end&#xD;
end&#xD;
&#xD;
&#xD;
auth_rflickr($api_key, $shared_secret) unless $flickr.auth.token&#xD;
&#xD;
&lt;b&gt;# clean up the existing tmp folder&lt;/b&gt;&#xD;
if File.exists?(dir_for_output.path )&#xD;
    FileUtils.rm_rf(dir_for_output.path )&#xD;
end&#xD;
&#xD;
if not File.exists?(dir_for_output.path )&#xD;
    if not Dir.mkdir(dir_for_output.path )&#xD;
        raise "Can't create the directory!"&#xD;
    end&#xD;
end&#xD;
&#xD;
sets = $flickr.photosets.getList&#xD;
set = sets.find{|s| s.title == setname}  &#xD;
set &amp;&amp;= set.fetch&#xD;
&#xD;
eligible = (set ? set.fetch : [])&#xD;
to_upload = []&#xD;
uploaded = []&#xD;
&#xD;
files.each do |filename|&#xD;
    my_title = filename_to_title(filename)&#xD;
    photo = eligible.find{|photo| photo.title==my_title}&#xD;
    if photo&#xD;
        uploaded &lt;&lt; photo&#xD;
    else&#xD;
        to_upload &lt;&lt; filename&#xD;
    end&#xD;
end&#xD;
&#xD;
tix = []&#xD;
to_upload.each { |fn|&#xD;
   &lt;b&gt; # here's where the most interestig work is done. &lt;/b&gt;&#xD;
    ifile= File.new fn&lt;b&gt;  # output file&lt;/b&gt;&#xD;
    ofile =   File.join( dir_for_output.path, File.basename(fn))&lt;b&gt;  # input file &lt;/b&gt;&#xD;
    before = Magick::Image.read( ifile.path ).first&lt;b&gt; # read in an image using ImageMagick &lt;/b&gt;&#xD;
    after = before.normalize &#xD;
    after.write( ofile )&#xD;
    exif_out = MiniExiftool.new ofile&#xD;
    &lt;b&gt; # open the file with MiniExiftool, which wraps exif  &#xD;
    #tool, and perform operations on the exif metadata.&lt;/b&gt;&#xD;
    exif_in = MiniExiftool.new ifile.path&#xD;
    exif_out['Orientation'] = exif_in ['Orientation']&#xD;
    puts 'couldnt save exif data!' if !exif_out.save&#xD;
    tags = File.dirname(fn )[dir_for_input.path.length .. -1] &#xD;
    if tags[0]== '/'&#xD;
        tags = tags[1 .. -1]&#xD;
    end&#xD;
    if tags[-1] == '/'&#xD;
        tags = tags.chomp&#xD;
    end&#xD;
    tags = tags.strip.split('/')&#xD;
    tix &lt;&lt;  $flickr.photos.upload.upload_file_async( ofile, filename_to_title(ofile), &#xD;
       nil, 'tag1 tag2 tag3'.split(' ')+tags) &#xD;
&lt;b&gt;# change these tags as you need to. They will be used to categorize the images on Flickr.  &lt;/b&gt;&#xD;
}&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
tix = $flickr.photos.upload.checkTickets(tix)&#xD;
while (tix.find_all{|t| t.complete==:incomplete }.length &gt; 0)&#xD;
    sleep 2&#xD;
    puts "Checking on the following tickets: "+&#xD;
            tix.map{|t| "#{t.id} (#{t.complete})"}.join(', ')&#xD;
    tix = $flickr.photos.upload.checkTickets(tix)&#xD;
end&#xD;
&#xD;
failed = tix.find_all{|t| t.complete == :failed}&#xD;
failed.each { |f|  puts "Failed to upload #{to_upload[tix.index(f)]}." }&#xD;
0.upto(tix.length - 1) { |n| puts "#{to_upload[n]}\t#{tix[n].photoid}" }&#xD;
&#xD;
uploaded += tix.find_all{|t| t.complete == :completed}.map do |ticket|&#xD;
    $flickr.photos.getInfo(ticket.photoid)&#xD;
end&#xD;
uploaded.each do |photo|&#xD;
    if set&#xD;
        set &lt;&lt; photo unless set.find{|ph| ph.id == photo.id}&#xD;
    else&#xD;
        set = $flickr.photosets.create(setname, photo, 'DESCRIPTION_HERE')&#xD;
        set = set.fetch&#xD;
        puts "creating set #{setname}"&#xD;
    end&#xD;
end&#xD;
&#xD;
&lt;/PRE&gt;&lt;/CODE&gt;</summary>
    <dc:date>2008-11-06T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>TestNG, Spring TestContext, and Maven</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/testng_spring_testcontext_and_maven.html" />
    <author>
      <name />
    </author>
    <modified>2008-10-07T00:00:00Z</modified>
    <issued>2008-10-07T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;If you've ever used the testing support in prior versions of Spring you know that it was essentially JUnit 3.x, oriented. There were ways to make those scaffolding classes work for (my personal favorite) TestNG or even Junit 4, but they largely were engineering hacks, not real solutions. For example, with the TestNG case you could override the setUp method and annotate it such that TestNG would call that method for setup, while also complying with Junit's interface requirements. Now there's a better way. Here's how I got it workiung with Maven and Surefire and TestNG 5.7. &#xD;
First, I added support for TestNG 5.7 (which is current as of this writing.):  &lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;&amp;lt;dependency&amp;gt;  &amp;lt;artifactId&amp;gt;testng&amp;lt;/artifactId&amp;gt; &amp;lt;groupId&amp;gt;org.testng&amp;lt;/groupId&amp;gt; &amp;lt;version&amp;gt;5.7&amp;lt;/version&amp;gt; &amp;lt;classifier&amp;gt;jdk15&amp;lt;/classifier&amp;gt; &amp;lt;/dependency&amp;gt;&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;Then I added support for SureFire to the Maven POM: &lt;/p&gt;&#xD;
&lt;pre&gt;  &amp;lt;plugins&amp;gt; &lt;br /&gt;               &amp;lt;plugin&amp;gt; &lt;br /&gt;                   &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt; &lt;br /&gt;                    &amp;lt;artifactId&amp;gt;maven-surefire-plugin&amp;lt;/artifactId&amp;gt; &amp;gt;&lt;br /&gt;                     &amp;lt;version&amp;gt;2.4&amp;lt;/version&amp;gt; &lt;br /&gt;                  &amp;lt;configuration&amp;gt; &lt;br /&gt;                       &amp;lt;suiteXmlFiles&amp;gt; &lt;br /&gt;                           &lt;br /&gt;&amp;lt;suiteXmlFile&amp;gt;${basedir}/src/test/resources/testng.xml&amp;lt;/suiteXmlFile&amp;gt; &lt;br /&gt;                        &amp;lt;/suiteXmlFiles&amp;gt; &lt;br /&gt;           &amp;lt;/configuration&amp;gt; &lt;br /&gt; &lt;br /&gt;     &amp;lt;/plugin&amp;gt;          &lt;br /&gt; &lt;br /&gt;       &amp;lt;/plugins&amp;gt;&lt;/pre&gt; &#xD;
&lt;p&gt;Finally, it comes time to write the test. Maven has a structure that's realized using the following command:&lt;/p&gt;&#xD;
&lt;code&gt;mkdir -p src/{test,main}/{java,resources}; &lt;/code&gt;&#xD;
&lt;p&gt;Your unit test code goes into &lt;code&gt;src/test/java&lt;/code&gt; and your &lt;code&gt;testng.xml&lt;/code&gt; goes into &lt;code&gt;src/test/resources&lt;/code&gt;. &lt;/p&gt;&#xD;
&lt;p&gt;Here's an example of the testng.xml:&lt;/p&gt;&#xD;
&lt;pre&gt;&amp;lt;!DOCTYPE suite SYSTEM &amp;quot;http://testng.org/testng-1.0.dtd&amp;quot;&lt;br /&gt;&amp;gt; &amp;lt;suite name=&amp;quot;myProject&amp;quot; verbose=&amp;quot;5&amp;quot;&amp;gt; &lt;br /&gt;  &amp;lt;test name=&amp;quot;serviceTests&amp;quot;&amp;gt; &lt;br /&gt;        &amp;lt;packages&amp;gt; &lt;br /&gt;           &amp;lt;package&lt;br /&gt;name=&amp;quot;com.joshlong.myProject.test.services&amp;quot;/&amp;gt; &lt;br /&gt;        &amp;lt;/packages&amp;gt; &lt;br /&gt;   &amp;lt;/test&amp;gt; &lt;br /&gt; &lt;br /&gt; &amp;lt;/suite&amp;gt; &lt;br /&gt;&lt;/pre&gt;&lt;p&gt;And, finally, here's an example of a test class that works:&lt;/p&gt; &#xD;
&lt;pre&gt;package com.joshlong.myProject.tests.services;&lt;br /&gt;import com.joshlong.myProject.utils.LoggingUtils;&lt;br /&gt;import org.springframework.beans.factory.annotation.Autowired;&lt;br /&gt;import org.springframework.test.annotation.DirtiesContext;&lt;br /&gt;import org.springframework.test.context.ContextConfiguration;&lt;br /&gt;import org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests; &lt;br /&gt;// THIS ONE's IMPORTANT! There are one of these for each of the 3 frameworks you're likely to want to use. &lt;br /&gt;import static org.testng.Assert.assertTrue;&lt;br /&gt;import org.testng.annotations.BeforeMethod;&lt;br /&gt;import org.testng.annotations.Test;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; * @author Josh Long&lt;br /&gt; */&lt;br /&gt;@ContextConfiguration(locations = {&amp;quot;classpath:service-context.xml&amp;quot;, &amp;quot;classpath:test-context.xml&amp;quot;})&lt;br /&gt;public class MyProjectTest extends AbstractTransactionalTestNGSpringContextTests {&lt;br /&gt;&lt;br /&gt;    @BeforeMethod public void announceClass() throws Throwable {&lt;br /&gt;        loggingUtils.log(&amp;quot;Inside of MyProjectTest!&amp;quot;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;    @Autowired&lt;br /&gt;    private LoggingUtils loggingUtils;  // this gets automatically injected from one of the contexts listed in the @ContextConfiguration annotations.&lt;br /&gt; &lt;br /&gt;    @Test&lt;br /&gt;    public void testBasicMath() throws Throwable {&lt;br /&gt;        loggingUtils.log(&amp;quot;foo()&amp;quot;);        &lt;br /&gt;        assertTrue( 1 &amp;lt; 2, &amp;quot;1 &amp;lt; 2 -- pray that this is correct and that this test never does fail!&amp;quot;);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;</summary>
    <dc:date>2008-10-07T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>GWT Continues to Produce Beautiful Sites</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/gwt_continues_to_produce_beautiful.html" />
    <author>
      <name />
    </author>
    <modified>2008-10-04T00:00:00Z</modified>
    <issued>2008-10-04T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;I stumbled upon the samples site from &lt;a href="http://phpgwt.com"&gt;phpgwt.com&lt;/a&gt; ? which features this &lt;a href="http://samples.gwtphp.com/pax4/merchants/index.php"&gt;application.&lt;/a&gt; The application seems to perform and work reasonably well in all browsers, although the transparent .pngs that are prevalent on the site don't seem to work well in Internet Explorer 6. Naturally, your mileage my vary, but I tested it against Firefox 3.0, Chrome, and Internet Explorer. Gorgeous. Similarly, look at the sample applications coming from &lt;a href="http://extjs.com/products/gxt"&gt;ExtJS &lt;/a&gt;OR &lt;a href="http://www.gwt-ext.com/demo"&gt;GWT-EXT&lt;/a&gt;. The first one's not quite as impressive as the second one, however, the second one may be at a dead end due to a licensing spat (&lt;a href="http://www.gwtsite.com/ext-gwt-gwt-ext-what-now/"&gt;as detailed here&lt;/a&gt;). &lt;/p&gt;&lt;p&gt;I should have a tutorial detailing how to get started with some of these technologies pretty soon.&lt;/p&gt;</summary>
    <dc:date>2008-10-04T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>J2ME and Android consitancy</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/j2me_and_android_consitancy.html" />
    <author>
      <name />
    </author>
    <modified>2008-10-02T00:00:00Z</modified>
    <issued>2008-10-02T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">Why is it that the basic 'optional' components on J2ME are pretty much the optional components on Android? What am I missing here? If you get a relatively new phone you're likely to get the same minimum requirements that you'll get from an Android phone ? the things that are really interesting and attractive are optional, just as they're optional on J2ME. This applies, for example, to the GPS support, the ability to play MP3s, access the camera, etc. One thing I expect is that, because it's Google, that once you develop for Android and the phone "supports" the feature, then it won't be that hard to go from emulator to deployment on the handset with the same features. In the J2ME world, it's not easy to get an application that works identically once deployed without multi-hundred dollar certificates and so on. And of course, you still are better are programming to a common denominator if you want the application work across a lot of phones. Additionally, there are features that some phone supported that aren't supported in any one emulator, which means that testing j2ME is fine using the Wireless Toolkit but difficult if you're trying to access features from a Samsung A900 without then using Sprint's SDK. The Gphone is almost here, perhaps we'll start to get a feel for what that entails.</summary>
    <dc:date>2008-10-02T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>http://code.google.com/p/java-libcdrip/</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/http_code_google_com_p.html" />
    <author>
      <name />
    </author>
    <modified>2008-10-02T00:00:00Z</modified>
    <issued>2008-10-02T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">I've just &lt;a href="http://code.google.com/p/java-libcdrip"&gt;open sourced and released&lt;/a&gt; on Google code an Open API for interacting with CDDA data from Java. Right now the API does basics, only: &#xD;
&#xD;
&lt;ul&gt;&lt;li&gt; Eject a disc from a drive&lt;/li&gt;&lt;li&gt; Provide information about whether a CD is loaded&lt;/li&gt;&lt;li&gt;List the devices on the system (though this seems to be a little flaky at the moment, so we'll have to implement a strict policy of no refunds! &amp;lt;grin&amp;gt;&lt;/li&gt;&lt;li&gt;Enumerate how many tracks there&lt;/li&gt;&lt;li&gt;Rip tracks to a .WAV &lt;code&gt;java.io.File&lt;/code&gt; object.&lt;/li&gt;&lt;li&gt;Derive the DISCID from the CD, which in turn can be used to get CDDB data&lt;/li&gt;&lt;/ul&gt; &#xD;
&#xD;
&lt;p&gt;Naturally, there are many things &lt;a href="http://code.google.com/p/java-libcdrip/issues/list"&gt;to do be done&lt;/a&gt;, and the list is constantly growing.&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;The code itself is JNI code that exposes native code that I've built using two &lt;strong&gt;amazing&lt;/strong&gt; open source projects.&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt; On Linux, I'm using &lt;code&gt;grip&lt;/code&gt;, &lt;code&gt;cdio&lt;/code&gt;, and more, not to mention the GNU toolchain. On Windows, I'm using &lt;code&gt;&lt;a href="http://cdexos.sourceforge.net/"&gt;CDex&lt;/a&gt;&lt;/code&gt;. &#xD;
&lt;/p&gt; &#xD;
&#xD;
&lt;p&gt; Since the layer of code that is actually mine is very thin (just enough to normalize the two APIs so that I could get them to conform the JNI-vended header files), it would not be very much use working on this project (unless you &lt;strong&gt;REALLY&lt;/strong&gt; want to&lt;strong&gt;!&lt;/strong&gt;) Instead, support those projects directly. &lt;/p&gt;&#xD;
&lt;p&gt;Any feedback on the project is helpful. The C/C++ code is sort of slapdash and isn't necessarily the easiest to build unless you've had time with &lt;a href="http://www.eclipse.org/cdt/"&gt;Eclipse CDT&lt;/a&gt; or Visual Studio .NET 2008, which is why there are prebuilt binaries in the &lt;code&gt;lib&lt;/code&gt; directory in subversion.</summary>
    <dc:date>2008-10-02T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Getting Started with jBPM and Spring</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/getting_started_with_jbpm_and.html" />
    <author>
      <name />
    </author>
    <modified>2008-09-22T00:00:00Z</modified>
    <issued>2008-09-22T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;My first article for &lt;a href="http://www.theserverside.com/tt/articles/article.tss?l=jBPMandSpring"&gt;TheServerSide.com&lt;/a&gt;. I am very excited to have this finally happen, and am frankly really looking forward to doing some more. The article is a discussion on setting up an architecture using worklists that depends on jBPM and Spring. &#xD;
&lt;/p&gt;&lt;p&gt; &#xD;
Any ideas? Suggestion? Leave a comment! &lt;/p&gt;</summary>
    <dc:date>2008-09-22T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Oracle  Enterprise Pack for Eclipse</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/oracle_enterprise_pack_for_eclipse.html" />
    <author>
      <name />
    </author>
    <modified>2008-09-17T00:00:00Z</modified>
    <issued>2008-09-17T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;Dear Oracle,&lt;/p&gt;&#xD;
&lt;p&gt;You recently released  &#xD;
&lt;strong&gt;&lt;a href="http://www.oracle.com/tools/enterprise-eclipse-pack.html"&gt;Oracle Enterprise Pack for Eclipse&lt;/a&gt;&lt;/strong&gt;, which  is a release of either Eclipse 3.3 (Europa) or Eclipse 3.4 (Ganymede) that supports using Weblogic as a server. This is nice because, up until now, the only way that I knew  of to use WebLogic was to either use the Workshop product - which is an increasingly bad option  as it's based on the equivalent of Eclipse 3.1 - or to use something like MyEclipse, which has a sort of half-hearted integration with Weblogic that misses the mark.  I wanted to applaud your release. This isn't some cranked up Eclipse distro like Workshop and it's not some tightly-wound monster like JDeveloper. It's a simple solution to a simple requirement.  Honestly, I'm surprised it happened after BEA got accquired! I would have thought Oracle would &lt;em&gt;discontinued&lt;/em&gt; something like this! &#xD;
&lt;/p&gt;&lt;p&gt; I know that Oracle Enterprise Pack includes other niceties besides the integraion with Weblogic, but they are uninteresting to me, as Ganymede is a very compelling upgrade on its own strength. &lt;/p&gt; &lt;p&gt;&#xD;
Thank you, Oracle, for making development in the Enterprise a little easier.   &lt;br /&gt;&lt;br/&gt;Josh Long&lt;/p&gt;</summary>
    <dc:date>2008-09-17T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Google Chrome, beta</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/google_chrome_beta.html" />
    <author>
      <name />
    </author>
    <modified>2008-09-02T00:00:00Z</modified>
    <issued>2008-09-02T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;Alright, so I was really caught off guard by the announcement of Google Chrome (&lt;a href="http://www.google.com/chrome"&gt;http://www.google.com/chrome&lt;/a&gt;). I?m REALLY impressed. It has every little key command I ever wanted: Ctrl+tab / ctrl + shift + tab moves you back and forward in your tabs. Ctrl + t create a new tab. Ctrl +L places the cursor in the location bar (and the location bar does double duty as your search bar, too! Nice! Even nicer: you can choose Microsoft as your search and they didn?t have to ask to get it that way!), etc. It even has the ability to drag tabs from the browser and 'attach' them, or detach them, at will. Again, very nice touch. It has every shortcut except one: F11. F11 (at least on IE, Firefox and Konqueror. Not Safari on Windows, I note!) maximizes the window and removes all the chrome. The reason for this should be stunningly obvious: it?s already as bare-minimal as you can get. But still, it?d be nice to have some way to go full screen. After all, how are the kiosk-esque apps supposed to work? What could be cooler than an entire application, full screen mode, written using GWT and the Google Gears extension library for GWT, deployed on Google Chrome, say at the library, or the airport? Who'd need the apple store? Imagine getting the Flash support up to snuff and deploying that on this crazy fast browser!&lt;/p&gt;&lt;p&gt;As a development tool, it?s definitely a solid third. Firefox + Firebug + Web Developer are the reigning champions, of course, then Safari and the hidden 'Developer' menu, then Chrome?s available but Spartan JavaScript debugger/ process monitor (a freaking process monitor! Awesome: Shift + Escape. Genius.)&lt;/p&gt;&lt;p&gt;Unlike Safari on Windows, the Chrome?s UI chrome seems to be rock solid. Of course, given the name it?d be ironic if that were anything less. If you manipulate Safari quick enough, it?ll stop painting itself and the grey brushed metal look will disappear to reveal standard blue + gray Windows 2000 chrome (you know, the minimize, maximize buttons, the title bar), but not so with Chrome. This could be because it?s very fast and I just haven?t found a way to get it to slow/falter. &lt;/p&gt;&#xD;
&lt;p&gt;I did have some issues with it, however. Flash flickers a bit for me ? watching the video explaining Chrome, the faces would every so often flicker. I wonder if this is why they did &lt;a href="http://www.google.com/googlebooks/chrome" target="_blank"&gt;a comic strip&lt;/a&gt;) It?s built using Webkit as the renderer, so most things work just fine, and it?s built using their own proprietary JavaScript VM, called V8. V8 is very interesting in that it means could potentially advance the state of the art with JavaScript. Or foul it up completely and introduce a 4&lt;sup&gt;th&lt;/sup&gt; incompatible JS variant into the market. I tested a lot of different applications, however, and it seems to be working just fine. Great, in fact. I tried the usual suspects: Gmail, YouTube, Meebo, Flickr, Google Calendar and they all seemed to work fine. I use Roller for my blog and it in turn uses a widget for rich text editing. That rich text editor barked that it didn't support Mozilla &amp;lt; 1.3 when I tried to write this entry, but then insisted that it would try to materialize everything. It went ahead and sure enough everything works perfectly, even if the widget doesn't know it yet! Obviously the HTML heavy sites like &lt;a href="http://www.slashdot.org" target="_blank" title="Slashdot"&gt;Slashdot.org &lt;/a&gt;or &lt;a href="http://amazon.com/" target="_blank"&gt;Amazon.com&lt;/a&gt; worked just fine too, given the WebKit heritage. &lt;/p&gt;&lt;p&gt;I?m a little annoyed by the lack of Linux support (both from Google, and from Apple and their Safari product) given that WebKit was born of Konqueror?s source code. There does seem to be hope, though: the &lt;a href="http://dev.chromium.org/"&gt;developer site&lt;/a&gt; at least has a doc explaining that Chrome doesn?t yet build/do anything useful on OS X / Linux. But at least they?re not pretending no one?s going to be looking for those builds!&lt;/p&gt;&lt;p&gt;All in all, bravo Google!&lt;/p&gt; &lt;p&gt;&lt;br /&gt; &lt;strong&gt;Update (08/03/2008)&lt;/strong&gt; So, I wanted to install this sucker at work. I tried runninig it and sure enough it failed, bitten by the corporate firewall. Good for firewall, bad for me. I googled and with a little luck I chanced upon &lt;a href="http://mandriva.blogspot.com/2008/09/google-chrome-installer-error-solved.html"&gt;this revealing blog by Guru Prasath&lt;/a&gt;. I tried it and it works! &lt;/p&gt;</summary>
    <dc:date>2008-09-02T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Continous Integration Conundrum</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/continous_integration_conundrum.html" />
    <author>
      <name />
    </author>
    <modified>2008-08-19T00:00:00Z</modified>
    <issued>2008-08-19T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;I'm not feeling so hot so I'm sleeping irratically and so I'm productive when I least expect it. &lt;/p&gt;&lt;p&gt;I've been looking at the various continous integration server's out there for possible employment in a project I'm working on. We have in-house experience with &lt;a href="http://cruisecontrol.sourceforge.net/"&gt;Cruise Control&lt;/a&gt;, the defacto standard, so that's definitely got one value point. Plus, it's open source, which helps in the &amp;quot;can-we-trust-it?&amp;quot; category. &#xD;
 We are hopefully going to be working with Maven 2, so there's definitely value in being able to talk to the build system, which I know &lt;a href="http://continuum.apache.org/"&gt;Continuum&lt;/a&gt; (because, after all, they're the makers of &lt;a href="http://maven.apache.org/"&gt;Maven&lt;/a&gt;) can do easily. In terms of what I've heard about -- as in from direct contact with other people -- I know Hudson has a pretty good reputation, and so do the Atlassian products, namely &lt;a href="http://www.atlassian.com/software/bamboo/"&gt;Bamboo&lt;/a&gt;. Actually, now that I think of it, I attended a JUG wherein the Atlassian folks demo'ed the Bamboo product, and it was pretty impressive, if you go for the pie charts. Which I suspect will be true of the people looking at the project I'm working on. So check off that one for Bamboo.&lt;/p&gt;&#xD;
&lt;p&gt;&#xD;
Most of these servers have some kind of integration with the tooling, but of course, it's not strictly necessary that they do, is it? After all, isn't the idea that you're going to remove the onus of constantly testing the build from the shoulder's of the developers? Even still,  &lt;a href="http://www.jetbrains.com/teamcity/"&gt;TeamCity&lt;/a&gt; , from IntelliJ (makers of &lt;a href="http://www.jetbrains.com/intellij/"&gt;IntelliJ IDEA&lt;/a&gt;) is indicative of where the market is heading.. part of the ALM market craze that caused Borland to switch course a few years back. I wonder what their integration is... &lt;a href="http://www.borland.com/us/products/silk/gauntlet/index.html"&gt;Apparently it's something called Gauntlet.&lt;/a&gt; I wonder why I haven't heard more from them about this.  &#xD;
 &lt;/p&gt;&lt;p&gt;&#xD;
I write this down now so I have something to mind map tomorrow when I'm more lucid.&#xD;
&lt;/p&gt;</summary>
    <dc:date>2008-08-19T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>mvn archetype:generate</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/mvn_archetype_generate.html" />
    <author>
      <name />
    </author>
    <modified>2008-08-14T00:00:00Z</modified>
    <issued>2008-08-14T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">Did you know that &lt;code&gt;mvn archetype:generate&lt;/code&gt;, by itself, on the command line, yeilds a listing of all the archetypes you have available? I just stumbled upon this today - great trick!</summary>
    <dc:date>2008-08-14T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Subversion 1.5, IntelliJ IDEA, and you</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/subversion_1_5_intellij_idea.html" />
    <author>
      <name />
    </author>
    <modified>2008-08-10T00:00:00Z</modified>
    <issued>2008-08-10T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; I recently had to upgrade a project to Subversion 1.5 which caused IntelliJ's Subversion support to lose its mind. It would paint the files blue as though it realized the file was &amp;quot;dirty&amp;quot; but then when I hit ctrl + k to submit the changes to Subversion, it would respond, &amp;quot;No Changes found&amp;quot;.  I did some sleuthing: &lt;a href="http://www.jetbrains.net/confluence/display/IDEADEV/Selena+EAP"&gt;IntelliJ IDEA build 7938&lt;/a&gt; fixes the issue.&#xD;
&lt;/p&gt;&lt;p&gt;I installed the new version and opened up a project and everything was in error. It was almost as thought it didn't have a JDK set, so I tried to point it at a JDK but that didn't work. Finally, I removed my IntelliJ metadata folder (a desperate move, but I had little time and nothing to lose) which is where IntelliJ stores user specific metadata (&lt;code&gt;/home/jlong/.IntelliJIdea70&lt;/code&gt;). &lt;b&gt;That&lt;/b&gt; worked! &#xD;
&lt;/p&gt; &lt;p&gt; In all, I lose 20 minutes of time. By far, one of the longest periods that IntelliJ itself (where it wasn't genuine user error!) has delayed me... now, Eclipse on the other hand...  &lt;/p&gt;</summary>
    <dc:date>2008-08-10T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Keith Donald speaking on Spring Web MVC 2.5 and Beyond at this week's Phoenix Java User Group</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/keith_donald_speaking_on_spring.html" />
    <author>
      <name />
    </author>
    <modified>2008-08-10T00:00:00Z</modified>
    <issued>2008-08-10T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;
Keith Donald's going to be at this week's &lt;a href="http://www.phxjug.org/"&gt;Phoenix Java User Group&lt;/a&gt; talking about Spring MVC and Spring WebFlow 2.5/2.0, respectively! I am bringing at least 3 friends, I suggest if you can make it, you should try and go. I had a weird month last month so I missed it, but I can't wait for this one! 

&lt;/p&gt;</summary>
    <dc:date>2008-08-10T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Installng PostGIS and the TIGER Geocoder</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/installng_postgis_and_the_tiger.html" />
    <author>
      <name />
    </author>
    <modified>2008-07-13T00:00:00Z</modified>
    <issued>2008-07-13T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;Note this is an incomplete document. I have yet to confirm that this works 100%, but here are the things I noted while installing PostGIS' TIGER Geocoder. First and foremost, the source code is available via &lt;code&gt;svn co http://svn.refractions.net/postgis/trunk/extras/tiger_geocoder&lt;/code&gt;. A lot of this information is an incomplete copy of what's available from : &lt;a href="http://postgis.refractions.net/support/wiki/index.php?PostgisOnUbuntu"&gt;http://postgis.refractions.net/support/wiki/index.php?PostgisOnUbuntu&lt;/a&gt; &lt;/p&gt;&lt;p&gt;What follows are the instructions as present in the source code. I'll interpolate the bits that were a little unclear and required assistance for me so you can benefit from them.&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Install postgresql-8.2-postgis (For various GIS bits). For Ubuntu Hardy users, this was a mere &lt;code&gt;sudo apt-get install postgresql-8.3 postgresql-contrib-8.3 postgresql-8.3-postgis&lt;/code&gt;. Invariably, you'll need some extra tool support so: &lt;code&gt;sudo apt-get install gdal-bin python2.5-gdal &lt;/code&gt; (Obviously, you should have Python installed, too.). Interestingly, my installation has thus far been a failure since I chose to use Postgres 8.3. If you're on Gutsy or prior, you may have better luck (in fact, I'm almost 100% sure you will) with Postgres 8.2, against which the geocoder code seems to have been tested. I can't guaranteee these instructions are the same, however. They should be.. I can't imagine any of these dependencies not existing in the version of the distro that's just 6 months old :-), but the versions may be different. Anyway: take away is that you should install 8.2 but be cautious. The rest of these instructions are referencing my 8.3 installation, so please change them as necessary. &lt;/li&gt; &lt;li&gt; Install PostGIS functions and spatial ref definitions. This enables PostGIS itself on your database. &lt;br /&gt; &lt;code&gt; \i /usr/share/postgresql-8.3-postgis/lwpostgis.sql \i /usr/share/postgresql-8.3-postgis/spatial_ref_sys.sql &lt;/code&gt; &lt;/li&gt; &lt;li&gt; Install postgresql-contrib-8.3 for soundex (from fuzzystrmatch)&lt;code&gt;This looks something like: &lt;/code&gt; psql -U postgres your_database_name &amp;lt; /usr/share/postgresql/8.3/contrib/fuzzystrmatch.sql . There's all sorts of worthy things in the contrib modules, so take your time and do some research and install anything you think useful. &lt;/li&gt; &lt;li&gt; Obtain the TIGER data from the Census site. I used &lt;code&gt;wget -r http://www2.census.gov/geo/tiger/tiger2006se&lt;/code&gt; &lt;/li&gt; &lt;li&gt; You need to modify, and then run, &lt;code&gt;import/load_tiger.sh. &lt;/code&gt;. What this will do is load all the TIGER data from http://www2.census.gov/geo/tiger/tiger2006se/ into the database in a sort of raw unfettered way so that the processing to setup the Geocoder works. Here are the modifications I made before running it:&lt;br /&gt; &lt;code&gt;&lt;/code&gt;&lt;pre&gt;#!/bin/bash&lt;br /&gt;&lt;br /&gt;FIRST=&amp;quot;&amp;quot;&lt;br /&gt;for file in /home/jlong/Desktop/gis/www2.census.gov/geo/tiger/tiger2006se/*/*.ZIP; do&lt;br /&gt; ./tigerimport.sh append MYDATABASE $file $FIRST&lt;br /&gt; if [ -z &amp;quot;$FIRST&amp;quot; ]; then&lt;br /&gt; FIRST=&amp;quot;-a&amp;quot;&lt;br /&gt; fi&lt;br /&gt;done&lt;/pre&gt; You see? All I change was the value for MYDATABASE and the value for pointing tot he directory where I had downloaded all the data fromthe census site. Also, I modified tigerimport.sh itself. Whenever I saw lines starting with ogr2ogr, I modified the connection paramaters as appropriate: &lt;code&gt;ogr2ogr $PRE $OGROPTS $SRS &amp;quot;PG:dbname=$DATABASE user=MYUSEr password=MYPW host=127.0.0.1&amp;quot; $TIGER CompleteChain $POST&lt;/code&gt;. For my setup, I needed to specify the host. Which I guessed was done using a 'host=127.0.0.1' parameter. That seemed to work. Simialarly, before you start importing everything, you may run into encoding issues down the line after this step. You can 'undo' it afterwards. This was necessary as the client's talking to my database were trying to send non UTF8 data to my database which was UTF8. &lt;code&gt;ALTER DATABASE lemanger SET client_encoding=latin1; &lt;/code&gt;. Alright, finally, run the script above once you're confident everything's changed the way it needs to be! &lt;strong&gt;Warning&lt;/strong&gt; On my personal workstation with a 3GHz Pentium 4 (Not dual core, but still, no slouch) and 2 GB of RAM, this process took 28 hours and 30GBs or so of space. This is not a 'grab a cup of coffee' situation. This is, 'go visit the family ... in the next state... and stop all other concurrently running programs on the workstation for a day' situation. In total -- by the way -- so you don't get in over your head, I needed upwards of 100 GB of free space to complete this process. Some of that space is eventually recoverable, because it's temporary. But still, if you want to preflight this process with just one state, that may be advisable if you have a small hard disk. Another thing to note by the way is that a 'State', in this case, is a state of the United States and includes in its definition 59 entities that aren't from the 50 proper US 'States', including Puerto Rico, for example. Very cool. &lt;/li&gt; &lt;li&gt; Here's where I'm only a little sure of what to do and I could -- in fact -- be wrong. I did get pointed in the right direction (thank you Stephen Woodbridge!), so hopefully this is correct. The next step consists of creating tables that the geocoder will need from another set of data, the US Census Shape Boundry files. They are are at http://www.census.gov/geo/www/cob/bdy_files.html. You don't need them all, just a few. They organized according to a code, as described here: http://www.census.gov/geo/www/cob/filenames.html. Thus, each file is a data set, and some correspond to granularities smaller than 'national'. When you see some of the tables that you're expected to have installed, it's looking for 'national' data sets, and I couldn't find them for all of them. It needs tables of the following type: &lt;ul&gt; &lt;li&gt; cs99_d00 - &lt;a href="http://www.census.gov/geo/www/cob/cs2000.html"&gt; county subdivisions&lt;/a&gt; &lt;/li&gt;&lt;li&gt;pl99_d00 &lt;a href="http://www.census.gov/geo/www/cob/pl2000.html"&gt;places&lt;/a&gt; &lt;/li&gt;&lt;li&gt;co99_d00 &lt;a href="http://www.census.gov/geo/www/cob/co2000.html"&gt;counties&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; Mouse over the links to verify that data you're looking at has the code as the data you want. Since 99 means national, and 00 means year 2000, and the part in the begining is the abbreviation, then you know that cs99_d00 is probably county subdivisions from the year 2000 for the national level, which is http://www.census.gov/geo/www/cob/cs2000.html. Notice that there's no 99. And that there's no single set of data! in this case I think we're after &lt;em&gt;just&lt;/em&gt; the .SHP files. For me, it was easier to download those listing pages to my local disk somewehre and then extract the URLs and then download them from that list. Here's I did that.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;#!/bin/bash&lt;br /&gt;cat cs_listing.html |grep -i shp |grep geo|cut -f2 -d\&amp;quot;| while read url; &lt;br /&gt; do &lt;br /&gt; nurl=&amp;quot;http://www.census.gov$url&amp;quot; &lt;br /&gt; echo $nurl; &lt;br /&gt;done &amp;gt; base_of_zip_files.txt &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; That got me a listing of the zip files that I wanted. The next trick was to download those zip files: &lt;pre&gt;&lt;code&gt;#!/bin/bash&lt;br /&gt;cat base_of_zip_files.txt | while read url; &lt;br /&gt; do &lt;br /&gt; nurl=&amp;quot;http://www.census.gov$url&amp;quot; &lt;br /&gt; echo $nurl; &lt;br /&gt; wget $nurl &lt;br /&gt;done &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; That will take a few minutes. I couldn't get the data all in one for anything but the counties dataset. So, I had to download all the data and forge from them one aggregate data. It helps to be meticulous and create a 'boundry' folder inside of which you create separate 'cs', 'co', and 'pl' folders for these datasets. &lt;/li&gt; &lt;li&gt; Once you've downloaded all the datasets, you'll need to install them. Here's my slightly modified version of the script from the installation instructions that come witht he Tiger geocoder. I created one for each dataset and ran it in the same folder as the particular dataset itself:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;#!/bin/bash&lt;br /&gt; find . -iname &amp;quot;*ZIP&amp;quot;|while read l;&lt;br /&gt; do&lt;br /&gt; mkdir -p x; &lt;br /&gt; rm -rf x ;&lt;br /&gt; mkdir x ;&lt;br /&gt; cd x; &lt;br /&gt; unzip .$l; &lt;br /&gt;BASE=`echo *.shp | cut -f1 -d.` ;&lt;br /&gt;ogr2ogr -append -f PostgreSQL -a_srs EPSG:4269 &amp;quot;PG:dbname=DATABASE host=127.0.0.1 \&lt;/code&gt;&lt;br /&gt;&lt;code&gt; user=USER password=PASSWORD&amp;quot; $BASE.shp $BASE -nln &lt;em&gt;TABLE_NAME&lt;/em&gt; -lco DIM=2&lt;br /&gt; cd ..; &lt;br /&gt;&lt;br /&gt;done &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt; Basically, TABLE_NAME is the name of the table (one of the three I mentioned above, dependant on which dataset you're dealing with.) and the rest is just the information needed to get into your database. By the way, if you didn't do the client encoding step I mentioned above, this is where it may bite you in the butt. &lt;/li&gt; &lt;li&gt; Create geometry indexes on all the tables using GiST, eg: &lt;pre&gt;&lt;code&gt; CREATE INDEX completechain_geom_idx ON completechain &lt;/code&gt;&lt;br /&gt;&lt;code&gt; USING GIST (wkb_geometry public.gist_geometry_ops);&lt;br /&gt;&lt;/code&gt; &lt;/pre&gt; &lt;br/&gt; Naturally, since this is operating on the 66 million record behemoth you created in the beginning, this will take many hours. Go watch a movie... or two. &lt;/li&gt; &lt;li&gt; NB: the following steps are pretty straight forward, if a bit tedious. In particular, one of them is &lt;strong&gt;REALLY&lt;/strong&gt; slow and another one is going to break if you're trying this on 8.3 due to cast errors, complaining of comparisons of integers to char/text/varchar data types. The errors are pretty self explanatory and will show you what needs to be fixed. Typically it's just a matter of changing the expression in question to what it was, plus &amp;quot;::text&amp;quot; to incur a cast. &lt;/li&gt; &lt;li&gt; Create lookup tables using &lt;code&gt;tables/lookup_tables.sql&lt;/code&gt;. &lt;/li&gt; &lt;li&gt; Create roads_local using &lt;code&gt;roads_local.sql &lt;/code&gt;. I think this one is the one that does a derivation from a dataset produced by a join on one of the bigger tables, and so it too takes an incredibly long time. 5 hours, or so. &lt;/li&gt; &lt;li&gt; Create 'tiger_geocode_roads' using &lt;code&gt;tiger_geocode_roads.sql&lt;/code&gt; &lt;/li&gt; &lt;li&gt;Run &lt;code&gt;create_geocode.sql&lt;/code&gt; to load the functions &lt;/li&gt; &lt;li&gt; Profit! &lt;/li&gt; &lt;/ol&gt;</summary>
    <dc:date>2008-07-13T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Digression: Setting Up Spring, Velocity, JavaMail, Multi Part MIME messages and Gmail</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/1.html" />
    <author>
      <name />
    </author>
    <modified>2008-06-14T00:00:00Z</modified>
    <issued>2008-06-14T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">This took quite a bit of Googling to get right, so here it is summarized to help prospective journey makers. Spring's integration is very good for the common cases, but lack of insight can prevent you from achieving more complex integrations. For example, I wanted to be able to authenticate against Gmail (this is a program I'm writing to scratch a personal itch, but nonetheless knowing how to authenticate against SSL is a very useful thing in the enterprise.). Then I wanted to be able to send email messages that rendered as HTML for the sophisticated email clients that supported it (I suspect that's the overwhelming majority at this point - it's been a while since &lt;a href="http://rfc.sunsite.dk/rfc/rfc822.html" target="_blank"&gt;RFC 822&lt;/a&gt; was relevant!)&amp;nbsp; and have the content fall back to plain text content otherwise. Finally, I wanted to integrate with Velocity so that I could parameterize my emails readily. This begat the following method, a few stanzas of Spring configuration, and a properties file. &lt;span style="FONT-WEIGHT: bold"&gt;NB&lt;/span&gt;: Replace the values in the properties file with your own information!&amp;nbsp; &lt;br /&gt;&#xD;
  &lt;p&gt;See the &lt;code&gt;public static void main(String[] args)&lt;/code&gt; method to see an example invocation of this code. &lt;br /&gt;&lt;/p&gt;&#xD;
  &lt;pre&gt;# utils.properties&lt;br /&gt;mail.smtp.host=smtp.gmail.com&lt;br /&gt;mail.username=USERNAME@gmail.com&lt;br /&gt;mail.password=PASSWORD &lt;br /&gt;mail.smtp.port=465 &lt;/pre&gt;&#xD;
  &lt;p&gt;The Spring configuration file is not as overwhelming as it looks - most of it is scaffolding.&lt;/p&gt;&#xD;
  &lt;pre&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;beans xmlns=&amp;quot;http://www.springframework.org/schema/beans&amp;quot; &lt;br /&gt;    xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&lt;br /&gt;       xmlns:tx=&amp;quot;http://www.springframework.org/schema/tx&amp;quot; &lt;br /&gt;      xmlns:aop=&amp;quot;http://www.springframework.org/schema/aop&amp;quot;&lt;br /&gt;       xsi:schemaLocation=&amp;quot;&lt;br /&gt;         http://www.springframework.org/schema/beans&lt;br /&gt;         http://www.springframework.org/schema/beans/spring-beans-2.0.xsd&lt;br /&gt;         http://www.springframework.org/schema/tx&lt;br /&gt;         http://www.springframework.org/schema/tx/spring-tx-2.0.xsd&lt;br /&gt;         http://www.springframework.org/schema/aop&lt;br /&gt;         http://www.springframework.org/schema/aop/spring-aop-2.0.xsd&lt;br /&gt;         http://www.springframework.org/schema/lang&lt;br /&gt;         http://www.springframework.org/schema/lang/spring-lang-2.0.xsd&lt;br /&gt;        &amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;bean id=&amp;quot;mailSender&amp;quot; class=&amp;quot;org.springframework.mail.javamail.JavaMailSenderImpl&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;property name=&amp;quot;host&amp;quot; value=&amp;quot;${mail.smtp.host}&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;property name=&amp;quot;port&amp;quot; value=&amp;quot;${mail.smtp.port}&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;property name=&amp;quot;username&amp;quot; value=&amp;quot;${mail.username}&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;property name=&amp;quot;password&amp;quot; value=&amp;quot;${mail.password}&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;property name=&amp;quot;javaMailProperties&amp;quot;&amp;gt;&lt;br /&gt;            &amp;lt;props&amp;gt;&lt;br /&gt;                &amp;lt;prop key=&amp;quot;mail.smtp.host&amp;quot;&amp;gt;${mail.smtp.host}&amp;lt;/prop&amp;gt;&lt;br /&gt;                &amp;lt;prop key=&amp;quot;mail.smtp.port&amp;quot;&amp;gt;${mail.smtp.port}&amp;lt;/prop&amp;gt;&lt;br /&gt;                &amp;lt;prop key=&amp;quot;mail.smtp.auth&amp;quot;&amp;gt;true&amp;lt;/prop&amp;gt;&lt;br /&gt;                &amp;lt;prop key=&amp;quot;mail.smtp.starttls.enable&amp;quot;&amp;gt;true&amp;lt;/prop&amp;gt;&lt;br /&gt;                &amp;lt;prop key=&amp;quot;mail.debug&amp;quot;&amp;gt;false&amp;lt;/prop&amp;gt;&lt;br /&gt;&lt;br /&gt;                &amp;lt;prop key=&amp;quot;mail.smtp.socketFactory.port&amp;quot;&amp;gt;${mail.smtp.port}&amp;lt;/prop&amp;gt;&lt;br /&gt;                &amp;lt;prop key=&amp;quot;mail.smtp.socketFactory.class&amp;quot;&amp;gt;javax.net.ssl.SSLSocketFactory&amp;lt;/prop&amp;gt;&lt;br /&gt;                &amp;lt;prop key=&amp;quot;mail.smtp.socketFactory.fallback&amp;quot;&amp;gt;false&amp;lt;/prop&amp;gt;&lt;br /&gt;            &amp;lt;/props&amp;gt;&lt;br /&gt;        &amp;lt;/property&amp;gt;&lt;br /&gt;    &amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;bean id=&amp;quot;emailUtils&amp;quot; class=&amp;quot;com.joshlong.example.util.EmailUtils&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;property name=&amp;quot;mailSender&amp;quot; ref=&amp;quot;mailSender&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;bean class=&amp;quot;org.springframework.beans.factory.config.PropertyPlaceholderConfigurer&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;property name=&amp;quot;location&amp;quot;&amp;gt;&lt;br /&gt;            &amp;lt;value&amp;gt;utils.properties&amp;lt;/value&amp;gt;&lt;br /&gt;        &amp;lt;/property&amp;gt;&lt;br /&gt;        &amp;lt;property name=&amp;quot;ignoreUnresolvablePlaceholders&amp;quot;&amp;gt;&lt;br /&gt;            &amp;lt;value&amp;gt;true&amp;lt;/value&amp;gt;&lt;br /&gt;        &amp;lt;/property&amp;gt;&lt;br /&gt;    &amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/beans&amp;gt; &lt;br /&gt;&lt;br /&gt;&lt;/pre&gt; &lt;/p&gt;&#xD;
  &lt;p&gt;And finally, the utility code itself. I have a Maven POM that's bringing in most of this stuff. You could probably get there by using Spring-All and making sure to add velocity, Apache Commons Lang, and the JavaMail/Activation jars. &lt;p&gt;&#xD;
  &lt;pre&gt;&lt;br /&gt;package com.joshlong.example.util;&lt;br /&gt;&lt;br /&gt;import org.apache.commons.io.IOUtils;&lt;br /&gt;import org.apache.commons.lang.StringUtils;&lt;br /&gt;import org.apache.log4j.Logger;&lt;br /&gt;import org.apache.velocity.VelocityContext;&lt;br /&gt;import org.apache.velocity.app.Velocity;&lt;br /&gt;import org.apache.velocity.tools.generic.DateTool;&lt;br /&gt;import org.springframework.context.ApplicationContext;&lt;br /&gt;import org.springframework.context.support.ClassPathXmlApplicationContext;&lt;br /&gt;import org.springframework.mail.MailException;&lt;br /&gt;import org.springframework.mail.javamail.JavaMailSenderImpl;&lt;br /&gt;&lt;br /&gt;import javax.mail.Message;&lt;br /&gt;import javax.mail.internet.InternetAddress;&lt;br /&gt;import javax.mail.internet.MimeBodyPart;&lt;br /&gt;import javax.mail.internet.MimeMessage;&lt;br /&gt;import javax.mail.internet.MimeMultipart;&lt;br /&gt;import java.io.StringWriter;&lt;br /&gt;import java.util.ArrayList;&lt;br /&gt;import java.util.HashMap;&lt;br /&gt;import java.util.List;&lt;br /&gt;import java.util.Map;&lt;br /&gt;&lt;br /&gt; /** &lt;br /&gt;  *&lt;br /&gt;  * @author Josh Long&lt;br /&gt;  * &lt;br /&gt;  * This class is designed to support _easily_ sending out e-mails and parameterizing them. &lt;br /&gt;  * In approach, this is &amp;lt;i&amp;gt;almost&amp;lt;/i&amp;gt; as simple as PHP's send() function! Naturally, it's&lt;br /&gt;  * quite a bit more powerful for it's simplicity. &lt;br /&gt;  * &lt;br /&gt;  */&lt;br /&gt;public class EmailUtils {&lt;br /&gt;&lt;br /&gt;    private Logger log = Logger.getLogger(EmailUtils.class);&lt;br /&gt;    private JavaMailSenderImpl mailSender;&lt;br /&gt;&lt;br /&gt;    public JavaMailSenderImpl getMailSender() {&lt;br /&gt;        return mailSender;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setMailSender(JavaMailSenderImpl mailSender) {&lt;br /&gt;        this.mailSender = mailSender;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public static void main(String a[]) throws Throwable {&lt;br /&gt;        ApplicationContext context = new ClassPathXmlApplicationContext(&amp;quot;utils.xml&amp;quot;);&lt;br /&gt;        EmailUtils utils = (EmailUtils) context.getBean(&amp;quot;emailUtils&amp;quot;);&lt;br /&gt;        Map&amp;lt;String, Object&amp;gt; params = new HashMap&amp;lt;String, Object&amp;gt;();&lt;br /&gt;        params.put(&amp;quot;user&amp;quot;, &amp;quot;John Doe&amp;quot;);&lt;br /&gt;        utils.sendEmailMessage(&amp;quot;from@foobar.com&amp;quot;, new String[]{&amp;quot;towhoever@gmail.com&amp;quot;}, &lt;br /&gt;           &amp;quot;A Subject&amp;quot;, &amp;quot;Hello ${user} from plain text&amp;quot;,&lt;br /&gt;           &amp;nbsp;&amp;quot;&amp;lt;h1&amp;gt;Hello ${user} from High Fidelity HTML&amp;lt;/h1&amp;gt;&amp;quot;, params);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String mergeTemplate(String template, Map&amp;lt;String, Object&amp;gt; macros) throws Throwable {&lt;br /&gt;&lt;br /&gt;        if (StringUtils.isEmpty(template))&lt;br /&gt;            return StringUtils.EMPTY;&lt;br /&gt;&lt;br /&gt;        String answer = null;&lt;br /&gt;&lt;br /&gt;        VelocityContext context = new VelocityContext();&lt;br /&gt;&lt;br /&gt;        context.put(&amp;quot;dateTool&amp;quot;, new DateTool());&lt;br /&gt;&lt;br /&gt;        for (String key : macros.keySet())&lt;br /&gt;            context.put(key, macros.get(key));&lt;br /&gt;&lt;br /&gt;        StringWriter writer = new StringWriter();&lt;br /&gt;&lt;br /&gt;        Velocity.init();&lt;br /&gt;&lt;br /&gt;        if (Velocity.evaluate(context, writer, &amp;quot;LOG&amp;quot;, template)) {&lt;br /&gt;            IOUtils.closeQuietly(writer);&lt;br /&gt;            answer = writer.toString();&lt;br /&gt;        }&lt;br /&gt;        return answer;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void sendEmailMessage(String from, String[] to, String subject, String textBody, String htmlBody, Map&amp;lt;String, Object&amp;gt; params) throws Throwable {&lt;br /&gt;&lt;br /&gt;        MimeMessage msg = mailSender.createMimeMessage();&lt;br /&gt;&lt;br /&gt;        msg.setFrom(new InternetAddress(from));&lt;br /&gt;        msg.setSubject(subject);&lt;br /&gt;        msg.setRecipients(Message.RecipientType.TO, getInternetAddresses(to));&lt;br /&gt;&lt;br /&gt;        MimeMultipart content = new MimeMultipart(&amp;quot;alternative&amp;quot;);&lt;br /&gt;&lt;br /&gt;        if (!StringUtils.isEmpty(textBody)) {&lt;br /&gt;            MimeBodyPart text = new MimeBodyPart();&lt;br /&gt;            text.setText(mergeTemplate(textBody, params));&lt;br /&gt;            content.addBodyPart(text);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        if (!StringUtils.isEmpty(htmlBody)) {&lt;br /&gt;            MimeBodyPart html = new MimeBodyPart();&lt;br /&gt;            html.setContent(mergeTemplate(htmlBody, params), &amp;quot;text/html&amp;quot;);&lt;br /&gt;            content.addBodyPart(html);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        msg.setContent(content);&lt;br /&gt;        msg.saveChanges();&lt;br /&gt;&lt;br /&gt;        try {&lt;br /&gt;            mailSender.send(msg);&lt;br /&gt;        } catch (MailException ex) {&lt;br /&gt;            log.info(&amp;quot;Issue with sending out mail having body &amp;quot; + StringUtils.defaultString(textBody) + &amp;quot;; params are:&amp;quot; + params, ex);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    private InternetAddress[] getInternetAddresses(String... emails) throws Throwable {&lt;br /&gt;        List&amp;lt;InternetAddress&amp;gt; addys = new ArrayList&amp;lt;InternetAddress&amp;gt;();&lt;br /&gt;        for (String e : emails)&lt;br /&gt;            addys.add(new InternetAddress(e));&lt;br /&gt;        return addys.toArray(new InternetAddress[0]);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;</summary>
    <dc:date>2008-06-14T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Samuel Jackson for HTTP error codes!! Awesome.</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20080525.html" />
    <author>
      <name />
    </author>
    <modified>2008-05-25T00:00:00Z</modified>
    <issued>2008-05-25T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;a href="http://streaming.linux-magazin.de/events/apacheconfree/archive/rfielding/frames-java.htm" target="_blank"&gt;Roy Fieldings on Apache 3.0&lt;/a&gt; (well, sort of -- more of a series of hopeful hypotheticals than anything else...). It's brilliant: my favorite idea? Using &lt;a href="http://www.samuelljackson.com" target="_blank"&gt;Samuel Jackson&lt;/a&gt; pictures and quotes for all HTTP error codes!</summary>
    <dc:date>2008-05-25T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Webmonkey.com is back!</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20080524.html" />
    <author>
      <name />
    </author>
    <modified>2008-05-24T00:00:00Z</modified>
    <issued>2008-05-24T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">Webmonkey.com is back! I just noticed this -- it's laid dormant for years and was -- in my humble opinion -- one of the coolest places to catch up on technology in its heyday. Go &lt;a href="http://www.webmonkey.com/" target="_blank"&gt;webmonkey.com&lt;/a&gt;!</summary>
    <dc:date>2008-05-24T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Spring Application Server</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20080430.html" />
    <author>
      <name />
    </author>
    <modified>2008-04-30T00:00:00Z</modified>
    <issued>2008-04-30T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;Uh oh! I guess I was asleep at the wheel on this one! SpringSource (the company that was formerly called Interface21 and (obviously) which funded the development / growth of the Spring Framework) has announced a Java application server. I am more than a little leary about this, however. It's not based on Java EE (yet, though apparently that's not out of the picture with Java EE6's "profiles"), and is instead a sort of best-of-breed setup of Tomcat and a slew of components from the "Spring Portfolio."&amp;nbsp; (Think: Spring web flow, Spring web services, Spring LDAP.. is Spring batch in there?) &lt;/p&gt;&lt;p&gt;Could be interesting. Using OSGi to sidestep the whole kernel architecture issue was smart, and reflective of what everybody seems to be doing. OSGi seems to be the "next big thing." Super packages, a proposed feature set in Java 7, reflects this.&lt;/p&gt;&lt;p&gt;Do you remember when there was just a Spring IOC container, and then for a long time, a Spring IOC container, a web framework and a page flow framework? I suppose I should've seen this coming when the dependency injection container grew web-framework legs. &lt;/p&gt;&lt;p&gt;Anyway, the application server looks interesting (at this second I cant find any mention of it on either SpringFramework.org or SpringSource.com), but infoq.com has an interesting bit on it (http://www.infoq.com/news/2008/04/springsource-app-platform). They've taken Tomcat (which they contend - rightly so - is all the application server 80% of JEE users are using anyway) and loaded it up with the "Spring Portfolio" and - using OSGi - have provided a kernel to service the components deployed to the server. In short, it sounds like a full blown application server wherein the lookups have been removed. I am not sure if this is revolutionary or evolutionary. If they've merely provided an OSGi core and brought commodity libraries into the fold to provide an integrated solution, then I'm not sure how it'll help people who've already got a JBoss or a Glassfish working.&amp;nbsp; If however you're looking to craft a "lightweight" solution from scratch, maybe this is just what the doctor ordered.&lt;/p&gt;&lt;p&gt;I don't really like the tact SpringSource.com seems to be taking with their marketing: (from &lt;a href="http://www.springsource.com/web/guest/products/enterprise/edition"&gt;their marketing&lt;/a&gt;)&lt;/p&gt;&lt;p&gt;"Spring Enterprise Edition is certified and warranted to be virus-free and has undergone rigorous testing to ensure that you receive the highest reliability. Indemnification is provided at the gold and platinum subscription levels. Indemnity provides organizations with additional peace of mind and the assurance that SpringSource promptly rectifies any potential intellectual property issues." &lt;/p&gt;&lt;p&gt;Is that really an issue? Viruses? Did they mean bugs? I don't know that I've ever had to run a virus scan on a Java assembly before I used it. &lt;/p&gt;&lt;p&gt; I love the Spring framework. I'm sorry to see such pandering. &amp;nbsp;I wonder what else the technology will yield. &lt;/p&gt;</summary>
    <dc:date>2008-04-30T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Adobe Media Player</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/200804121.html" />
    <author>
      <name />
    </author>
    <modified>2008-04-12T00:00:00Z</modified>
    <issued>2008-04-12T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; Adobe's Finally Released Their Much Rumored Media Player: "Adobe Media&#xD;
Player"It's sweet. Built on AIR, it's a stand-alone "installable" Flash&#xD;
program that allows you to manage, search out, and watch FLV / H264&#xD;
content inside of Flash. It's beautiful to use but my big gripe is that&#xD;
because it runs on AIR, there's no Linux version.They seem to have&#xD;
lined up some pretty big content-producers, which should make the&#xD;
deployment easier. I wonder if they're fixing to be to digitial video /&#xD;
flash video what iTunes is to music. A one-stop video content shop /&#xD;
hub.. Absolutely stunning UI - and it's consistent with some of their&#xD;
more recent stuff, including Colour and Adobe Photoshop Express. I&#xD;
wonder where they'll take this - I wonder if there's a way to share&#xD;
video playlists etc? Integration with Youtube.com just like Apple TV&#xD;
did?&lt;/p&gt;</summary>
    <dc:date>2008-04-12T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>JAWR: a JavaScript compression library</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20080412.html" />
    <author>
      <name />
    </author>
    <modified>2008-04-12T00:00:00Z</modified>
    <issued>2008-04-12T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;With rich internet applications being all the buzz these days people are finding themselves pouring more and more interactivity onto their pages. Typically, this is if nothing else through a slew of external third party libraries, or as with Dojo and Scriptaculous and YUI, entire frameworks! Taken one at a time these various scripts ? used sparingly and perhaps compressed ? don't cause too much a burden on your server or the client during download. Right... &amp;nbsp;&lt;/p&gt;&lt;p&gt;So say you build up a complex layout / widget set for your site. Say that you're also consistently using prototype.js and rico.js and a few of the scriptaculous libraries and that you've also got a few other 'commodity' scripts that are used everywhere (company libraries, a widget built on prototype, etc, etc).&amp;nbsp; Anything. Now you've got 6 different .js files to include on every page, and you haven't even STARTED loading your code ? you remember that code, right? The code that actually does the line of business you set out to help with this application in the first place? All these HTTP requests are bad for the server, but they're also really bad for the client. Load enough scripts and eventually things to start to deteriorate, even crash, on the client. &lt;/p&gt;&lt;p&gt;So now you see the problem. Different half-solutions exist. The Dojo framework has done extensive work to provide a compressor that runs as an ant task and that even obfuscates your code. One version ? thanks to a donation by AOL - even does dead code path elimination! However this is a Dojo-only solution and, frankly, I found it a little fragile if you do anything cute in your JavaScript.&amp;nbsp; Another solution is the GWT route from Google. GWT takes lava code and &amp;quot;compiles&amp;quot; into JavaScript. The advantage of this is that the JavaScript is super-lean / optimized to work across browsers and mechanically, and utterly concise. The disadvantage of it is that ? like the Dojo solutions ? is inextricably tied to the GWT framework. &lt;/p&gt;&lt;p&gt;There are JavaScript compressors. http://www.brainjar.com/js/crunch/ has been around for the better part of a decade! There are others- - and the idea is the same: take JavaScript and regex your way into a more compact JavaScript file. Some of these solutions become unusable if you neglect to terminate your statements with a semicolon as they blindly wrap all the lines together, yielding non-runnable JavaScript code. Two other problems with this solution ? as with the others previously mentioned-- is that it's not automated. Each time you update your code, you need to re run it all through that program on the site. Similarly, it's only compressing the code itself, not the format in which its delivered to the client. G-Zip compression works great for JavaScript content, so long as it it's not served to browsers that don't support it. &lt;/p&gt;&lt;p&gt;My definition of an ideal solution would be something that knew how to combine multiple libraries into one, compact that code except where the resulting source code would be made un runnable ? and that conditionally served gzip content. &lt;/p&gt;&lt;p&gt;Enter JAWR, a library freely available from https://jawr.dev.java.net/ that does all of the above. It even can work its magic on .css files! It provides tag libraries (accessible from both JSP and now ?with the 2.0 release ? from Facelets). I'm sure if you were so inclined you could reverse engineer the tag library handlers and wrap it in a Tapestry component or a Wicket widget. &lt;/p&gt;&lt;p&gt;Below, I walk through setting up a simple example: &lt;/p&gt;&lt;p&gt;For my example, I'm using JSF and Maven. Set up the web application however you like. If you're using Maven, here is the dependency I'm using: &lt;/p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;net.jawr&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;jawr&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;[1.4,]&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;/code&gt;&lt;p&gt;Ensure that you have the following repository added to Maven: &lt;/p&gt;&lt;code&gt;&amp;nbsp;&amp;lt;repository&amp;gt;&lt;br /&gt;&amp;lt;id&amp;gt;maven2-repository.dev.java.net&amp;lt;/id&amp;gt;&lt;br /&gt;&amp;lt;name&amp;gt;Java.net Repository for Maven&amp;lt;/name&amp;gt;&lt;br /&gt;&amp;lt;url&amp;gt;http://download.java.net/maven/2/&amp;lt;/url&amp;gt;&lt;br /&gt;&amp;lt;layout&amp;gt;default&amp;lt;/layout&amp;gt;&lt;br /&gt;&amp;lt;/repository&amp;gt;&lt;/code&gt;&lt;p&gt;I configured the JAWR servlet to handle my JavaScript files in my web.xml as follows:&lt;/p&gt;&lt;code&gt;&amp;lt;servlet&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;servlet-name&amp;gt;JavascriptServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;servlet-class&amp;gt;net.jawr.web.servlet.JawrServlet&amp;lt;/servlet-class&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;init-param&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;param-name&amp;gt;type&amp;lt;/param-name&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;param-value&amp;gt;js&amp;lt;/param-value&amp;gt; &amp;lt;!-- this could be css --&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/init-param&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;!-- Location in classpath of the config file --&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;init-param&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;param-name&amp;gt;configLocation&amp;lt;/param-name&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;param-value&amp;gt;jawr.properties&amp;lt;/param-value&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/init-param&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;load-on-startup&amp;gt;1&amp;lt;/load-on-startup&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/servlet&amp;gt; &amp;nbsp;&amp;lt;servlet-mapping&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;servlet-name&amp;gt;JavascriptServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;url-pattern&amp;gt;*.js&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;p&gt;The above configuration requires the presence of a file named jawr.properties on the classpath. &lt;/p&gt;&lt;p&gt;Here's my &lt;code&gt;jawr.properties&lt;/code&gt;. &lt;/p&gt;&lt;code&gt; #https://jawr.dev.java.net/docs/descriptor_syntax.html&lt;br /&gt;# Common properties&lt;br /&gt;jawr.debug.on=false&lt;br /&gt;jawr.gzip.on=true&lt;br /&gt;jawr.gzip.ie6.on=false&lt;br /&gt;jawr.charset.name=UTF-8 # Javascript properties and mappings&lt;br /&gt;jawr.js.bundle.basedir=/lib/js&lt;br /&gt;jawr.js.commonURLPrefix=003&lt;br /&gt;jawr.js.bundle.names=appcore,railsjs# All files within /js/lib will be together in a bundle.&lt;br /&gt;# The remaining scripts will be served sepparately.jawr.js.bundle.effects.id=/bundles/effects.js&lt;br /&gt;jawr.js.bundle.effects.global=true&lt;br /&gt;jawr.js.bundle.effects.mappings=/lib/js/scriptaculous/**&lt;br /&gt;jawr.js.bundle.effects.prefix=effects&lt;/code&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;jawr.js.bundle.appcore.id=/bundles/appcore.js&lt;br /&gt;jawr.js.bundle.appcore.global=true&lt;br /&gt;jawr.js.bundle.appcore.mappings=/lib/js/appcore/**&lt;br /&gt;jawr.js.bundle.appcore.prefix=appcore &amp;nbsp;&amp;nbsp;&lt;p&gt;The configuration format is somewhat akin to editing a log4j.properties property file.&lt;/p&gt;&lt;p&gt;In the example above, I'm creating two &amp;quot;bundles&amp;quot; of JavaScript files. All JS in a set is compressed together and made available as one file. It also condenses the JavaScript within the file, condensing new lines. However, if you have JavaScript on two lines and didn't use a semi-colon to terminate the first one, it will leave the second line of JavaScript on a new line. &lt;/p&gt;&lt;code&gt;var a = 1&amp;nbsp; &lt;br /&gt;var b = 2&amp;nbsp; ; &lt;br /&gt;window.alert( 'a = ' + a + ' &amp;amp; b = ' + b ) ; &lt;br /&gt;&lt;/code&gt;&lt;p&gt;roughly becomes: &lt;/p&gt;&lt;code&gt;var a = 1&amp;nbsp; &lt;br /&gt;var b = 2&amp;nbsp; ; window.alert( 'a = ' + a + ' &amp;amp; b = ' + b ) ;&amp;nbsp; &lt;br /&gt;&lt;/code&gt;&lt;p&gt;Pretty cool, eh? &lt;/p&gt;&lt;p&gt;So, in the example above, I tell JAWR to create two &amp;quot;bundles&amp;quot;: &lt;/p&gt;&lt;p&gt;One bundle called &amp;quot;effects&amp;quot; takes together all the JavaScript files in the /lib/js folder and yields one single compressed JavaScript file. Accessing the JavaScript file is simple thanks to the tag libraries shipped with the framework. It's also smart: if you've enabled gzip compression and the client support its, an appropriate URL will be rendered, otherwise a non GZIP'ed but still &amp;quot;minified&amp;quot; JavaScript URL will be rendered. Nice!&lt;/p&gt;&lt;p&gt;Compiling the files at these URLs is time intensive, so by default when your application starts up JAWR caches the permutations of the files it'll deliver, so theres no overhead in request processing except for the tag library to render. If you are debugging in, say, Jetty and would like to make changes to your JavaScript and still benefit from immediate changes, you can enable debug mode and you can enable a periodic &amp;quot;refresh&amp;quot; of the cached bundles. This way, JAWR will write out the individual JavaScrpt files in the same way you were doing before the switch to JAWR. Flip the debug flag off and now it'll render the URL for the single cached / compressed JavaScript file.&lt;/p&gt;</summary>
    <dc:date>2008-04-12T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Hibernate and RMI and you.</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20080119.html" />
    <author>
      <name />
    </author>
    <modified>2008-01-19T00:00:00Z</modified>
    <issued>2008-01-19T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">Alright -- this one bugs me to no end. &lt;br&gt;&lt;br&gt;Have you ever worked with Hibernate, and some sort of Java remoting API on Java 1.6? That could apply to ALMOST anyone. EJB3 users &lt;span style="font-weight: bold;"&gt;(me!).&lt;/span&gt; Spring HttpInvoker/Hibernate3 &lt;span style="font-weight: bold;"&gt;(me!).&lt;/span&gt; RMI/Hibernate3 &lt;span style="font-weight: bold;"&gt;(me!).&lt;/span&gt; They all count. &lt;br&gt;&lt;br&gt;Did you get a bug whereby a remote client complains (err, blows chunks with a ClassCastException) about not being able to set a field on an entity/POJO that makes use of Hibernate's "lazy" initialization across the wire? You did? Were you going to tell me about it? I mean, come on. I thought we were friends.&lt;br&gt;&lt;br&gt;I upgraded Ubuntu and JBoss on my dev machine at home to be able to test. Amazingly bad things ensued. I spent a good hour finding a bug that I was sure must be afflicting other people. After all, it's essentially a bug in JBoss' EJB3. And Hibernate. And Java. And RMI. I don't know but it seemed rather hard to pin. &lt;br&gt;&lt;br&gt;It was a bug in Java 1.6. I don't know why, I don't know the details. &lt;a href="http://jira.jboss.org/jira/browse/JBAS-3952" target="_blank"&gt;This&lt;/a&gt; lone result (which eluded a lot of my google searches -- which means this was so minor an issue that even Google didn't find it!?) suggested a workaround and I - ears burning - jumped at the completely ridiculous, nonsensical solution. Because... it was just crazy enough to work. A few &lt;span style="font-weight: bold;"&gt;update-java-alternatives&lt;/span&gt; later, I was back on Java 1.5. I re-ran my tests. &lt;br&gt;&lt;br&gt;&lt;font size="2"&gt;IT WORKED WHY WOULD IT WORK? HOW WOULD THAT EVEN BEGIN TO BREAK?&lt;/font&gt;&lt;br&gt;&lt;br&gt;Everything's fine now! Hurrah. I can have my hour back, too?&amp;nbsp; No? &lt;br&gt;&lt;br&gt;&lt;span style="font-weight: bold;"&gt;MySQL got bought by Sun&lt;/span&gt;. &lt;span style="font-weight: bold;"&gt;Oracle bought BEA&lt;/span&gt;. I understand the BEA acquisition. Oracle's Application server sucks rocks. BEA is the gold standard and Oracle has cash to burn. Simple economics: don't innovate what you can accquire quicker.&lt;br&gt;&lt;br&gt;But why would Sun buy MySQL? Sun is pitching it as a rounding-out of its stack -- now they have the language (Java!), the database (JavaDB for embedded, MySQL for enterprise), the server (Glassfish) and the tool chain (javac, Netbeans, and the recently retired Sun Java Web creator, etc.).&lt;br&gt;&lt;br&gt;Does this put them in the line of sight of Oracle, which has a better database and a better application server? Why didn't they buy the company supportig Postgres, which is a better database (well, that is, I define "better" as being more readily deployed as a replacement for Oracle. Neither have particularly good clustering, enterprise features, but Postgres comes closer in terms of portability.)? Is Sun betting on the up-and-coming InnoDB database engine replacement (whose parent company Oracle owns, a propos) Falcon to make MySQL an Oracle killer? Even a Microsoft SQL Server killer? &lt;br&gt;&lt;br&gt;And of course, what does this mean for the PHP/Lamp community? MySQL's crossed over. It's got an air of "enterprise" to&amp;nbsp; it from Sun's purchase. More so than even their teamup with SAP. More so than MySQL's oft-public proliferation and succcess storeis. This database, which until recently didn't support constraints in a useful way, is now Sun's. Will they keep making releases available for free? Will they switch to the commercial model completely? Will this again jeopardize the MySQL /PHP extension's status? Heck, does this mean that the Java MySQL driver will get some love?&lt;br&gt;&lt;br&gt;I can't wait to hear more. &lt;br&gt;&lt;br&gt;&lt;br&gt;</summary>
    <dc:date>2008-01-19T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>The world keeps spinning.. quickly.</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20071110.html" />
    <author>
      <name />
    </author>
    <modified>2007-11-10T00:00:00Z</modified>
    <issued>2007-11-10T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">This is sort of Java-related, but as it's used in some way by all of the major java web frameworks, it's worth noting that &lt;a href="http://dojotoolkit.org/" target="_blank"&gt;Dojo 1.0&lt;/a&gt; has been released! &lt;br&gt;&lt;br&gt;As for me -- I've been knee deep in amazingly cool code. I've not had a chance to take too deep a look at Spring 2.5, but it seems promising -- particularly the renewed support for alternative configuration patterns. Maybe Guice is stirring the pot? &lt;br&gt;&lt;br&gt;Also, I've noticed that the benefits of grids are increasingly popular. I'm very interested in grids -- they're useful for process intensive applications like search engines, and almost anything that can be represented as a directed edge graph. Microsoft's &lt;a href="http://www.youtube.com/watch?v=WPhE5JCP2Ak" target="_self"&gt;Dryad&amp;nbsp; &lt;/a&gt; seems to be a graph based implementation of a the grid computing paradigm from Google, 'MapReduce'. That is, where as MapReduce is just one type of algorithm distributed over a grid, Dryad is a way to express algorithms, distributed over a grid. Sounds amazing. &lt;br&gt;&lt;br&gt;&lt;br&gt;</summary>
    <dc:date>2007-11-10T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Quick Update, DIY Zoning, Mac/Ubuntu shock, and phantom key commands</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20070722.html" />
    <author>
      <name />
    </author>
    <modified>2007-07-22T00:00:00Z</modified>
    <issued>2007-07-22T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; It has been forever and a day since I've blogged, and not for want of trying!&lt;/p&gt;&lt;p&gt;It's been an amazing, wonderful month at my latest gig. &lt;/p&gt;&lt;p&gt;As I type this on my windows copy of MS Word, I find myself reaching for my Mac-imbued command keys and trying to use alt to do weird things. &lt;/p&gt;&lt;p&gt;I got introduced to Ubuntu Linux, the first Linux distro to ever, ever, completely work out of the box with the super-proprietary hardware on my old Sony VAIO laptop. Even my wireless card works, which was unthinkable! The wireless card never works on Linux without insane hacking on MadWifi (you know the whole ndiswrapper dance?) and some sort of sacrificial lamb... &lt;/p&gt;&lt;p&gt;I'm finding out a lot about the wide world of Cocoa and the utopian computing environment that was (and, to some extent continues to be in modern-day OS X) NeXT.&amp;nbsp; Objective C's turned out to be a lot of fun, and in particular, using Maven Oh yeah, I went to&amp;nbsp;&amp;nbsp; Oregon for the 4th of July weekend, and that was humbling. Absolutely beautiful. Lastly, the last Java User Group's topic was pretty cool, and well worth your time if you're interested in wielding tech and bettering your home : &amp;nbsp;&lt;a href="http://diy-zoning.sourceforge.net/"&gt;DIY zoning&lt;/a&gt;&lt;/p&gt;</summary>
    <dc:date>2007-07-22T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Moving On, Recap of The Phoenix Java User Group   Meeting on the 13th</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20070616.html" />
    <author>
      <name />
    </author>
    <modified>2007-06-16T00:00:00Z</modified>
    <issued>2007-06-16T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">Yesterday (2 hours ago) was the last day at my job, and closes one chapter on my life. I?m thankful for the experience. I will begin the next - undoubtedly amazing -chapter of my life Monday, and am no less than gitty at the prospect. &lt;p&gt;Wednesday was the mensal Java User Group, and a particularly good one at that! I post a recap here because they say that you don?t remember anything you don?t use within 2 weeks, and the least I can do is regurgitate 2 day old knowledge towards that end. &lt;/p&gt; &lt;p&gt;Ted Neward was the speaker, giving two talks.&lt;/p&gt; &lt;p&gt;One was on the groovy language; the notes on this one are briefer, as the talk was lighter.&lt;/p&gt; &lt;ul&gt; &lt;li&gt; Groovy was started 3 years ago by James Strachan. &lt;/li&gt; &lt;li&gt; Goal: create something easier to work with than Java &lt;/li&gt; &lt;li&gt; Java (surprise!) isn?t the last word on languages &lt;/li&gt; &lt;li&gt; Sun?s attitude reminiscent of Grover Cleveland?s suggestion that they should close the patent office ? that?s to say, "what else could there possibly be?" &lt;/li&gt; &lt;li&gt;ACM tried to assess how productive somebody is. They determined that a young programmer writes about the same amount of useful bug free lines of code per day as an experienced programmer, except that the experienced programmer gets the code right the first time around. &lt;/li&gt; &lt;li&gt; ACM said that a language like C gets something like 4-6 assembly instructions per line. Java / C++ get 6-10. Lisp, amazingly, can get hundreds, maybe even thousands! A language can be inherently more powerful. It makes sense to get the most bang for those X lines of code you get a day. &lt;/li&gt; &lt;li&gt;For more, check out the groovy home page.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;The other talk was about debugging ("Busy Java Developers Guide to Debugging"), which I found fascinating because Ted seems to really enjoy this.&lt;/p&gt; &lt;ul&gt;&lt;li&gt; What is a bug? Anything the customer doesn?t expect?&lt;/li&gt; &lt;li&gt; There are utilities, and JDK 5 and 6 introduced a raft of APIs/ tools, like JConsole, which is a service console shipped with JDK 6.&lt;/li&gt; &lt;li&gt; Management needs to display a commitment to quality&lt;/li&gt; &lt;li&gt; Schedule debugging into the project&lt;/li&gt; &lt;li&gt; "Bug chats" are the highest priority meeting that can be called in some environments that Ted has worked&lt;/li&gt; &lt;li&gt; Scott Davis (paraphrase): "Only 40% of projects use some form of unit tests" !&lt;/li&gt; &lt;li&gt; "Ship It!" good book on debugging (I can vouch for that?the book broaches all the stuff you do anyway (setting up a bug tracker, setting up a source code respository, and a heckuva lot of other basics, and makes them a coherent discipline.)&lt;/li&gt; &lt;li&gt; John Robbins, Microsoft SQL Server team, relays that developers used "teddy bear" debugging, talking through an issue with a stuffed animal. Talking through a problem forces the brain to enumerate it in a different manner and potentially will provoke a solution.&lt;/li&gt; &lt;li&gt; Simialarly, sometimes walking away from a problem and taking a walk is beneficial. Often, the solution will come just as you?ve left the office and on the drive home, or as you?re sleeping: "Aha! Eureka!" &lt;/li&gt; &lt;li&gt; JPDA is a general architecture for tooling support in Java. It?s comprised of: &lt;ul&gt; &lt;li&gt; JVMI ? agent inside the debugee?s VM &lt;/li&gt; &lt;li&gt; JDWP ? java debug wire protocol &lt;/li&gt; &lt;li&gt; JDI ? Java debug interface&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt; Other cool utilities: &lt;ul&gt; &lt;li&gt;jdb standard console debugger &lt;/li&gt; &lt;li&gt; extcheck: detects duplicate classes loaded via the $JDK/ext directory. &lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt; Experimental tools: &lt;ul&gt;&lt;li&gt; Jps, jstat, jstud, jinfo, jhat, jmap, jsadegd, jstart: cool experimental tools that aren?t guaranteed, and that are often written by Linux/Solaris people and may not run on Windows &amp;nbsp; &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt; &lt;li&gt; How to approach a bug &lt;ul&gt;&lt;li&gt; "Duplicability" regenerates the bug once in 24 hours. &lt;/li&gt; &lt;li&gt; Throw unit tests at it (which you should be doing anyway!) &lt;/li&gt; &lt;li&gt; Track it in anyway shape or form. Enter it into the bug system for both the aforementioned enumeration which may itself be profitable and for the documentation to better aid the next guy. &lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt; Use the binary chop &lt;ul&gt; &lt;li&gt; Dive and conquer &lt;/li&gt; &lt;li&gt; Start at component boundaries and then work out. &lt;/li&gt; &lt;li&gt; Raise debug thresholds.&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt;&lt;p&gt; &amp;nbsp;Naturally, I whole heartedly you go out and see &lt;a href="http://www.tedneward.com"&gt;Ted Neward&lt;/a&gt;  speak (in particular he's pushing &lt;a href="http://www.nofluffjuststuff.com/speaker_view.jsp?speakerId=9&amp;amp;section=blog"&gt;No Fluff, Just Stuff"&lt;/a&gt;) when you get a chance. He was obviously knowledgeable, a good speaker, very worth it.&amp;nbsp; &lt;/p&gt;</summary>
    <dc:date>2007-06-16T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Safari For Windows! Huzzah!</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20070613.html" />
    <author>
      <name />
    </author>
    <modified>2007-06-13T00:00:00Z</modified>
    <issued>2007-06-13T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">Apple's got &lt;a href="http://www.apple.com/safari/" target="_self"&gt;Safari available for Windows&lt;/a&gt; (is this a surprise to anyone though?). &lt;br&gt;&lt;br&gt;The site wasn't as funny as when iTunes came out and the website had something to the effect of, "Hell's frozen over: iTunes for Windows." Good news, nonetheless!&lt;br&gt;</summary>
    <dc:date>2007-06-13T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Java on the Client, Part 1</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20070528.html" />
    <author>
      <name />
    </author>
    <modified>2007-05-28T00:00:00Z</modified>
    <issued>2007-05-28T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;With all this hype about &lt;a href="http://www.google.com/search?q=java+fx&amp;amp;ie=utf-8&amp;amp;oe=utf-8&amp;amp;aq=t&amp;amp;rls=org.mozilla:en-US:official&amp;amp;client=firefox-a"&gt;JavaFX&lt;/a&gt; (!) since JavaOne (so much came out of that conference and has been by and&amp;nbsp; large ignored because of JavaFX. This is most true with the prospect of &lt;a href="http://weblogs.java.net/blog/enicholas/archive/2007/05/java_kernel_unm.html"&gt;1-2&amp;nbsp; MB downloads for the JRE&lt;/a&gt;, the so called "Java Kernel"), I've decided to&amp;nbsp; take inventory of the Java desktop landscape again, and see what's changed/grown&amp;nbsp; since I've developed anything large with it. The desktop has languished behind&amp;nbsp; the server in Java, often to the chagrin of the desktop / client-side&amp;nbsp; developers who made the platform grow in the early, primordial java applet&amp;nbsp; days.&amp;nbsp; &lt;/p&gt;&lt;p&gt; First, I review the Rich Internet Application landscape in&amp;nbsp; general, as it will serve as a useful backdrop against which all this new stuff&amp;nbsp; makes sense.&lt;/p&gt; &lt;h2&gt;The RIA Landscape Thus Far &lt;/h2&gt; &lt;h3&gt;The Usual Contenders &lt;/h3&gt; &lt;p&gt;JavaScript, HTML/CSS, a healthy dose of basic HTTP and&amp;nbsp; SVG/VML combine to beautiful effect, as Google's Gmail, Maps, Reader, and more&amp;nbsp; can attest. This is the standard bearer: it's prevalent (enough), easily adopted&amp;nbsp; (standard technologies, free) and can be deployed incrementally. You don't&amp;nbsp; (necessarily) cede search engine index-ability and standard usability requirements&amp;nbsp; by using it. The other platforms have this now, too. &lt;/p&gt;&lt;p&gt; And a heck of a lot more.&lt;/p&gt; &lt;h3&gt;Microsoft's Silverlight&lt;/h3&gt; &lt;p&gt;Things are different now. Microsoft recently announced (or,&amp;nbsp; rather, formally debuted) their &lt;a href="http://www.microsoft.com/silverlight/default01.aspx"&gt;Silverlight&lt;/a&gt; offering, which is astonishingly good news in of itself. It presents the newly&amp;nbsp; solidified Adobe/Macromedia gelatin with a diluting agent.&amp;nbsp; It could also present the developer with a&amp;nbsp; cross - platform .NET engine. The Mono project has already announced that it&amp;nbsp; will support &lt;a href="http://www.mono-project.com/Moonlight"&gt;the plugin on&amp;nbsp; Linux&lt;/a&gt;. The plug-in itself will run on OS X and Windows.&amp;nbsp; Silverlight is a set of technologies, and is&amp;nbsp; deployed using a subset of .NET technologies. Microsoft's new Expression&amp;nbsp; tooling environments simplify development. It presents powerful opportunities&amp;nbsp; for rich media applications, including streaming video, and animation.&lt;/p&gt; &lt;h3&gt;Adobe's Flash and Flex &lt;/h3&gt; &lt;p&gt;Adobe's Flash is only part of the problem - it puts Flash in&amp;nbsp; place as a (superior) contender against, well, the multimedia capacity of&amp;nbsp; JavaScript and animated GIFs, for example. What's really at stake is the ability&amp;nbsp; to deploy "applications" on the internet, not just pretty pictures. Flex, and&amp;nbsp; in recent years, Flash, solve that, and do so better than Applets were able to&amp;nbsp; before them. Recently, Adobe &lt;a href="http://www.joshlong.com/jl/entry/20070425"&gt;open&amp;nbsp; sourced Flex&lt;/a&gt;, making the platform more accessible (and cheaper!) to the&amp;nbsp; masses.&amp;nbsp; The tooling (Flash CS3, for&amp;nbsp; example), of course, is still not free. (Big surprise? Adobe's a tooling&amp;nbsp; company.)&lt;/p&gt; &lt;h3&gt;Applets and Java Webstart&lt;/h3&gt; &lt;p&gt;Sun's Applets (naturally) predate any of these other items.&amp;nbsp; They were the first to market, but unfortunately are the worst. Java Webstart&amp;nbsp; is useful (very useful) where it's useful. Unfortunately, whereas you could see&amp;nbsp; using Flash for an ad (for example), you could never use Java.&amp;nbsp; First, it's too cumbersome to produce the same&amp;nbsp; thing as in Flash using Java. Second, loading the applet itself has&amp;nbsp; historically been wrought with issues: startup time, plug-in prevalence (and ease&amp;nbsp; of adaptation), etc.&lt;/p&gt; &lt;h2&gt;Java on the Desktop 2.0&lt;/h2&gt; &lt;h3&gt;What's in a name?&lt;/h3&gt; &lt;p&gt;See how I did that? "Web 2.0"? "Java on the Desktop 2.0"? We&amp;nbsp; need some sort of spiffy acronym here. "Java Desktop 2.0"! "JDeskto".. nah. "JD2".&amp;nbsp; Nah. "JD 2.0"? Pronounced, "JD two point ohhh"? Maybe Sun should just corner&amp;nbsp; the whole market and unveil something so hard to top that no one will even&amp;nbsp; bother, like, "RIA 2.0". Who could argue with "Rich 2.0"? The "internet is the&amp;nbsp; computer, 2.0". We could name it something to capitalize on the ridiculous&amp;nbsp; amount of traction that Flash FX, and Flex, have achieved. Something trendy.&amp;nbsp; Something with a "X" or two in it. It's got to be "Java". It's got to have that &lt;em&gt;je ne sais quoi.&lt;/em&gt; And "X"-y. It's got&amp;nbsp; to have an "X". None of this "E" business. That's gotten us in enough trouble.&amp;nbsp; I have it: "Java FX"! &lt;/p&gt;&lt;p&gt; What about, "Java FXE 2.0"?&lt;/p&gt;&lt;p&gt; I worry the JavaFX name will suffer the same bloat that the Java&amp;nbsp; and .NET names did.&amp;nbsp; JavaFX is actually a&amp;nbsp; set of technologies. It describes a scripting language (which doesn't&amp;nbsp; necessarily need to be used for pretty looking user interfaces), &lt;a href="http://weblogs.java.net/blog/chet/archive/2007/05/media_frenzy.html"&gt;elevated&amp;nbsp; multimedia support&lt;/a&gt;, and a mobile platform. It will benefit from the Java Kernel&amp;nbsp;&amp;nbsp; (I guarantee you the Java Kernel wasn't&amp;nbsp; developed so people could load .EARs quicker!) and from work being done in&amp;nbsp; general startup time decreases. It also describes a runtime environment on mobile&amp;nbsp; phones as well as the desktop. So when I say "JavaFX", I am more generally&amp;nbsp; talking about everything Sun is doing to regain prominence in producing pretty&amp;nbsp; user interfaces without HTML.&amp;nbsp;&amp;nbsp; &lt;/p&gt; &lt;h3&gt;Now Sun's playing catch-up. &lt;/h3&gt; &lt;p&gt;This is sickening because this was their market to lose,&amp;nbsp; originally. Their applets were poised to be the platform that Flash became.&amp;nbsp; They have been stalled by a general lack of attention from Sun on the desktop&amp;nbsp; market, and a lack of attention to lowly web developers, in particular.&amp;nbsp;&amp;nbsp; There&amp;nbsp; are many problems to solve which to some extent are already being addressed.&amp;nbsp; Others are there if you know where to look. &lt;/p&gt;&lt;p&gt; For example, the common developer isn't looking to build a Microsoft&amp;nbsp; Office, or a Photoshop, he's looking to build a forms intensive IS application.&amp;nbsp; This is why Visual Basic had(s?) such a strong footing in corporate America:&amp;nbsp; you could really quickly build some forms to babysit a database. That's also&amp;nbsp; the reason so many people flocked to the web when it became apparent you could&amp;nbsp; build forms to babysit the database. That's also why people are flocking to&amp;nbsp; Ruby on Rails, because they get that most people just want to build forms to&amp;nbsp; babysit databases, &lt;em&gt;easily.&lt;/em&gt; &lt;/p&gt;&lt;p&gt; That's why it's called "Windows Forms", and not -say - "Windows&amp;nbsp; UI". Naturally, the multimedia capabilities have arrived en masse for .NET, and &lt;a href="http://en.wikipedia.org/wiki/Windows_Presentation_Foundation"&gt;Windows&amp;nbsp; Presentation Foundation&lt;/a&gt; is a testament to its refined focus. However, at&amp;nbsp; the end of the day, it's a super set, and not the normative application of&amp;nbsp; Windows' UI facilities. &lt;/p&gt; &lt;h2&gt;Sun should build out the basics first. &lt;/h2&gt; &lt;p&gt;Have you tried building a basic Swing application to talk to&amp;nbsp; a database in recent years? It's still unpleasant. Put another way, using&amp;nbsp; Tapestry or Spring MVC, or even JSF to in turn use HTTP to &lt;em&gt;fake&lt;/em&gt; stateful, event driven, interactive forms is easier than using&amp;nbsp; Swing to produce stateful, event driven, interactive forms. &lt;/p&gt;&lt;p&gt; Don't get me wrong. It can be done. Through &lt;a href="http://www.swinglabs.org/"&gt;SwingLabs.org&lt;/a&gt;, &lt;a href="http://www.jgoodies.com/"&gt;JGoodies.com&lt;/a&gt;, &lt;a href="http://common.l2fprod.com/"&gt;L2FProd&lt;/a&gt;, and others, it can definitely be&amp;nbsp; hobbled together. It's not for the faint of heart though, and it requires a&amp;nbsp; body of knowledge most people don't have time for what is usually easily done&amp;nbsp; via a standard web application.&lt;/p&gt;&lt;p&gt; There is hope over the horizon, though. Sun's made some&amp;nbsp; positive strides with JSR 296 (the "Swing Application Framework": &lt;a href="http://jcp.org/en/jsr/detail?id=296"&gt;this&lt;/a&gt; ought to do you, but just&amp;nbsp; in case you might also try &lt;a href="http://www.artima.com/lejava/articles/swingframework.html"&gt;this one&lt;/a&gt;).&amp;nbsp; Thus far, the framework isn't final, but it is promising. Where JSR 296 falls short,&amp;nbsp; other JSRs for data binding and persistence (for example) will fill the gaps.&amp;nbsp; It addresses common infrastructure support,&amp;nbsp; like a more worldly action framework, i18n support, and so on. &lt;/p&gt;&lt;p&gt; There are very few cohesive opportunities available right&amp;nbsp; now, however. Oh, sure, you could ascend the mountain, your .zip of the &lt;a href="http://www.netbeans.org/products/platform/"&gt;Netbeans's&lt;/a&gt; or &lt;a href="http://www.eclipse.org/platform/"&gt;Eclipse RCP&lt;/a&gt; code in hand, and get&amp;nbsp; somewhere, eventually. But that's hardly "approachable." Few people build applications&amp;nbsp; as complex as your average IDE, it turns out. &lt;/p&gt;&lt;p&gt; A more substantive approach is &lt;a href="http://spring-rich-c.sourceforge.net/"&gt;Spring's Rich Client platform.&lt;/a&gt;&amp;nbsp; The platform suffers from poor&amp;nbsp; documentation, though that's mitigated more and more by the &lt;a href="http://opensource.atlassian.com/confluence/spring/display/RCP/Home"&gt;wiki&lt;/a&gt;.&amp;nbsp; Using it, you're able to get the husk of an application up and running in&amp;nbsp; literally minutes (assuming you've checked out the project and figured out how&amp;nbsp; to get it working). Once you launch, it has 90% of what you're likely to need:&amp;nbsp; dependency injection (it &lt;em&gt;is&lt;/em&gt; Spring,&amp;nbsp; after all), resource management (icons, labels, all internationalized and&amp;nbsp; extracted to resource files), action framework, data binding, validation, a "view"/&amp;nbsp; "page" schema, and even integration with "sexy" technologies where it wouldn't&amp;nbsp; be useful to develop it in-house. It also takes care of the corner cases, too.&amp;nbsp; It'll automatically launch a splash screen for you, for example. The splash screen&amp;nbsp; is automatically centered. It has integration with a few help systems. &lt;/p&gt;&lt;p&gt; I like Spring RCP (if that wasn't obvious). Within a weekend&amp;nbsp; I was able to build an application that talked to a SOAP service using POJOs&amp;nbsp; (that's Spring, of course) talking to my client application. The client&amp;nbsp; application knew how to do all the CRUD things you'd expect. I was able to take&amp;nbsp; advantage of some of the nicer tools and do things like integrate the&amp;nbsp; application into the system tray so that it was only visible when necessary,&amp;nbsp; integrate a video pane using JMF,&amp;nbsp; and of&amp;nbsp; course provide on-the-fly upgrades/installation using Webstart (that's mostly&amp;nbsp; true...), all because it was Swing. The mind boggles at what you could do with&amp;nbsp; JOGL, Java (2|3)D, JavaZoom,&amp;nbsp; and most&amp;nbsp; any application of a good look and feel! That took another weekend. Or two... I&amp;nbsp; don't want to talk about it. My therapist insists it's good for me, though. &lt;/p&gt;&lt;p&gt; The bulk of the application - the part that justifies&amp;nbsp; building the application - was mostly finished the first weekend, thanks&amp;nbsp; entirely to Spring RCP. Now, granted, that second weekend was only possible&amp;nbsp; because I've banged my head against those particular walls a few times before. Many&amp;nbsp; times before. &lt;/p&gt; &lt;h2&gt;Building on top of Java&lt;/h2&gt; &lt;p&gt;The Java FX announcement is good news, as it means that all&amp;nbsp; of desktop java will get some much needed attention. This is good news for java&amp;nbsp; developers as it's one more place where they'll get the job and not some other&amp;nbsp; programmer who's not using Ruby on top of a JVM. The pieces are all there. We&amp;nbsp; have a really rich API for components /user interfaces. We have the rumblings&amp;nbsp; of change in the framework space for Swing. Work's being done to evolve or&amp;nbsp; supplant missing multimedia support. We have the language, the framework plumbing,&amp;nbsp; the incredible depth of history with networked applications. All in all, Java's&amp;nbsp; got a strong hand. Now we have a unified voice behind JavaFX. The hurdles at&amp;nbsp; this point lay mostly in finding appropriate abstractions and spreading best practices.&amp;nbsp; These hurdles are easily dealt with as a community, however. Java has nothing&amp;nbsp; if not a community. All in all, I'd say it's a good time to be a Java developer.&lt;/p&gt;</summary>
    <dc:date>2007-05-28T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Tapestry 4 Archetype Moved to the Tapestry Project at Apache</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20070505.html" />
    <author>
      <name />
    </author>
    <modified>2007-05-05T00:00:00Z</modified>
    <issued>2007-05-05T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;div&gt;&lt;p&gt;This is a little outdated, at this point, but I?m posting it just to follow through with things. &lt;/p&gt;&lt;p&gt;The Tapestry archetype mentioned here on this site is now officially included in the Tapestry source code, &lt;a href="http://tapestry.apache.org/tapestry4.1/tapestry-archetype/index.html"&gt;available from Apache&lt;/a&gt;.&amp;nbsp; The documentation is all there, and is pretty much the same thing as I discussed here, however, the incantation has (naturally) changed to reflect its new home on Apache:&lt;/p&gt;&lt;code&gt;mvn archetype:create -DarchetypeGroupId=org.apache.tapestry -DarchetypeArtifactId=tapestry-archetype -DarchetypeVersion=4.1.2-SNAPSHOT -DgroupId=org.example -DartifactId=myapp -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository&lt;/code&gt;&lt;p&gt;Thanks to Jesse Kuhnert (lead Tapestry 4 developer, nice guy, &lt;a href="http://www.nabble.com/-announce--new-goodies-for-tapestry-4.1-p10246866.html"&gt;lots of support&lt;/a&gt;&amp;nbsp; during the process itself) and Howard (&lt;a href="http://tapestryjava.blogspot.com/2007/02/maven-archetype-for-tapestry-4.html"&gt;on his blog, for example&lt;/a&gt;) for their support!&lt;/p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;</summary>
    <dc:date>2007-05-05T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>If I were a South Park character...</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20070429.html" />
    <author>
      <name />
    </author>
    <modified>2007-04-29T00:00:00Z</modified>
    <issued>2007-04-29T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">If I were a South Park character ( &lt;a href="http://www.sp-studio.de/"&gt;South Park Studio&lt;/a&gt;), I would look like: &lt;br&gt;&lt;img src="/jl/media/561.jpg"&gt;</summary>
    <dc:date>2007-04-29T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Flex is open sourced!</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20070425.html" />
    <author>
      <name />
    </author>
    <modified>2007-04-25T00:00:00Z</modified>
    <issued>2007-04-25T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p class="MsoNormal"&gt;Fantastic news! Flex has been open sourced! &lt;/p&gt; &lt;p class="MsoNormal"&gt;Umm, what does this mean, in effect? It means that exposing a REALLY slim, sexy client has been possible for a long time, through a lot of different concoctions, not the least of which is OpenLazlo, and&amp;nbsp; Ajax, and thereabouts. But Flex is the nicest option for those willing to pay. It?s slick, it?s quick (VERY quick, compared to Ajax/JSON), it?s powerful (well, Java Applet powerful, not ActiveX powerful. No CD ROM drives will pop out!). And now, it?s open source. See &lt;a href="http://labs.adobe.com/wiki/index.php/Flex:Open_Source"&gt;Adobe Labs&lt;/a&gt; for more.&lt;/p&gt;&lt;p&gt;So &lt;i&gt;that's&lt;/i&gt; why James Ward &lt;a href="http://www.jamesward.org/wordpress/2007/04/25/open-source-flex-top-10-reasons-to-rejoice/"&gt;was cooking cookies!&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Congratulations, Adobe, on a very brave move.Every time a peice of mega tech emerges, my mind starts imagining what I could do with it. Each individual tool becomes "useful" and viable suddenly (isn't that atrocious? It takes it being open source for me to care?) Now, if I could only get a few dozen "open source" grids (eh, I know, I know, I'm not holding my breath), &lt;a href="http://www.atomikos.com/products.html#ate"&gt;Atomikos Transactions&lt;/a&gt;, &lt;a href="http://www.springframework.org"&gt;Spring&lt;/a&gt;, &lt;a href="http://www.postgres.org"&gt;PostgresSQL&lt;/a&gt;, &lt;a href="http://terracottatech.com/"&gt;Teracotta&lt;/a&gt;, &lt;a href="http://www.adobe.com/products/flex/"&gt;Flex&lt;/a&gt;, and a neat idea (mmm.... ebaysoftspaceazon... com)...&lt;/p&gt;&lt;p&gt; All that aside, &lt;a href="http://www.artima.com/weblogs/viewpost.jsp?thread=193593"&gt;Bruce Eckel's recently taken the Flex jump&lt;/a&gt;, so maybe it's time to see why.&lt;/p&gt;</summary>
    <dc:date>2007-04-25T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>A J2ME Archetype Based On Pyx4me.com's work, Antenna</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20070408.html" />
    <author>
      <name />
    </author>
    <modified>2007-04-08T00:00:00Z</modified>
    <issued>2007-04-08T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt; In recent posts, I've blogged about my ambition to get a J2ME archetype up and running, and finally, I can present the fruits of my ...quest! You thought I was going to say ?labor?, eh? The nice part about the world is there are so many other people better positioned to beat me (or you) to the finish line. Case in point: the &lt;a href="http://pyx4me.com/snapshot/pyx4me/" target="_blank"&gt;pyx4me project&lt;/a&gt; project has done an incredible job of wrapping &lt;a href="http://antenna.sourceforge.net/" target="_self"&gt;Antenna&lt;/a&gt;, providing a JSE-based emulator, providing framework classes and of providing a working support for different things and of providing useful examples. &lt;/p&gt;&lt;p&gt; I've taken their examples and orchestrated an archetype for getting started quickly with J2ME.&amp;nbsp; &lt;/p&gt;&lt;p&gt; Put another way, they've already done the work of getting started with J2ME. It just isn't (to me, a humble J2ME developer with a cause) apparent where to begin. So I made it apparent for my own purposes. Perhaps you'll find it useful, as well.&amp;nbsp;&amp;nbsp; &lt;/p&gt;&lt;p&gt; To get it up and running, simply issue:&amp;nbsp; &lt;/p&gt;&lt;pre&gt;mvn archetype:create -DarchetypeGroupId=com.codecafe.archetypes \&lt;br&gt;-DarchetypeArtifactId=j2me-simple \&lt;br&gt;-DremoteRepositories=http://codecafe.dev-hda.com/repository \&lt;br&gt;-DarchetypeVersion=1.0-SNAPSHOT -DgroupId=org.example -DartifactId=myapp&lt;/pre&gt;&lt;p&gt; On my system, I have three system variables of importance. Here's the pseudocode for their organization:&amp;nbsp; &lt;/p&gt;&lt;pre&gt;WTK_HOME=installation of wireless toolkit ;&lt;br&gt;JAVA_HOME=installation of java development kit ;&lt;br&gt;PATH=WTK_HOME/bin;JAVA_HOME/bin ;&lt;/pre&gt;&lt;p&gt; So long as all that's setup, you need only cd into your ?myapp? directory and issue ?mvn clean install? and then double click on the resultant .jad file to open up the emulator and preview your application.&amp;nbsp; &lt;/p&gt; &lt;p&gt; Please see &lt;a href="http://pyx4me.com/snapshot/pyx4me"&gt; the Pyx4me project's home page&lt;/a&gt; for the overall project,&amp;nbsp;&amp;nbsp; &lt;a href="http://antenna.sourceforge.net"&gt;the antenna project&lt;/a&gt;, and, lastly &lt;a href="http://codecafe.dev-hda.com/sites/j2me_archetype/"&gt;my documentation&lt;/a&gt; for information on using the archetype, getting started on an application and coverage of a few common cases I ran into. If you find anything lacking or non intuitive, please drop me a comment and I'll try to address it.&lt;/p&gt;</summary>
    <dc:date>2007-04-08T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Pain Points with Location APIs and Sprint</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20070405.html" />
    <author>
      <name />
    </author>
    <modified>2007-04-05T00:00:00Z</modified>
    <issued>2007-04-05T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&amp;nbsp;&lt;p&gt;The obvious: J2ME's suffered a lot of fragmentation (almost necessarily, given the ever broadening range of devices to which an application may be deployed) that have worked against the "write once, run anywhere" mantra. Particularly, Sun has proffered a multitude of JSRs that are considered "optional packages" that any vendor may (or may not) include in its platform/handset. There are so many JSRs (see, for example, &lt;a href="http://mobilezoo.biz/j2me.php"&gt;this&lt;/a&gt;) that there are occasionally wrapper JSRs that serve only to include other JSRs. Thus, a vendor that implements JSR-185 ("Java Technology for the Wireless Industry") is really mainly only guaranteeing the presence of other JSRs. Similarly, plenty of platforms have solutions that later were standardized into JSRs. Thus, using a technology is a manner of gambling, where you hope you wager your target platform implements the requisite base platform, technologies, and APIs (that is, you want the JSR version of a given API where available, but if you need it you'll use a proprietary API, right?) &lt;/p&gt;&lt;p&gt;Sooooo... I have a Sprint handset, the Samsung A900 (&lt;a href="http://developer.sprint.com/view_devices.do?device=77527"&gt;this one.&lt;/a&gt;) Nokia and Motorola are easily "hacked". Sprint tends to control their handsets, closely, alas. The same rules as with any other closely guarded platform apply: no hacking! It's not necessarily in a carrier's interest to expose these APIs to just anyone. They may want to recoup the cost of developing the technology. They may be only interested in bigger partners with a compelling, mass-appeal application that could be profitable to the carrier.&lt;/p&gt;&lt;p&gt;In this case, vendors had to implement GPS for the E911 laws (see &lt;a href="http://www.fcc.gov/911/enhanced/"&gt;this&lt;/a&gt; and &lt;a href="http://jeepx.blogspot.com/2006/02/paul-saffo-got-it.html"&gt;this&lt;/a&gt;), and so the functionality is already present on the phones. And just imagine the slew of applications that could be developed with GPS support-why wouldn't they want to expose it, right? &lt;/p&gt;&lt;p&gt;Slowly, JSR 172 is taking hold, and where it's not, you may find QJAE's Location APIs. QJAE is Qualcomm's Java Application Extensions which provide useful APIs. My particular handset has this API's Location Based Service API, and not JSR 172, but at least there is an API! &lt;/p&gt;&lt;p&gt;So, armed with this, I started looking for the compiled classes: they're nowhere to be found! I have the Spring SDK, and apparently (according to &lt;a href="http://www.shaftek.org/blog/archives/000139.html"&gt;this&lt;/a&gt; ancient article) the jars with the compiled API were at one point included in the Sprint SDK. It's not currently. Apparently, Sprint's stance is that you need to be a partner to access this functionality. Some people have had success reverse engineering the API from documentation and explicitly enumerating the values of the constants at runtime from the handset. Sprint's stance is that this is illegal.&amp;nbsp; &lt;/p&gt;&lt;p&gt;This also conflicts with my limited understanding of how Sprint limits access to other APIs. Other APIs (such as MMAPI) are accessible if and only if you sign it using a pricy Verisign certificate and obtain a partner account with Sprint (for deployment). For testing, everything seems accessible enough by simply "enabling" your handset on Sprint's developer site (see &lt;a href="http://developer.sprint.com/site/global/develop/activation_device/p_device_activation.jsp"&gt;this&#xD;
developer.sprint.com article&lt;/a&gt; for more) and using Sprint's toolkit to sign it (as outlined &lt;a href="http://developer.sprint.com/getDocument.do?docId=84465"&gt;here&lt;/a&gt;)). &lt;/p&gt;&lt;p&gt;That's enough for this post. Let's see what else I can scrounge up. I need more information.&lt;/p&gt;</summary>
    <dc:date>2007-04-05T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Spring and GPS (JSR 179 --javax.microedition.location) support</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20070401.html" />
    <author>
      <name />
    </author>
    <modified>2007-04-01T00:00:00Z</modified>
    <issued>2007-04-01T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;April Fools Day is Here! &lt;/p&gt;&lt;p&gt;I suppose I'd forgotten the date. I read Google's proposed, &lt;a href="http://www.google.com/tisp/install.html" target="_self"&gt;free ISP plan&lt;/a&gt; with shock and horror. Then it hit me. Enjoy that one.&lt;/p&gt;&lt;p&gt;In other news, I'm playing with my Sprint A900 handset to use Location Based Services (LBS). It's frustrating, to say the least. Sprint's lackluster support of the developer community makes it all the more difficult. Googling the subject reveals post after post on bulletin board after bulletin of people bemoaning no support of LBS on Sprint handset since 2002.&lt;/p&gt;&lt;p&gt;Apparently, for all but a select few phones (the Blackberry among them), JSR 179 (the javax.microedition.location packages) isn't supported at all. In their stead is Qualcomm's proprietary JQAE API (probably because the GPS chipset is Qualcomm for a lot (if not all?) of their devices).&lt;/p&gt;&lt;p&gt;That's fine, I'm willing to use a proprietary API and do the god-awful "detection" dance I find is the norm in J2ME:&lt;/p&gt;&lt;code&gt;try {&lt;br&gt;&amp;nbsp; Class.forName( "javax.microedition.location.Coordinates") ; &amp;nbsp; &lt;br&gt;&amp;nbsp; // it has support&lt;br&gt;}catch (Throwable t){&amp;nbsp; &lt;br&gt;&amp;nbsp; // it doesn't. Try loading the Qualcomm API&lt;br&gt;}&lt;/code&gt;&lt;p&gt;See &lt;a href="http://www.sprintusers.com/forum/showthread.php?t=52772" target="__blank"&gt;this&lt;/a&gt; and/or &lt;a target="__blank" href="http://forum.mgmaps.com/viewtopic.php?printertopic=1&amp;amp;t=74&amp;amp;postdays=0&amp;amp;postorder=asc&amp;amp;start=0&amp;amp;finish_rel=-10000"&gt;this&lt;/a&gt; for more information on that.&lt;/p&gt;&lt;p&gt;However, it turns out even there things aren't so easy. &lt;/p&gt;&lt;p&gt;Before you've tried anything in code, you need to enable your phone's developer root. Translated: they've restricted access to certain APIs (Among them: "LBS: Location Based Services", "JSR-135 Mobile Media 1.1 API", "JSR-120 Wireless Messaging 1.1 API" and "JSR-75 Personal information Management (PIM)). You can access them assuming you've signed your MIDP with Verisign's $500 certificate and that you've unlocked your specific handset's (up to 200)&amp;nbsp; privileges from the Sprint.com developer website. I haven't gone through the process, and so I don't know if this will work, but it's certainly frustrating. &lt;/p&gt;&lt;p&gt;And, from what I've been reading, you also need to be a Sprint business partner! I don't even know how you begin to procure that, nor do I care for the moment. It's as if they don't want people developing on their platform.&lt;/p&gt;&lt;p&gt;Nokia's phones are exponentially more approachable. &lt;/p&gt;&lt;p&gt;If I find anything, I'll report back on this.&lt;/p&gt;</summary>
    <dc:date>2007-04-01T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>J# Post-Mortem</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20070322.html" />
    <author>
      <name />
    </author>
    <modified>2007-03-22T00:00:00Z</modified>
    <issued>2007-03-22T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;J# retired and I just now caught this! That's wonderful news! &lt;/p&gt;&lt;p&gt;From the announcement (http://msdn2.microsoft.com/en-us/vjsharp/default.aspx), the following:&lt;/p&gt;&lt;blockquote&gt;&lt;b&gt;Retirement of J# language and Java Language Conversion Assistant from future versions of Visual Studio&lt;/b&gt; Since customers have told us that the existing J# feature set largely meets their needs and usage of J# is declining, Microsoft is retiring the Visual J# product and Java Language Conversion Assistant tool to better allocate resources for other customer requirements. The J# language and JLCA tool will not be available in future versions of Visual Studio. To preserve existing customer investments in J#, Microsoft will continue to support the J# and JLCA technology that shipped with Visual Studio 2005 through to 2015 as per our product life-cycle strategy. For more information, see Expanded Microsoft Support Lifecycle Policy for Business &amp;amp; Development Products. &lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt; Now of course, there are some issues. Apparently they've&#xD;
introduced 64 bit support and that ends in 2017. So if nothing else, we&#xD;
have 2 (conflicting) dates: 2015, or 2017. &lt;/p&gt;&lt;p&gt; Bah. Either way, we'll be rid of it within a decade :-)&lt;br&gt;&lt;/p&gt;&lt;p&gt;To read the announcement, you'd think they're being burdened by it! Which is true. They are. As they are burdened by maintaining the VB6 to VB.NET migration pathways. And the C++ to managed C++ pathways. If .NET debuted with anything in particular as gospel, it was "forward thinking, backwards compatible." Now it seems like they're abandoning a lot of this for the pretense it was. I still don't quite understand what their pitch to the java world is though. The Petstore(s), I don't think, swayed any opinion. This is especially true given what was perceived to be botched politicking on Microsoft's part behind the first one.&amp;nbsp; Is there anyone who actually used Java and then preferred having Visual Studio wizard-away everything previously done in ant build file? That is, who would switch to get WYSIWYG-everything? &lt;/p&gt;&lt;p&gt; The main cause for defection in the Java camp is ease-of-use, but those concerns are (seemingly) better addressed by Ruby on Rails, or PHP. &lt;/p&gt;&lt;p&gt;Put another way: the reason J# is being retired is because it's never been the value proposition Microsoft imagined it would be. There aren't swarms of people looking to leave Java for .NET of all things. If anything,&amp;nbsp; people are retrofitting their client applications with JavaScript and building the more sophisticated stuff in Java and it's constantly expanding stacks. &lt;/p&gt;&lt;p&gt;Or, it could be I'm missing everything all together. &lt;/p&gt;</summary>
    <dc:date>2007-03-22T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Developer Collaboration and Eclipse Jazz</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20070310.html" />
    <author>
      <name />
    </author>
    <modified>2007-03-10T00:00:00Z</modified>
    <issued>2007-03-10T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;The major leap forward seems to be project lifecycle management, and collaboration suites. It doesn't seem like too long ago that we had a compiler, an editor, and some sticky notes. &lt;/p&gt;&lt;p&gt;In the Microsoft camp, my lowly Visual C++ has evolved into &lt;a href="http://msdn2.microsoft.com/en-us/teamsystem/default.aspx"&gt;Visual Studio Team System/Team Foundation System/Orca/super maximized enterprise grid suite 2.0/whatever&lt;/a&gt;, which in turn is an editor on top of the compiler, a collaboration suite with groupware-features and a source versioning system&amp;nbsp; (and maybe that's an undersell?)!&lt;/p&gt;&lt;p&gt;And Borland, oh-don't-get-me-started! Borland's &lt;a href="http://www.borland.com/us/products/index.html"&gt;whole business&lt;/a&gt; is now centered on everything that happens before and after the work in JBuilder has been done: it's all about the lifecycle of the project. &lt;/p&gt;&lt;p&gt;JetBrains has their &lt;a href="http://www.jetbrains.com/teamcity/"&gt;TeamCity product&lt;/a&gt;, which - along with their TMate source control client - form a suite of collaboration tools above and beyond working in IntelliJ. Even IntelliJ now has the ability to "share" a coding session with someone. &amp;nbsp;&lt;/p&gt;&lt;p&gt;And, now, I just read about the Eclipse Foundation's (and tech-lead Erich Gamma's) push into collab-suites with Eclipse Jazz (eh, &lt;a href="http://redmonk.com/cote/2006/06/07/rational-jazz-soon-to-eat-more-of-its-own-dog-food-transparency/"&gt;here&lt;/a&gt;, and &lt;a href="http://www.theserverside.com/tt/talks/videos/ErichGammaText/interview.tss"&gt;here&lt;/a&gt;). Of course, (the former) Rational has always been about this sort of thing in a lot of ways, so it's no surprise the influence eventually found its way to Eclipse. Interesting, I say! &amp;nbsp;&lt;/p&gt;&lt;p&gt;Does this mean there's little more vendors can see doing for individual developers? &lt;a href="http://www.intellij.com"&gt;IntelliJ&amp;nbsp; IDEA&lt;/a&gt;) (mmm.. I love you) is good, but is it really the be-all-end-all of individual productivity? All without one patronizing Wizard? Really? Also, I'm a little unclear on how this new wave of software fits in with traditional tools. &lt;/p&gt;&lt;p&gt;Suppose I have a wiki and bug defect system (&lt;a href="http://trac.edgewall.org"&gt;Trac&lt;/a&gt;)), a source control system (&lt;a href="http://subversion.tigris.org/"&gt;Subversion&lt;/a&gt;), an IDE (IntelliJ, emacs) and an email address/IM client, a project management tool (Microsoft Project?), and even a build system with a deficiency complex (&lt;a href="http://maven.apache.org/"&gt;Maven&lt;/a&gt; and &lt;a href="http://www.atlassian.com/software/bamboo/"&gt;Bamboo&lt;/a&gt;) what am I missing?&lt;/p&gt;</summary>
    <dc:date>2007-03-10T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>New version of the Tapestry 4.1 archetype</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20070305.html" />
    <author>
      <name />
    </author>
    <modified>2007-03-05T00:00:00Z</modified>
    <issued>2007-03-05T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">I just deployed a new version of the Tapestry 4.1 archetype. It's the same parameters as the archetype discussed &lt;a href="http://www.joshlong.com/jl/entry/20070227"&gt;previously&lt;/a&gt;. Essentially, the new version provides a few new features:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;an interesting use of an engine service (in this case to provide a working rounded corner generator, as with Google Groups' rounded corner generator URL) and a corresponding component to employ the service.&lt;/li&gt;&lt;li&gt;the rounded corner component mentioned above, which is pretty sophisticated in of itself (as introductory code goes, anyway!)&lt;/li&gt;&lt;li&gt;much better documentation (mvn site, and then peruse the resultant docs in the target directory.) &lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;.&lt;br /&gt;</summary>
    <dc:date>2007-03-05T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Halfsteps on the Tapestry Archetype; Gmail's Down!</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20070228.html" />
    <author>
      <name />
    </author>
    <modified>2007-02-28T00:00:00Z</modified>
    <issued>2007-02-28T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;Gmail is down, and I?ve not been able to access it with any&#xD;
sort of consistency for hours. What am I missing? What?s wrong? This has happened to me before, but never for this duration...&amp;nbsp; &lt;/p&gt; &lt;a href="/jl/resource/gmail_down.jpg"  ="" target="_blank"&gt;&lt;img src="/jl/resource/gmail_down.jpg"  ="" width="400"&gt;&lt;/a&gt;&lt;p&gt; That aside, I've deployed updates to the Tapestry 4.1 Maven archetype,&#xD;
and partly updated the documentation. An order of magnitude better, to&#xD;
be sure, but there remains much more to be done...&lt;/p&gt;</summary>
    <dc:date>2007-02-28T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>IntelliJ 6.0 and JDK 6.0 upgrade</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/200702241.html" />
    <author>
      <name />
    </author>
    <modified>2007-02-24T00:00:00Z</modified>
    <issued>2007-02-24T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">I'm about to upgrade to JDK6 on my Windows XP machine. I'm running IntelliJ 6, which I understand works well on the new JDK. Confusing is the lackluster availability of the JRE. I expect Java.com to yeld a JRE 6 build, but instead it's still pushing the old JRE 5, which is also still being bundled with various PC vendors by default. Why is this? At what point does Sun certify a release as being "good enough" for the developers AND the rest of the world? &amp;nbsp;&lt;br&gt;&lt;br&gt;The consensus seems to be that Java SE 6.0 offers the best out-of-the-box performance boost yet, by far.&lt;br&gt;&lt;br&gt;After a bit of searching, I finally got to &lt;a href="http://support.jetbrains.com/kb/entry.jspa?externalID=222&amp;amp;categoryID=4"&gt;this thread&lt;/a&gt;&amp;nbsp; which has the whole process spelled out for you. I went with the second choice enumerated on the page (deleting the jre, and replacing it with JDK1.6's JRE as I didn't want to have to use idea.bat. Using idea.bat causes the DOS console to stay open while you're in IntelliJ. I created a second .bat file whose job it was to load the first one (idea.bat) like so: start idea.bat, however, the trouble is that didn't seem to work. I didn't want to give it much more thought and simply pursued the second option. &lt;br&gt;&lt;br&gt;I wholely recommend the upgrade it's very quick. Loading IntellIJ would be one kind of speed increase, but loading a very big project quite another, and they both dramatically improved, to the point that IntelliJ no longer shows me "Tip Of The Day" when I'm doing these actions because it doesn't have to keep me entertained. &lt;br&gt;&amp;nbsp;&lt;br&gt;Completely worth it!&amp;nbsp;</summary>
    <dc:date>2007-02-24T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Sun Java Wireless Toolkit 2.5 for CLDC (Formerly, &amp;#8220;WTK&amp;#8221;) (finally)</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20070212.html" />
    <author>
      <name />
    </author>
    <modified>2007-02-12T00:00:00Z</modified>
    <issued>2007-02-12T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;Aside from all the new APIs supported (and there are a LOT ? some only previously available through extensions. Notable among them: Java APIs for Bluetooth ( JSR 82), Wireless Messaging API (WMA, JSR 226), and J2ME Web Services Specification (JSR 172), and of course we can?t forget.. argh... just check out &lt;a href="http://java.sun.com/products/sjwtoolkit/download-2_5.html"&gt;Sun's page&lt;/a&gt; for the full scoop), the coolest thing for me has to be the standard support for the Location API?s. These APIs, of course have helped propel J2ME into orbit via Google?s "Google Mobile Maps" application (and the plethora of other maps / GPS applications out there helped, too, I suppose :-) )&lt;br&gt;&lt;br&gt;This is an impressive release and long-awaited. One gripe: where?s my Linux SDK? I?ll have to use the windows version for now, I suppose. I should count my blessings: there doesn?t seem to be any mention of a Mac version!&lt;/p&gt;</summary>
    <dc:date>2007-02-12T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>Salesforce.com's new language/platform pack: "Apex"</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20070221.html" />
    <author>
      <name />
    </author>
    <modified>2007-01-28T00:00:00Z</modified>
    <issued>2007-01-28T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;I just noticed Salesforce.com?s latest step towards platform domination: &lt;a href="http://developer.appexchange.com"&gt;Apex.&lt;/a&gt;&lt;br&gt;&lt;br&gt;I like the name.  Cool. Sounds like Apress, and Ajax. Half buzz, half hard-hitting tech done cheap, with just a twist of that  je ne sais quoi, that ?this could be a Windows codename? quality. Yeah! &lt;br&gt;&lt;br&gt;I like the possibilities. The market for middle ware integration is astonishing. The application that?s readily customized is the application that more readily adapts, and is adapted. This should go a long way towards removing all the edge cases defying Salesforce.com?s proliferation. Apparently, they have a little less than 30,000 customers. I don?t know if that?s individual users or entities, or what. It?s not nothing. Interesting: the inclusion of  LINQ-style sql objects:&lt;br&gt;&lt;code&gt;&lt;br&gt;Account acc = [select Id from account where name = 'xxx'];&lt;br&gt;Account[] accs = new Account[]{acc};&lt;br&gt;System.assert(accs[acc.id] != null);&lt;br&gt;&lt;/code&gt;&lt;br&gt;It?s a typed SQL query, embedded inline with your java. Not like those opaque String queries I keep hearing about... &lt;br&gt;&lt;br&gt;I got the hint on all of this from eWeek magazine, in a small blurb about Apex of the January 22 issue. To my chagrin I get to the salesforce.com site, and start looking around right there, not too deeply linked,  is &lt;a href="http://blog.sforce.com/sforce/2007/01/apex_and_pure_v.html"&gt;Peter Coffee&lt;/a&gt;, formerly  a columnist of 18 years at eWeek. He?s just switched jobs! Good luck, Peter!&lt;/p&gt;</summary>
    <dc:date>2007-01-28T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>EJB DAO "data access layer" spring hibernate persistence</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20070125.html" />
    <author>
      <name />
    </author>
    <modified>2007-01-25T00:00:00Z</modified>
    <issued>2007-01-25T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;Before Spring/Hibernate/that whole wave came along, I don?t remember being particularly inspired to have persistence and business logic attached to the entities on which that logic acted... In fact, I rather disliked EJB?s entity beans pattern specifically because everything was on the bean itself. Often times it?d be on a SessionBean, and that?s good. But even there, entity beans have basic persistence, removal and lifecycle operations built into it. A Car doesn?t car how it?s persisted, does it?  &lt;br&gt;&lt;br&gt;Then along came Rails (the most infamous example of this pattern) and suddenly everything is built into the object itself. And, honestly, I like the pattern there. Everything is static if its an operation that would be done by a DAO in Java. It?s a property if its to be persisted. Simple. You know where you stand. I also like the DAO/domain objects mechanism in modern day Java. &lt;br&gt;&lt;br&gt;That said, I?m astonished at how ugly having the DAO functionality built into the domain object can get in Java. &lt;br&gt;&lt;br&gt;I ran across some code that has factory methods for returning the entity! Then, as you modify the properties in the entity (mutator by mutator), it writes them to the database! Ugh! Modify 10 properties on the object, and lo 10 update statements fly by your console. &lt;br&gt;&lt;br&gt;Furthermore, I?ve gotten used to the idea that you can have an interface defining a contract and then an implementation of that DAO?s interface. You can hide that implementation (especially with Spring) behind its contract through any number of remoting technologies, simple base casts and more in a local call, and more. You don?t have to include the accessor / mutators in the interface, too. That?s pretty remarkable.&lt;/p&gt;</summary>
    <dc:date>2007-01-25T00:00:00Z</dc:date>
  </entry>
  <entry>
    <title>I just got married!</title>
    <link rel="alternate" href="http://www.joshlong.com:80/jl/blogPost/20070114.html" />
    <author>
      <name />
    </author>
    <modified>2007-01-14T00:00:00Z</modified>
    <issued>2007-01-14T00:00:00Z</issued>
    <summary type="text/html" mode="escaped">&lt;p&gt;I just got married!&lt;br&gt;&lt;br&gt;It?s the morning after, 2:54 AM, Sunday, January 14, 2007. I was married yesterday, Saturday, January 13, 2007, at 10 AM, to my friend and console and... words fail me... to Richelle.&lt;br&gt;&lt;br&gt;Few things make me arch my head in utter stupor... Few things stun me. I work in computer science, after all. Technology is science, and science is constantly learning that unknown. It?s learning that je-ne-sais-quoi that keeps our curiosity working, nagging us into the early mornings. &lt;br&gt;&lt;br&gt;Richelle stuns me. &lt;br&gt;&lt;br&gt;I love you, Richelle. Here?s to whatever?s next. I?m curious.&lt;/p&gt;</summary>
    <dc:date>2007-01-14T00:00:00Z</dc:date>
  </entry>
</feed>


