<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>robjam.es</title>
	
	<link>http://robjam.es</link>
	<description>Now What?</description>
	<lastBuildDate>Mon, 15 Feb 2010 02:29:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/robjames" /><feedburner:info uri="robjames" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>robjames</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Bluetooth Plantronics 906 Backbeat Headphones Review</title>
		<link>http://feedproxy.google.com/~r/robjames/~3/29YjPG_69Tk/</link>
		<comments>http://robjam.es/2010/02/bluetooth-plantronics-906-backbeat-headphones-review/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 02:29:24 +0000</pubDate>
		<dc:creator>Rob James</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Innovation]]></category>
		<category><![CDATA[Interview]]></category>

		<guid isPermaLink="false">http://robjam.es/?p=268</guid>
		<description><![CDATA[Like many people that work in front of their PC&#8217;s and Macs, I spend a bit of time on different types of calls; mobile, landline, Skype, and Conference Calls. I am my Skype and my iPhone a lot, but never seem to find a happy place for what devices I use to listen to or [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Frobjam.es%2F2010%2F02%2Fbluetooth-plantronics-906-backbeat-headphones-review%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Frobjam.es%2F2010%2F02%2Fbluetooth-plantronics-906-backbeat-headphones-review%2F" height="61" width="51" /></a></div><p>Like many people that work in front of their PC&#8217;s and Macs, I spend a bit of time on different types of calls; mobile, landline, Skype, and Conference Calls. I am my Skype and my iPhone a lot, but never seem to find a happy place for what devices I use to listen to or speak on.</p>
<p>My solution so far has been to use a Logitech headset on my Mac when I am Skype calls or conference calls (where audio is done through the Mac), and I use the iPhone headset that is provided in the box. But I have issues with this; 1) as much as I like the Logitech headset, I don&#8217;t find it comfortable for long periods of time and always feel like its falling off my head. The other issue is the wires &#8211; they just get in the way &amp; 2) although the iPhone headset is fine, its always falling out of my ears and I keep getting tangled in the wires.</p>
<p>So I have been looking for the holy grails of headset, here is my criteria;</p>
<ol>
<li>No Wires</li>
<li>An inner Ear solution</li>
<li>But I also want it to hang from behind my ear (inner ear always falls out too for me)</li>
<li>stereo, so typical bluetooth headsets are out (I am partially deaf from too much Rock n Roll in a previous life, and audio in both my ears is best)</li>
<li>Something that can work with both my Mac and iPhone</li>
<li>I want to be able to listen to music on it too</li>
</ol>
<p>So after some research I came across the 906 Backbeat Headphone from Plantronic and Altec Lansing, and after using it for a week, and although I am still trying to resolve a Mic issue with my Mac, I have been very impressed!!</p>
<p>These Plantronics are essentially inner ear headphones that hang behind the ear. They connect to any Bluetooth enabled device and also have a bluetooth adapter that plugin into any mini jack audio device. They also have a built in mic that seems to work quite effectively (as many people are telling me) when you are using them with the iPhone or Skype.</p>
<p>I paired it up with my iPhone first and that was pretty straight forward. Press the power button and hold it on until the LED alternates between red and blue, and the iPhone picked it up straight away. As soon as I hit play on the headset, my iPod started to play!!! And when I make or take a call, the iPhone sees my Plantronic headset and uses it by default.</p>
<p>Next I paired it up with my Mac. This was just as straight forward. Put the headphones in discoverable mode again, and the Mac pairs with it. As expected, on the Mac I can select it as an audio device and in Skype, I can also select to use the Plantronic as the audio input and output device. Although I have come across an issue at the moment that I am sure I will be able to resolve; the microphone doesn&#8217;t seem to want to work. I can get the headset to work fine and hear everything, but when I select the Plantronics as a Mic input, no one can hear anything. I am thinking I will still need to play with this somewhat to get it sorted out.</p>
<h2>The Good Stuff</h2>
<p>I find the Plantronics super comfortable. They feel very natural on my ears, are not heavy and unlike other wired headphones, when I move my head suddenly or quickly, they just stay in place. They sound awesome! When I first bought them, I charged them up and wore them on a flight back home from a work engagement and I loved them immediately. The don&#8217;t sit right in my ears, but have these telescopic buds the seem to transmit the sound neatly, and also unlike many other earphones, they don&#8217;t lose bottom end when they slightly pop out (which is their natural sitting positions). They are also very &#8216;discrete&#8217;, meaning that most people don&#8217;t even notice that you are wearing them! But the downside is when you get a call, you look like a total fool talking to himself!!! <img src='http://robjam.es/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<h2>The Bad Stuff</h2>
<p>I can&#8217;t say that I have come across much stuff to complain about yet. The only things that seem to be strange is when I first get them working with my iPhone, the volume controls work perfectly, but 10 minutes in that seems to stop working. And turning them off and on again seems to fix that. The other thing that annoyed me is the fact that the only way you could charge the device was via the supplied Power Supply, that charges through a micro USB port. These days, most devices allow you to charge them through the USB port. The last thing I need is to have to look for a power outlet when travelling just for the headset. Quick fix; I jumped onto eBay and bought a USB to Micro-USB cable for $8 delivered! Not so much a gripe with these headphones as it is with Bluetooth, but I would prefer  to have a greater range than 10 metres. I am sometimes on a Skype call and would like to walk out of the environment that I am in to make it more private. But the limitations of Bluetooth don&#8217;t able me to go into a room down the hall. Oh well, have to wait for the new Bluetooth standard to be released <img src='http://robjam.es/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<h2>Conclusion</h2>
<p>When I am at my desk, I have it paired to my MacBook and pretty much always on charge. So when I am on Skype, I can just put these on my head. And if I am working for long periods of time where I want to listen to some music, I&#8217;ll use these as well. Then when I hit the road, I shut my laptop and turn on Bluetooth on my iPhone and I am listening to my iPod and can take and make calls whilst driving. Perfect solution for me!!!</p>
<p>If you are looking for comfortable stereo headphones that hand off the back of your ear, I can&#8217;t recommend these enough. I love them, but remember its only a week that I have been using them. The bluetooth pairing is great, sound great, they are very comfortable and I can find myself wearing them all day without my ears hurting.</p>
<img src="http://feeds.feedburner.com/~r/robjames/~4/29YjPG_69Tk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://robjam.es/2010/02/bluetooth-plantronics-906-backbeat-headphones-review/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://robjam.es/2010/02/bluetooth-plantronics-906-backbeat-headphones-review/</feedburner:origLink></item>
		<item>
		<title>Design to HTML Services, are they worth it?</title>
		<link>http://feedproxy.google.com/~r/robjames/~3/WYW27qZbYGI/</link>
		<comments>http://robjam.es/2010/02/design-to-html-services-are-they-worth-it/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 11:38:41 +0000</pubDate>
		<dc:creator>Rob James</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[General News]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://robjam.es/?p=264</guid>
		<description><![CDATA[I finally got a UI designer to complete the mockups for my site. And when it was time to get the HTML markup, he suggested I use a &#8220;Design to HTML&#8221; service. There is lots of them out there. You pretty much give them the Photoshop PSD file, and in return they provide you with [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Frobjam.es%2F2010%2F02%2Fdesign-to-html-services-are-they-worth-it%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Frobjam.es%2F2010%2F02%2Fdesign-to-html-services-are-they-worth-it%2F" height="61" width="51" /></a></div><p>I finally got a UI designer to complete the mockups for my site. And when it was time to get the HTML markup, he suggested I use a &#8220;Design to HTML&#8221; service. There is lots of them out there. You pretty much give them the Photoshop PSD file, and in return they provide you with XHTML/CSS markup.</p>
<p>So I gave it a try&#8230;.my verdict? Won&#8217;t do it again&#8230;.</p>
<p>Now this is no criticism of the company that does it, because they are good at what they do and serve a purpose. The only problem is that their purpose is not my purpose <img src='http://robjam.es/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Its a good solution if you are not intending to work with the templates they provide, and possibly just use it for a static website.</p>
<p>Problem is that they don&#8217;t think of their CSS in a way that is re-usable, they create CSS styles for absolutely everything and don&#8217;t think about optimising the CSS for re-use across pages. The end result is that your XHTML is nice and concise, but the CSS is very verbose and long (100&#8217;s of lines).</p>
<p>I have ended up using their XHTML and re-creating most of the CSS so that I can re-use it in my application as a template. I am still going through this process and therefore, something that would have taken me a few days to do (create XHTML/CSS from Design), is still taking me a few days to do, but I have the added complexity of working with code that was written by someone else.</p>
<p>Oh well, a lesson learned <img src='http://robjam.es/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/robjames/~4/WYW27qZbYGI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://robjam.es/2010/02/design-to-html-services-are-they-worth-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://robjam.es/2010/02/design-to-html-services-are-they-worth-it/</feedburner:origLink></item>
		<item>
		<title>Configure Apache to run Tomcat and PHP</title>
		<link>http://feedproxy.google.com/~r/robjames/~3/kWRt93Xah00/</link>
		<comments>http://robjam.es/2010/01/configure-apache-to-run-tomcat-and-php/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 06:47:39 +0000</pubDate>
		<dc:creator>Rob James</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[Innovation]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://robjam.es/?p=254</guid>
		<description><![CDATA[I have decided to blog about this, as I have had never ending problems in the past to try and get this configured. Here is the scenario; you have a project that requires hosting a single website in a single web domain, but you have a mix of PHP applications and Java (or in my [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Frobjam.es%2F2010%2F01%2Fconfigure-apache-to-run-tomcat-and-php%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Frobjam.es%2F2010%2F01%2Fconfigure-apache-to-run-tomcat-and-php%2F" height="61" width="51" /></a></div><p>I have decided to blog about this, as I have had never ending problems in the past to try and get this configured. Here is the scenario; you have a project that requires hosting a single website in a single web domain, but you have a mix of PHP applications and Java (or in my instance, GRAILS) applications that you need to run. The way you do this, is configure both PHP and Java applications to run through an Apache front end. The problem is, that there is no good documentation to help you do this, so here I go!</p>
<p>In this example, I am going to show you how to run a static html site, plus a PHP application (we&#8217;ll use Wordpress for this example) and a java .WAR applications all off the same instance of apache on the same server. Our site will look like this;</p>
<ul>
<li>http://www.mydomain.com/ &#8211; will have a static html site and will have links to other pages and directories under this domain, with the exception of;</li>
<li>http://www.mydomain.com/blog &#8211; will be running <a href="http://wordpress.org/" target="_blank">Wordpress</a>, a PHP blogging application, &amp;</li>
<li>http://www.mydomain.com/quotation &#8211; will run a java application packaged as a .WAR</li>
</ul>
<p>I am assuming that you have access to your own server, or virtual private server (I recommend <a href="http://www.neosurge.com/" target="_blank">NeoSurge</a> hosting if you need one), and that you are running Ubuntu Server (Although my instructions are for <a href="http://www.ubuntu.com/" target="_blank">Ubuntu</a>, they are easily transferable to other falvours of Linux). Here is the process form start to end to get it setup;</p>
<h3>Server Setup</h3>
<p>I am using <a href="http://www.ubuntu.com/products/whatisubuntu/serveredition" target="_blank">Ubuntu Server 9.04</a>, and I have set up a &#8216;vanilla&#8217; instance of the server running with none of the options configured (DNS etc). Now start the server &amp; login with the userename and password elected on the install</p>
<p>Firstly we will install some tools that will come in handy later such as ssh (for terminal access), I use nano for text editing (which may not installed), but you may prefer to install vi or vim, and an ftp server</p>
<p>NB: I have included SSH installation, but with most VPS and hosted providers, this will be done for you (Otherwise, you wouldn&#8217;t be able to get into your server <img src='http://robjam.es/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  You will only need to do this if you want to run a virtual machine in your own environment).</p>
<p><strong>Install OpenSSH</strong></p>
<p>To install openSSH, type the following in the command line (NB: you will be prompted to enter your password again to gain SuperUser access &#8211; which is what the sudo command is)<strong><br />
</strong></p>
<blockquote><p>sudo apt-get install openssh-server</p></blockquote>
<p>After the installation process, you will have openSSH on the server. Next we install FTP</p>
<p><strong>Install FTP Server &#8211; vsftpd</strong></p>
<blockquote><p>sudo apt-get install vsftpd</p></blockquote>
<p>To allow log on access for authenticated users, you need to edit /etc/vsftpd.conf</p>
<blockquote><p>sudo nano /etc/vsftpd.conf</p></blockquote>
<p>find the following two lines and uncomment them (they are near each other)</p>
<blockquote><p>local_enable=YES<br />
write_enable=YES</p></blockquote>
<p>Now restart the ftp server so your new settings can be picked up</p>
<blockquote><p>sudo /etc/init.d/vsftpd restart</p></blockquote>
<p>Now you should be able to ftp, and ssh to the server so that you can make changes and upload files &#8211; which you will need to do when you start configuring mod-proxy</p>
<h3>Install required Software</h3>
<p>Next you will need to install all the software such as mysql, apache, PHP, tomcat etc. I will be just installing all the basic software, so I won&#8217;t go into the details of installing PHPMyAdmin if you require it. As there are lots of tutorials out there on how to do that.</p>
<p><strong>Install mysql</strong></p>
<blockquote><p>sudo apt-get install mysql-server</p></blockquote>
<p>This will take a while, but after its done, you will have MySql installed. Again, you will need to configure MySql to be able to create databases etc remotely, but as is, you can ssh into your machine and do what you need to do in the MySql command line.</p>
<p><strong>Install apache, java and tomcat</strong></p>
<p>Now you will install Apache, Java, Tomcat and Tomcat Admin application so that your web server and Java setup is complete, this can be done in a single command;</p>
<blockquote><p>sudo apt-get install apache2 sun-java6-jdk tomcat6 tomcat6-admin</p></blockquote>
<p>You will need to go through the license acceptance process, and depending on your internet link speed, the above may take a while.</p>
<p><strong>Install php</strong></p>
<p>Now that Apache is installed, you can go ahead and install the PHP extensions so that php code can be parsed and rendered.</p>
<blockquote><p>sudo apt-get install php5<br />
sudo /etc/init.d/apache2 restart</p></blockquote>
<p>That&#8217;s it!!! All the software is now installed and its time to do some configuration.</p>
<h3>Configuration</h3>
<p>First we are going to enable mod-proxy. Mod-proxy is the extension to apache that allows you to use apache as the proxy for web requests but then passes on the processing to tomcat (in our example). We are going to be using the AJP connector, but its pretty much the same process if you wanted to use the http connector or one of the other various adapters that apache provides.</p>
<p><strong>Enable mod-proxy</strong></p>
<blockquote><p>sudo a2enmod proxy_ajp</p></blockquote>
<p>After you enable the proxy, you now need to allow the proxying to occur. You do this by modifying your proxy.conf file.</p>
<blockquote><p>sudo nano /etc/apache2/mods-enabled/proxy.conf</p></blockquote>
<p>Find where it says &#8220;Order deny,allow&#8221;, and change the text underneath so it looks like the following</p>
<blockquote><p>Order deny,allow<br />
Allow from all<br />
#Deny from all</p></blockquote>
<p>Quite simply, you are now allowing all rules to be proxied, and turning off the Deny rules (you can obviously get more fine tuned here, and you will see lots of security warnings, which I recommend you listen to, but for the moment this will get you by.).</p>
<p>Allow AJP port by uncommenting the connector in Tomcat</p>
<blockquote><p>sudo nano /etc/tomcat6/server.xml</p></blockquote>
<p>and uncomment</p>
<blockquote><p>&lt;Connector port=&#8221;8009&#8243; protocol=&#8221;AJP/1.3&#8243; redirectPort=&#8221;8443&#8243; /&gt;</p></blockquote>
<p>Add an admin and manager user for tomcat</p>
<blockquote><p>sudo nano /etc/tomcat6/tomcat-users.xml</p></blockquote>
<blockquote><p>&lt;role rolename=&#8221;admin&#8221;/&gt;<br />
&lt;role rolename=&#8221;manager&#8221;/&gt;<br />
&lt;user username=&#8221;yourUser&#8221; password=&#8221;aPassword&#8221; roles=&#8221;admin,manager&#8221;/&gt;</p></blockquote>
<p>Give tomcat some more memory (default is never enough) and disable tomcat&#8217;s security</p>
<blockquote><p>sudo nano /etc/default/tomcat6</p></blockquote>
<p>and uncomment and change the following</p>
<blockquote><p>JAVA_OPTS=&#8221;-Djava.awt.headless=true -Xms128M -Xmx1280M -XX:MaxPermSize=256m&#8221;<br />
TOMCAT6_SECURITY=no</p></blockquote>
<p><strong>Setup tomcat</strong></p>
<p>So now you are going to setup tomcat so that you can run WARs in the tomcat Servlet Container.</p>
<blockquote><p>sudo nano /etc/tomcat6/server.xml</p></blockquote>
<p>First thing we are going to do is change the host setting. I do this by leaving the default host and creating a new one for our purposes. Add an another &lt;Host/&gt; node below the existing one in server.xml</p>
<blockquote><p>&lt;Host name=&#8221;ServletName&#8221; appBase=&#8221;webapps/ServletName&#8221;<br />
unpackWARs=&#8221;true&#8221; autoDeploy=&#8221;true&#8221; xmlValidation=&#8221;false&#8221; xmlNamespaceAware=&#8221;false&#8221;&gt;<br />
&lt;/Host&gt;</p></blockquote>
<p>The important thing in the above node is the appBase. This should point to the webapps directory (unless you have created a new one), and then the directory that will contain the servlet container. Even though unpackWARs is set to true, I find this a bit strange and like to unpack my own WARs, so I would also create the directory and in the location that is going to hold the exploded war.</p>
<blockquote><p>sudo mkdir /var/lib/tomcat6/webapps/ServletName<br />
sudo chown tomcat6:tomcat6  /var/lib/tomcat6/webapps/ServletName</p></blockquote>
<p>Uplaod the War to /var/lib/tomcat6/webapps</p>
<p>And unpack it (unzip, and make sure it has the same name as the directory under webapps)</p>
<p>OK, now configure the proxy settings for apache, back in the proxy.conf</p>
<blockquote><p>sudo nano /etc/apache2/mods-enabled/proxy.conf</p></blockquote>
<p>Turn On Proxy requests on and configure the proxying (you can put this anywhere in the file, but I like to put the following at the top of the file)</p>
<blockquote><p>ProxyRequest On<br />
ProxyPreserveHost On<br />
ProxyPass /ServletName ajp://localhost:8009/ServletName<br />
ProxyPassReverse /ServletName ajp://localhost:8009/ServletName</p></blockquote>
<p>and at the end of the file</p>
<blockquote><p>ProxyVia On</p></blockquote>
<p>The important part of the above change is that you are configuring what requests to apache are going to be passed to tomcat for processing. Above I am telling any request to /ServletName will be passed through. you can also tell it to ignore certain directories as well. For example, one common use would be to route all traffic to tomcat, but ignore static files that you want to apache to process for performance reasons. To do this, you would do something like;</p>
<blockquote><p>ProxyPass /css !<br />
ProxyPass /images !<br />
ProxyPass / ajp://localhost:8009/</p></blockquote>
<p>Pretty self explanatory, the only thing to keep in mind is any directories you want to ignore need to come first.</p>
<p>Finally, restart apache and then tomcat</p>
<blockquote><p>sudo /etc/init.d/apache2 restart<br />
sudo /etc/init.d/tomcat6 restart</p></blockquote>
<p>That&#8217;s it &#8211; you are done!!!!</p>
<h3>So now what?</h3>
<p>At the start of this post, I talked about configuring the following sites;</p>
<ul>
<li>http://www.mydomain.com/ &#8211; your static html;</li>
<li>http://www.mydomain.com/blog &#8211; Wordpress PHP blog</li>
<li>http://www.mydomain.com/quotation &#8211; Java App</li>
</ul>
<p>Well now that the configuration has been done &#8211; its pretty easy. To host your static site, just upload all your html, css, js &amp; images etc into your root directory. You should find this in /var/www. To host your Wordpress blog, its as easy as creating the directory /var/www/blog and uploading wordpress here.</p>
<p>PHP is all configured and you should be able to go through the standard installation process for Wordpress by going to your url http://someurl.com./blog.</p>
<p>And finally the /quotation directory in my example is the directory that you need to use in the tutorial above where I have used ServletName.</p>
<p>Once you have done all this, and restarted tomcat and apache, all three sites; static, php and java should be working seamlessly&#8230;.!!</p>
<p>Have Fun&#8230;.</p>
<img src="http://feeds.feedburner.com/~r/robjames/~4/kWRt93Xah00" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://robjam.es/2010/01/configure-apache-to-run-tomcat-and-php/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		<feedburner:origLink>http://robjam.es/2010/01/configure-apache-to-run-tomcat-and-php/</feedburner:origLink></item>
		<item>
		<title>I’ve got the next Killer Idea!!!…………….Bullshit</title>
		<link>http://feedproxy.google.com/~r/robjames/~3/S-9kHpiTlHc/</link>
		<comments>http://robjam.es/2010/01/ive-got-the-next-killer-idea-bullshit/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 04:34:20 +0000</pubDate>
		<dc:creator>Rob James</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[General News]]></category>
		<category><![CDATA[Innovation]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://robjam.es/?p=248</guid>
		<description><![CDATA[So you wake up in a cold sweat one night as you are in a &#8216;half sleep&#8221;. While you were in this delirious moment, you conjure up the most amazing idea that is going to make you a bazillion dollars and no one has done it before!!!!!
ho hum&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..BORING!!!!
This is one of those urban myths that [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Frobjam.es%2F2010%2F01%2Five-got-the-next-killer-idea-bullshit%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Frobjam.es%2F2010%2F01%2Five-got-the-next-killer-idea-bullshit%2F" height="61" width="51" /></a></div><p>So you wake up in a cold sweat one night as you are in a &#8216;half sleep&#8221;. While you were in this delirious moment, you conjure up the most amazing idea that is going to make you a bazillion dollars and no one has done it before!!!!!</p>
<p>ho hum&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..BORING!!!!</p>
<p>This is one of those urban myths that seems to never go away. People are always trying to stumble on that next killer idea. But the thing is, you and I probably have these great &#8220;wouldn&#8217;t it be awesome if&#8230;..&#8221; ideas almost every second day. And so does everyone. Since I am in the business of making ideas come to reality, I get my share of friends (also known as nut cases that think I am waiting for them to bombard me with their next great idea) calling me with their idea and are surprised by the fact that I don&#8217;t drop everything to work with them !?!?</p>
<p>So if this is not important, what is?</p>
<p><strong>Your Customer!!! Its that simple&#8230;</strong></p>
<p>Its much easier to fill an existing void for your customer than it is to convince your customer that they are in need of this fabulous invention. And timing is key, if you get it out too early, there will be no demand (you are trying to convince them they need it); too late and you have missed the market (someone else has beat you to it and your customers already have the product).</p>
<p>Its also important to extract the idea into reality. How much will it cost to build and distribute. &#8220;I can get it into every household in the country over the next 5 years!!!&#8221;, but when you do the numbers, the revenue you make never catches up to the cost of marketing and distribution (or maybe in 20 years it does) #FAIL.</p>
<p>You need to get &#8216;real&#8217; customers in front of your product; get feedback, evolve, refine, more experimentation and testing, and work on filling that need.</p>
<img src="http://feeds.feedburner.com/~r/robjames/~4/S-9kHpiTlHc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://robjam.es/2010/01/ive-got-the-next-killer-idea-bullshit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://robjam.es/2010/01/ive-got-the-next-killer-idea-bullshit/</feedburner:origLink></item>
		<item>
		<title>The 24 Hour Startup</title>
		<link>http://feedproxy.google.com/~r/robjames/~3/4W8fx8ul5jY/</link>
		<comments>http://robjam.es/2010/01/the-24-hour-startup/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 20:14:13 +0000</pubDate>
		<dc:creator>Rob James</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[General News]]></category>
		<category><![CDATA[Innovation]]></category>

		<guid isPermaLink="false">http://robjam.es/?p=245</guid>
		<description><![CDATA[This morning I came across the most inspiring web site &#8211; http://www.24hour-startup.com/.  (watch the 3 minute video presentation here)
Basically the idea was a bunch of developers, business guys and designers got together and delivered a startup, from start to finish in 24 hours. And I mean START to FINISH! They get together and don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Frobjam.es%2F2010%2F01%2Fthe-24-hour-startup%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Frobjam.es%2F2010%2F01%2Fthe-24-hour-startup%2F" height="61" width="51" /></a></div><p>This morning I came across the most inspiring web site &#8211; <a href="http://www.24hour-startup.com/" target="_blank">http://www.24hour-startup.com/</a>.  (watch the 3 minute video presentation <a href="http://www.24hour-startup.com/" target="_blank">here</a>)</p>
<p>Basically the idea was a bunch of developers, business guys and designers got together and delivered a startup, from start to finish in 24 hours. And I mean START to FINISH! They get together and don&#8217;t even have an idea, take it through to the point that on the 24th hour they launch the site live. The launch included a blog, twitter account and facebook page. &#8220;I love it when a plan comes together&#8221;</p>
<p>Then if that was not enough, they then list the startup on eBay and within 7 days get $5,100 for it. Not bad for a day&#8217;s work (sure, a long day and they have to split amongst a dozen of them)!</p>
<p>It reminds me of all the developer camps that go on, but I love the energy of this and how they deliver it.</p>
<p>Its a real inspirational story, and makes me want to lock myself in a room for a weekend to see what I could achieve!!!</p>
<p>Check ou their final product <a href="http://www.drhue.com" target="_blank">http://www.drhue.com</a> &#8211; a shop-by-colour website</p>
<img src="http://feeds.feedburner.com/~r/robjames/~4/4W8fx8ul5jY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://robjam.es/2010/01/the-24-hour-startup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://robjam.es/2010/01/the-24-hour-startup/</feedburner:origLink></item>
		<item>
		<title>Programatically Scheduling Jobs in Grails with Quartz</title>
		<link>http://feedproxy.google.com/~r/robjames/~3/CcgfOUpG-3g/</link>
		<comments>http://robjam.es/2009/12/programatically-scheduling-jobs-in-grails-with-quartz/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 11:11:36 +0000</pubDate>
		<dc:creator>Rob James</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[General News]]></category>
		<category><![CDATA[Innovation]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[quartz]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://robjam.es/?p=236</guid>
		<description><![CDATA[In a recent project I was working on I had a requirement to be able to set up Quartz jobs programatically as the application is running. So in other words, when the app is started, there are no jobs scheduled or running, but through a user interface, create jobs and schedule them. I could not [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Frobjam.es%2F2009%2F12%2Fprogramatically-scheduling-jobs-in-grails-with-quartz%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Frobjam.es%2F2009%2F12%2Fprogramatically-scheduling-jobs-in-grails-with-quartz%2F" height="61" width="51" /></a></div><p>In a recent project I was working on I had a requirement to be able to set up Quartz jobs programatically as the application is running. So in other words, when the app is started, there are no jobs scheduled or running, but through a user interface, create jobs and schedule them. I could not find any info on how to do this effectively in Grails, but found it to be easy. Real Easy!!!</p>
<p>Start by installing Quartz;</p>
<blockquote><p>grails install-plugin quartz</p></blockquote>
<p>Typically when creating Quartz Jobs in Grails, you would now go ahead and do &#8220;grails create-job&#8221;, but doing so will automatically trigger the job to run every minute (even if you leave the trigger off) as a default.</p>
<p>Instead, we are going to create a Service to run as a Job. That&#8217;s right you can use regular grails services as a Job Class with some minor modifications. And all the Grails Service goodness comes along with it</p>
<blockquote><p>grails create-service JobScheduler</p></blockquote>
<p>To make the service to act as a Job, you need to do a few things. The service needs to implement the Job Interface and has to include an execute method (I also needed to use the execute method that took the JobExecutionContext) so your JobScheduler class looks like this;</p>
<blockquote><p>import org.quartz.Job</p>
<p>import org.quartz.JobExecutionContext;</p>
<p>class JobScheduler implements Job{</p>
<p>boolean transactional = false</p>
<p>public void execute (JobExecutionContext jobExecutionContext) {</p>
<p>println &#8220;I have been triggered to run &#8221; + new Date()</p>
<p>}</p>
<p>}</p></blockquote>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 216px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">import org.quartz.Job</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 216px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">import org.quartz.JobExecutionContext;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 216px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">class CrawlTriggerService implements Job{</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 216px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">boolean transactional = false</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 216px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">public void execute(JobExecutionContext jobExecutionContext) {</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 216px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">//To change body of implemented methods use File | Settings | File Templates.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 216px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">println &#8220;I HAVE BEEN TRIGGERED TO RUN NOW!!!&#8221; + new Date()</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 216px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 216px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">}</div>
<p>In this example, my job is just printing a statement so I know that the job has run. So now we need to schedule the actual job. Triggering a job can be done through a controller, service or wherever you like. And make sure you check out the JavaDocs for SimpleTrigger and TriggerUtils, they are your friends!!! The only thing to remember is to include the quartzScheduler Bean from the app context</p>
<p>Here are some examples of how you can do it.</p>
<p>Firstly, schedule a one-off job so you just schedule your JobService to be called at some time in the future, this is quite easily done with the SimpleTrigger. Add the following to your controller</p>
<blockquote><p>def quartzScheduler</p></blockquote>
<p>And then add the following action</p>
<blockquote><p>def scheduleOneOff() {</p>
<p>def jobDetail = new JobDetail(&#8220;myJob&#8221;, null, JobScheduler.class);</p>
<p>def trigger = new SimpleTrigger(&#8220;myTrigger&#8221;, null, new Date() + 1)</p>
<p>quartzScheduler.scheduleJob(jobDetail, trigger);</p>
<p>}</p></blockquote>
<p>How easy was that?!?! Its pretty self explanatory, but as you can see we create a JobDetail, which passes the job name, &#8220;myJob&#8221;, group name (null in this instance) and you pass the Job Class. This is where you tell it about your service you previously created.</p>
<p>We then create a trigger for our Job which in this instance is a simple trigger with the name &#8220;myTrigger&#8221;, and again a null group and start date in 1 day (you can obviously set it to whatever you want by passing a valid date object).</p>
<p>Finally using the quartzScheduler bean, you schedule the job by passing the jobDetail and trigger to the scheduleJob method.</p>
<p>What about scheduling a recurring job that starts at 2am on the 1st of every month? Easy, use the makeMonthlyTrigger method from the TriggerUtils anonymous class;</p>
<blockquote><p>def scheduleMonthly() {</p>
<p>def jobDetail = new JobDetail(&#8220;myJob&#8221;, null, JobScheduler.class);</p>
<p>def trigger = TriggerUtils.makeMonthlyTrigger(1, 2, 0);</p>
<p>trigger.setStartTime(new Date() + 1)</p>
<p>trigger.setName(&#8220;myTrigger&#8221;);</p>
<p>quartzScheduler.scheduleJob(jobDetail, trigger);</p>
<p>}</p></blockquote>
<p>Things are very similar except that we have used the makeMonthlyTrigger and passed the start date, hour and minute. We have also told it to start in one day from today (as before) and have given our trigger a name.</p>
<p>There are helper methods to set triggers to happen on the minute, hour, week, month etc and of course you can schedule using your handy Cron expressions too.</p>
<p>By passing JobDetail parameters to your JobService, you could theoretically just use that JobService as a scheduler wrapper service and it can then be a generic scheduler for any job you may want to trigger.</p>
<img src="http://feeds.feedburner.com/~r/robjames/~4/CcgfOUpG-3g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://robjam.es/2009/12/programatically-scheduling-jobs-in-grails-with-quartz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://robjam.es/2009/12/programatically-scheduling-jobs-in-grails-with-quartz/</feedburner:origLink></item>
		<item>
		<title>Apple AppStore Refund Works!</title>
		<link>http://feedproxy.google.com/~r/robjames/~3/bysiWD4eIGg/</link>
		<comments>http://robjam.es/2009/11/apple-appstore-refund-works/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 04:00:10 +0000</pubDate>
		<dc:creator>Rob James</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[General News]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://robjam.es/?p=233</guid>
		<description><![CDATA[I am a big fan of the Apple AppStore process, and I find myself buying anything that I think will be useful. And generally they work. But recently, I bought an App that just would not work for me. So a disclaimer; The application was Mini Confluence, which is an Atlassian Confluence Client for the [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Frobjam.es%2F2009%2F11%2Fapple-appstore-refund-works%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Frobjam.es%2F2009%2F11%2Fapple-appstore-refund-works%2F" height="61" width="51" /></a></div><p>I am a big fan of the Apple AppStore process, and I find myself buying anything that I think will be useful. And generally they work. But recently, I bought an App that just would not work for me. So a disclaimer; The application was Mini Confluence, which is an Atlassian Confluence Client for the iPhone. And for the life of me, it just would not authenticate with any of the Confluence instances I have. So I can&#8217;t comment on the application itself, it may be fantastic, but for me it doesn&#8217;t work.</p>
<p>So after spending $5.99 and not having it work, I though I would try my luck at getting a refund. And let me tell you that I wasn&#8217;t feeling very optimistic about the process, but my expectations were unfounded.</p>
<p>I started by selecting the Contact Support option from the AppStore, and I told them what my issue was. And within 12 hours, I got the following response;</p>
<blockquote><p>Dear Rob,</p>
<p>I understand that you purchased the application &#8220;Mini Confluence&#8221; but it will not work on your iPhone. I know how eager you must be to have this resolved and I will be happy to assist you any way that I can with this issue.</p>
<p>Since you are unable to enjoy this application, I will gladly refund this purchase for you. However, please know that the order containing this item is currently processing. I would like you to be assured that I have retained your case so that I may personally make sure the purchase is refunded. Please note that processing can take up to five business days from the date of purchase.</p>
<p>Thank you for your patience. Have a wonderful weekend!</p>
<p>Sincerely,</p>
<p>Julia<br />
iTunes Store Customer Support</p></blockquote>
<p>Well that was a promising start, but I still had this awkward feeling that there is going to be some chasing up on my part, which I was even wondering whether I would do for $5.99. But then 2 days later, I get this email;</p>
<blockquote><p>Dear Rob,</p>
<p>Thank you for your patience. I am happy to let you know that I have reversed the charge for the purchase of &#8220;Mini Confluence&#8221;. In three to five business days, a credit of $5.99 should be posted to the credit card that appears on the receipt for that purchase.</p>
<p>I have also submitted this item for investigation. Apple takes the quality of the items offered on the iTunes Store seriously and will investigate the issue with this item.</p>
<p>Thank you for your understanding. I hope that you continue to enjoy using the iTunes Store. Have a wonderful day!</p>
<p>Sincerely,</p>
<p>Julia<br />
iTunes Store Customer Support</p></blockquote>
<p>Awesome! Nothing to be done. And then within a couple of hours of that email, I get another &#8220;Adjustment Note&#8221; email that highlights that a -$5.99 adjustment has been made against my Credit Card for the purchase.</p>
<p>Now that is what I call customer experience. I like to think that I am not an Apple Fanboy, but Apple constantly impresses me with their attention to detail right across their business spectrum. I can&#8217;t say that they are perfect, but with a response like the above, I will not hesitate to make other purchases through the AppStore!!</p>
<img src="http://feeds.feedburner.com/~r/robjames/~4/bysiWD4eIGg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://robjam.es/2009/11/apple-appstore-refund-works/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://robjam.es/2009/11/apple-appstore-refund-works/</feedburner:origLink></item>
		<item>
		<title>Power Firefox Search</title>
		<link>http://feedproxy.google.com/~r/robjames/~3/_amGjHo4QOU/</link>
		<comments>http://robjam.es/2009/11/power-firefox-search/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 20:05:04 +0000</pubDate>
		<dc:creator>Rob James</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[General News]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://robjam.es/?p=229</guid>
		<description><![CDATA[I recently re-discovered a power feature on Firefox, and its ability to use keywords to help Firefox know which search engine you want to use without having to select it from the search engine lists.
Why do this, well if you are like me, and get annoyed at the need of selecting a search engine form [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Frobjam.es%2F2009%2F11%2Fpower-firefox-search%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Frobjam.es%2F2009%2F11%2Fpower-firefox-search%2F" height="61" width="51" /></a></div><p>I recently re-discovered a power feature on Firefox, and its ability to use keywords to help Firefox know which search engine you want to use without having to select it from the search engine lists.</p>
<p>Why do this, well if you are like me, and get annoyed at the need of selecting a search engine form the drop down with your mouse before executing the search. Then you probably just don&#8217;t do it.</p>
<p>So here is the trick; Select the list of search engine drop downs on your Firefox search bar, and select &#8220;Manage Search Engines&#8221;. Now go through and add keywords to your favourite search engines. I only have a few, so I use single letter keywords. &#8216;g&#8217; for Google, &#8216;e&#8217; for eBay, &#8216;w&#8217; for Wikipedia etc. Keep it simple. Your done! Now to search to Google, just type &#8216;g your search term&#8217; in the address bar and it will search google. Try a few options of switching search engines. Command-T (on Mac) and y9ou open a new tab, then start typing;</p>
<ul>
<li>g news for sydney</li>
<li>w portals</li>
<li>e iPod 8gb (e is my eBay keyword)</li>
</ul>
<p>Now to tidy things, up, get rid of that search bar which you no longer need and make your address bar longer. Right click on any blank space on the Firefox Header and select &#8220;Customize&#8221;. Now drag your search bar off the window and into the customize window and it disappears.</p>
<p>Now your really done! Feel the speed power and power of firefox!!</p>
<img src="http://feeds.feedburner.com/~r/robjames/~4/_amGjHo4QOU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://robjam.es/2009/11/power-firefox-search/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://robjam.es/2009/11/power-firefox-search/</feedburner:origLink></item>
		<item>
		<title>Making Active MQ work with Grails 1.2 M2</title>
		<link>http://feedproxy.google.com/~r/robjames/~3/QjN5jgXtU2M/</link>
		<comments>http://robjam.es/2009/08/making-active-mq-work-with-grails-1-2-m2/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 05:11:10 +0000</pubDate>
		<dc:creator>Rob James</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://robjam.es/?p=217</guid>
		<description><![CDATA[Some great work has come out of the plugins available for Grails. One of my favorite is the Active MQ (and JMS) plugins that allow grails (very easily) to integrate Java message. I have used these before, but then come up against an issue when upgrading my projects to Grails 1.2 M2. They stopped working!!!
So [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Frobjam.es%2F2009%2F08%2Fmaking-active-mq-work-with-grails-1-2-m2%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Frobjam.es%2F2009%2F08%2Fmaking-active-mq-work-with-grails-1-2-m2%2F" height="61" width="51" /></a></div><p>Some great work has come out of the plugins available for Grails. One of my favorite is the <a href="http://grails.org/plugin/activemq" target="_blank">Active MQ</a> (and <a href="http://grails.org/plugin/jms" target="_blank">JMS</a>) plugins that allow <a href="http://grails.org/" target="_blank">grails</a> (very easily) to integrate Java message. I have used these before, but then come up against an issue when upgrading my projects to Grails 1.2 M2. They stopped working!!!</p>
<p>So with some help from <a href="http://twitter.com/domix" target="_blank">@domix</a> (behind Active MQ plugin), and <a href="http://twitter.com/ldaley" target="_blank">@ldaley</a> (behind JMS plugin), I managed to get this working. Essentially there were two issues;</p>
<ul>
<li>the bean name had changed from &#8220;connectionFactory&#8221; to &#8220;jmsConnectionFactory&#8221;</li>
<li>The static variable to declare in your consuming service is &#8220;exposes&#8221; not &#8220;expose&#8221; as in the examples</li>
</ul>
<p>In the spirit of making this a more complete picture, I thought I would post a quick tutorial on how I made this work;</p>
<p>1. Start a new project &#8211; I called mine &#8220;ActiveMQTest&#8221;</p>
<pre class="brush:groovy">grails create-app ActiveMQTest
cd ActiveMQTest</pre>
<p>2. Install the plugins</p>
<pre class="brush:groovy">grails install-plugin activemq
grails install plugin jms</pre>
<p>IMPORTANT: Make sure you get the latest plugins. Particularly 0.1 of the ActiveMQ plugin (<a href="http://twitter.com/domix" target="_blank">@domix</a> applied the fixes to this to make it work for Grails 1.2)</p>
<p>3. Create a controller to test the messaging service</p>
<pre class="brush:groovy">grails create-controller notifier</pre>
<p>open up this controller (NotifierController) and paste the following code in</p>
<pre class="brush:groovy">class NotifierController {

     def index = {
          def message = [
               date:new Date().toString(),
               mess:"I just got posted from the Notifier",
               count:1
          ]
          sendJMSMessage("queue.notify", message)
          render "My message was sent on " + new Date()
          }
     }</pre>
<p>4. Now create a service class that will act as your message consumer</p>
<pre class="brush:groovy">grails create-service consumer</pre>
<p>and paste the following code in the file (ConsumerService)</p>
<pre class="brush:groovy">     class ConsumerService {
          boolean transactional = false
          static exposes = ['jms']
          static destination = "queue.notify"

          def onMessage = {
               println "I got the message '${it.mess}', on ${it.date}, with count = ${it.count}"
          }
     }</pre>
<p>5. Run the app and click on the Notifier controller link</p>
<p>You should see the browser render something like;</p>
<pre>My message was sent on Fri Aug 21 14:54:01 EST 2009</pre>
<p>And almost instantaneously, your console will render something like this</p>
<pre>I got the message 'I just got posted from the Notifier', on Fri Aug 21 14:54:01 EST 2009, with count = 1</pre>
<p><strong>So What Happened?</strong></p>
<p>This is basically demonstrating that when the controller is called, it creates an object called &#8216;message&#8217;. It then populates it with some primitives (this object can only handle primitives), and by using the sendJMSMessage() method, it queues the message onto a queue called &#8220;queue.notify&#8221;.</p>
<p>Just to show that this didn&#8217;t throw an error, the web pages is rendered with a notification that the process completed.</p>
<p>At this stage, the messages is queued onto the queue &#8220;queue.notify&#8221; which is declared by the static variable &#8220;destination&#8221; in our service. The static variable is provided the name of the queue;</p>
<pre class="brush:groovy">static destination = "queue.notify"</pre>
<p>The other thing is to tell JMS that this service needs to be exposed as a JMS Consumable service, and you do that by declaring the static variable ;</p>
<pre class="brush:groovy">static exposes = ['jms']</pre>
<p>That&#8217;s it! All you have to do is create a closure called onMessage, which is what JMS is calling when instatiating the service, and passed the message into it. In this instance we are just printing out the details of what is passed in the message.</p>
<img src="http://feeds.feedburner.com/~r/robjames/~4/QjN5jgXtU2M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://robjam.es/2009/08/making-active-mq-work-with-grails-1-2-m2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://robjam.es/2009/08/making-active-mq-work-with-grails-1-2-m2/</feedburner:origLink></item>
		<item>
		<title>Grails 1.2 M2 is out!</title>
		<link>http://feedproxy.google.com/~r/robjames/~3/kwO2Ziux5pk/</link>
		<comments>http://robjam.es/2009/08/grails-12-m2-is-out/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 23:50:36 +0000</pubDate>
		<dc:creator>Rob James</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[General News]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://robjam.es/?p=211</guid>
		<description><![CDATA[For those of you that know me, you will know that I am a big fan of Grails and Groovy. This week we have had 2 huge announcements. Firstly that VMWare has acquired SpringSource (Groovy and Grails custodian), and then Grails 1.2 M2 got released yesterday.
I downloaded 1.2 M2 last night and I am super [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Frobjam.es%2F2009%2F08%2Fgrails-12-m2-is-out%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Frobjam.es%2F2009%2F08%2Fgrails-12-m2-is-out%2F" height="61" width="51" /></a></div><p>For those of you that know me, you will know that I am a big fan of <a href="http://www.grails.org" target="_blank">Grails</a> and <a href="http://groovy.codehaus.org/" target="_blank">Groovy</a>. This week we have had 2 huge announcements. Firstly that VMWare has <a href="http://blog.springsource.com/2009/08/10/springsource-chapter-two/" target="_blank">acquired SpringSource</a> (Groovy and Grails custodian), and then <a href="http://www.grails.org/1.2-M2+Release+Notes" target="_blank">Grails 1.2 M2 got released yesterday</a>.</p>
<p>I downloaded 1.2 M2 last night and I am super keen to start using some of the new features! Find out about them <a href="http://www.grails.org/1.2-M2+Release+Notes" target="_blank">here</a>. Or <a href="http://grails.org/Download" target="_blank">download it now</a>!</p>
<p>I am totally in love with the Named Queries which allows you to create pre-defined queries (with a name) in the domain class that you can consequently re-use in the application. Example from the release notes;</p>
<blockquote>
<pre>class Publication {
   <span class="java-object">String</span> title
   Date datePublished
   <span class="java-keyword">static</span> namedQueries = {
       recentPublications {
           def now = <span class="java-keyword">new</span> Date()
           gt 'datePublished', now - 365
       }

       publicationsWithBookInTitle {
           like 'title', '%Book%'
       }

   }

}

You can do
<pre>// get all recent publications…
def recentPubs = Publication.recentPublications()
// get all recent publications (alternate syntax)…
def recentPubs = Publication.recentPublications.list()

// get up to 10 recent publications, skip the first 5…
def recentPubs = Publication.recentPublications(max: 10, offset: 5)
def recentPubs = Publication.recentPublications.list(max: 10, offset: 5)

// get the number of recent publications…
def numberOfRecentPubs = Publication.recentPublications.count()</pre>
</pre>
<p class="paragraph">// get a recent publication with a specific id…<br />
def pub = Publication.recentPublications.get(42)</p></blockquote>
<p class="paragraph">The other exciting changes is that tomcat is now the default container for building apps in, but this is accomplished through the plugin architecture, so it is just as easy to uninstall Tomcat and re-install Jetty again. Brilliant!!</p>
<p class="paragraph">Another win for me is the pre-compilation of GSPs in the WAR deployment. I host many of my grails apps on Virtual Private Servers, which usually have limited resource capabilities. So i find they constantly fall over at startup. This should certainly help that cause.</p>
<p class="paragraph">Other features worth a mention include;</p>
<ul>
<li>Named URL Mappings</li>
<li>Support for hasOne mapping in the domain classes</li>
<li>Implementation of Spring 3 into the codebase and therefore support for all Spring 3 annotations</li>
</ul>
<p>So it is time to get programming!!!</p>
<p><strong>UPDATE</strong>: Just came across<a href="http://jetbrains.dzone.com/articles/grails-12-creates-intellij" target="_blank"> this one too</a>. As of 1.2 Grails now creates your IntelliJ Project files too!! As a user of IDEA, this is just awesome.</p>
<img src="http://feeds.feedburner.com/~r/robjames/~4/kwO2Ziux5pk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://robjam.es/2009/08/grails-12-m2-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://robjam.es/2009/08/grails-12-m2-is-out/</feedburner:origLink></item>
	</channel>
</rss>
