<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1578264747863933568</id><updated>2011-07-28T23:25:09.789+02:00</updated><category term='grails'/><category term='john'/><category term='coffee'/><category term='photo'/><category term='football'/><category term='java'/><category term='groovy'/><category term='work'/><title type='text'>John's assorted stuff</title><subtitle type='html'>Snippets of code and life</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://johnsassortedstuff.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://johnsassortedstuff.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>John</name><uri>http://www.blogger.com/profile/12512784982702927677</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>19</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1578264747863933568.post-8885760373487700691</id><published>2009-10-10T16:15:00.003+02:00</published><updated>2009-10-10T16:33:09.787+02:00</updated><title type='text'>Just bundle it..</title><content type='html'>I used to work at the operations department. These days I work in the software development department. So I'm in a situation where I deliver products to my old co-workers and because of this I usually think an extra step when it's time for product delivery. I want the product to install smoothly and any upgrades should be simple to perform. Finding bugs/problems during deployment is never fun. Service windows are short.&lt;br /&gt;&lt;br /&gt;For the application I'm working on right now I'm toying with the thought of bundling everything in the war-file. What we have is a fairly simple web application with a number of servlets, service classes etc. There are also a number of batch jobs and some JMX MBeans and it's all wired up so that it relies on the application server providing a transaction handler. There are also a ton of configuration strings stored in the database and sprinkled out through a few configuration files.&lt;br /&gt;&lt;br /&gt;I'm thinking it would be cool, and possibly useful, to distribute a self-contained war file that comes with it's own datasources and transaction handler (Atomikos), it's own batch processing stuff (Quartz) and a built in JMX-server (not sure which one to use) and the whole thing even comes with a built in servlet engine (Winstone) With all of that in place the operation staff only has to do the following to run it&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="bash"&gt;$ java -jar application.war&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Possibly with a few added environment variables to point out external configuration files. Things like database URLs, usernames, passwords, AJP ports etc are probably best left outside the war file. &lt;br /&gt;&lt;br /&gt;If I was still in operations I would be delighted to see an application designed like this. I know Hudson (CI software) works like this and I think it's really neat.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1578264747863933568-8885760373487700691?l=johnsassortedstuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johnsassortedstuff.blogspot.com/feeds/8885760373487700691/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1578264747863933568&amp;postID=8885760373487700691&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/8885760373487700691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/8885760373487700691'/><link rel='alternate' type='text/html' href='http://johnsassortedstuff.blogspot.com/2009/10/just-bundle-it.html' title='Just bundle it..'/><author><name>John</name><uri>http://www.blogger.com/profile/12512784982702927677</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1578264747863933568.post-8444131713448494275</id><published>2009-07-24T14:29:00.002+02:00</published><updated>2009-07-24T14:46:46.152+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='football'/><title type='text'>Football season</title><content type='html'>The 2009/10 season of &lt;a href="http://www.premierleague.com/"&gt;Premier League&lt;/a&gt; kicks off on the 15th of August. I'm starting to get all excited and worked up. It'a a difficult season to predict. I am, of course, an Arsenal fan and I'm trying to keep my expectations at a realistic level.&lt;br /&gt;&lt;br /&gt;The loss of striker Adebayor will of course be noticed but how much will we notice the return of &lt;a href="http://www.arsenal.com/first-team/players/tomas-rosicky"&gt;Tomas Rosicky&lt;/a&gt; ? I think he was injured most of last season and if he has managed to get back into shape I'm sure he will strengthen the midfield and add to the creativity together with Fabregas and Arshavin. Actually, a starting line of Rosicky, Nasri (injured at the moment), Arshavin and Fabregas sounds quite formidable. And the fact that we also have players like Denilson, Eboue, Diaby and Ramsey on the bench feels reassuring.&lt;br /&gt;&lt;br /&gt;The addition of &lt;a href="http://www.arsenal.com/first-team/players/thomas-vermaelen"&gt;Thomas Varmaelen&lt;/a&gt; to the defensive line is also good news. I'll admit I had never heard of him before even though he was the team captain of Ajax!&lt;br /&gt;&lt;br /&gt;But how will Arsenal manage on the offense without the Adebayor? Will it be enough with Eduardo, Van Persie, Bendtner and the youngsters Carlos Vela and Theo Walcott? I would love to see Wenger sign Huntelaar from Real Madrid as an addition to that line.&lt;br /&gt;&lt;br /&gt;The first game of the season is an away game against Everton. That's an opponent that deserves respect. I can't remember if they ended 5th or 6th last season but they sure have a strong team and I don't think they lost any key players. I heard rumours of Lescott leaving but I don't know if that deal went through.&lt;br /&gt;&lt;br /&gt;Speaking of deals, what are Man City up to? They've managed to snatch a pretty impressive bunch of players from different leagues. Can they make the team work together or will they fall flat?&lt;br /&gt;&lt;br /&gt;Of the top four I think Chelsea has managed to come through the Silly Season without loosing any key players. I haven't been following the deals so closely but I heard rumours that Lampard and Terry might be leaving but as far as I know they haven't signed for new teams. With Manchester United suffering a few big losses and Liverpool maybe selling a few key players I actually think Chelsea might win this years league.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1578264747863933568-8444131713448494275?l=johnsassortedstuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johnsassortedstuff.blogspot.com/feeds/8444131713448494275/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1578264747863933568&amp;postID=8444131713448494275&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/8444131713448494275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/8444131713448494275'/><link rel='alternate' type='text/html' href='http://johnsassortedstuff.blogspot.com/2009/07/football-season.html' title='Football season'/><author><name>John</name><uri>http://www.blogger.com/profile/12512784982702927677</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1578264747863933568.post-5818049646164885123</id><published>2009-07-19T15:30:00.004+02:00</published><updated>2009-07-23T20:55:29.345+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='grails'/><title type='text'>Java - a resource hog?</title><content type='html'>I was playing around a bit with groovy on grails today when I noticed the following in the Activity Monitor. Quite impressive huh? ;-)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_exkrkQ1M9hM/SmMgf1QmJ5I/AAAAAAAAA3s/faNE0c59f_E/s1600-h/Picture+1.png"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: left; cursor: pointer; width: 320px; height: 211px;" src="http://3.bp.blogspot.com/_exkrkQ1M9hM/SmMgf1QmJ5I/AAAAAAAAA3s/faNE0c59f_E/s320/Picture+1.png" alt="" id="BLOGGER_PHOTO_ID_5360163712745744274" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1578264747863933568-5818049646164885123?l=johnsassortedstuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johnsassortedstuff.blogspot.com/feeds/5818049646164885123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1578264747863933568&amp;postID=5818049646164885123&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/5818049646164885123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/5818049646164885123'/><link rel='alternate' type='text/html' href='http://johnsassortedstuff.blogspot.com/2009/07/java-resource-hog.html' title='Java - a resource hog?'/><author><name>John</name><uri>http://www.blogger.com/profile/12512784982702927677</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_exkrkQ1M9hM/SmMgf1QmJ5I/AAAAAAAAA3s/faNE0c59f_E/s72-c/Picture+1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1578264747863933568.post-505837270133241266</id><published>2009-07-08T22:14:00.010+02:00</published><updated>2009-07-23T21:12:17.447+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><title type='text'>Form authentication, LoginException and JSPs</title><content type='html'>This is another one of those posts I hope google will pick up and index for all of those who find themselves in a situation similar to the one I found myself in today...&lt;br /&gt;&lt;div&gt;&lt;br /&gt;We've developed an application that lives in a JBoss server. In order to access the application you need to login with a username and a password. A pretty common scenario I would imagine. We handle this by delegation to a subclass of the login module &lt;code&gt; &lt;b&gt;&lt;a href="http://docs.jboss.org/jbossas/javadoc/4.0.3SP1/security/org/jboss/security/auth/spi/DatabaseServerLoginModule.html" title="class in org.jboss.security.auth.spi"&gt;DatabaseServerLoginModule&lt;/a&gt;&lt;/b&gt;&lt;/code&gt; provided by JBoss. Our subclass overrides the method &lt;code&gt;&lt;b&gt;&lt;a href="http://docs.jboss.org/jbossas/javadoc/4.0.3SP1/security/org/jboss/security/auth/spi/DatabaseServerLoginModule.html#getUsersPassword%28%29"&gt;getUsersPassword()&lt;/a&gt;&lt;/b&gt;&lt;/code&gt; and does some extra SQL-stuff and we've also put in some more validation etc in this method. There's probably a bit too much in there. Some of the validations will throw &lt;code&gt;&lt;b&gt;&lt;a href="http://java.sun.com/j2se/1.4.1/docs/api/javax/security/auth/login/LoginException.html" title="class or interface in javax.security.auth.login"&gt;LoginException&lt;/a&gt;&lt;/b&gt;&lt;/code&gt; when some of the criterias are not met. If an exception is thrown this will propagate through the whole login mechanism and the user will be met by the page defined in the page  &lt;code&gt;form-error-page&lt;/code&gt; directive in the &lt;code&gt;login-config&lt;/code&gt; section of your &lt;code&gt;web.xml&lt;/code&gt; file.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;Now, in order to actually show some information about the &lt;code&gt;&lt;b&gt;&lt;a href="http://java.sun.com/j2se/1.4.1/docs/api/javax/security/auth/login/LoginException.html" title="class or interface in javax.security.auth.login"&gt;LoginException&lt;/a&gt;&lt;/b&gt;&lt;/code&gt; we have to define a Valve first. This was completely new to me and I wasn't very hopeful. But after some reading I figured that the following information should go into the file &lt;code&gt;WEB-INF/context.xml&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre name="code" class="xml"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;Context&amp;gt;&lt;br /&gt;&amp;lt;Valve className="org.jboss.web.tomcat.security.FormAuthValve"/&amp;gt;&lt;br /&gt;&amp;lt;Manager className="org.apache.catalina.session.StandardManager"&lt;br /&gt;pathname=""/&amp;gt;&lt;br /&gt;&amp;lt;/Context&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;Once that information was in the file the exception from the login module became available through the attribute &lt;code&gt;j_exception&lt;/code&gt; on the users session and we could present the user with a valid reason for the failed login.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Yes, I know that there is a common belief that when it comes to logins and security you should not really tell the user what went wrong. Giving away too much information might actually help the bad guys trying to get in. I agree. But in this case my vote doesn't count.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Some of the links in the above post lead to outdated versions/pages. The above was implemented on JBoss 4.2 on Java 1.5&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1578264747863933568-505837270133241266?l=johnsassortedstuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johnsassortedstuff.blogspot.com/feeds/505837270133241266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1578264747863933568&amp;postID=505837270133241266&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/505837270133241266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/505837270133241266'/><link rel='alternate' type='text/html' href='http://johnsassortedstuff.blogspot.com/2009/07/form-authentication-loginexception.html' title='Form authentication, LoginException and JSPs'/><author><name>John</name><uri>http://www.blogger.com/profile/12512784982702927677</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1578264747863933568.post-420446524486576996</id><published>2009-07-04T10:00:00.003+02:00</published><updated>2009-07-04T10:22:22.458+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><title type='text'>Refactoring time</title><content type='html'>Okay, it's refactoring time at work! Or, too be honest, I shouldn't call it refactoring. Without a systematic approach and proper test coverage you can't really claim to be doing refactoring. You're simply "changing stuff".&lt;br /&gt;&lt;br /&gt;Anyway, I'm changing a lot of stuff. The application I'm working on is a tangled mess of non-thread-safe, non communicative code that was written a few years back by some people who were very pressed for time and, to be honest, not very good at java programming. But hey, it's been working fine for a few years now and the reason we're rewriting some parts is to show our client that spending money on maintaining code is a good thing.&lt;br /&gt;&lt;br /&gt;Right now I'm focusing on breaking up the application into separate layers. I'm bringing in tons of new classes that will be useful throughout the application. The previous model focused mostly on use cases and the objects used for use case A were not reused in use case B, so there is quite a lot of duplicate code in there but because the code is so non communicative it's difficult to see the duplicate parts.&lt;br /&gt;&lt;br /&gt;Since the application wasn't really layered to begin with there are tons of places with tightly coupled code. I'm taking the sledge hammer approach to this and just smashing those couplings. Why should the class that's responsible for retrieving data need to know stuff about html forms? And why is the html code for producing drop down menus hidden way back in a utitily function of a servlet? And why are there so many scriplet tags in the JSPs? I'm busy writing taglibs now..&lt;br /&gt;&lt;br /&gt;My time estimate for doing this job is way off. I've probably underestimated it by 50% or so. But I think that's mostly due to me having to rewrite more than I expected at first because of all the intricate dependencies. Once they are gone I think we'll be back on track again and even if I'd missed by 200% it would still be worth the effort. Once this job is done we'll have a good solid foundation to build general purpose functions on and we can start to replace all the use case based functionality.&lt;br /&gt;&lt;br /&gt;My friends through this journey are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The Spring framework - thanks for those jdbc templates and the error handling!&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Atomikos - thanks for the XA!&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1578264747863933568-420446524486576996?l=johnsassortedstuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johnsassortedstuff.blogspot.com/feeds/420446524486576996/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1578264747863933568&amp;postID=420446524486576996&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/420446524486576996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/420446524486576996'/><link rel='alternate' type='text/html' href='http://johnsassortedstuff.blogspot.com/2009/07/refactoring-time.html' title='Refactoring time'/><author><name>John</name><uri>http://www.blogger.com/profile/12512784982702927677</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1578264747863933568.post-8732228278838094872</id><published>2009-06-08T15:57:00.004+02:00</published><updated>2009-06-08T16:05:40.277+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><title type='text'>Spring, DB2 and Atomikos</title><content type='html'>A while back I had a really hard time finding out how to configure a DB2 XA datasource using Spring and Atomikos. So this is for all you other people battling DB2. Posting this on a google blog will hopefully make google pick it up :-)&lt;br /&gt;&lt;br /&gt;&lt;pre class="java"&gt;&lt;br /&gt;&amp;lt;bean id="dataSourceSelmaXA" class="com.atomikos.jdbc.AtomikosDataSourceBean" destroy-method="shutdown"&amp;gt;&lt;br /&gt;  &amp;lt;property name="xaDataSourceClassName"&amp;gt;&amp;lt;value&amp;gt;com.ibm.db2.jcc.DB2XADataSource&amp;lt;/value&amp;gt;&amp;lt;/property&amp;gt;&lt;br /&gt;  &amp;lt;property name="uniqueResourceName"&amp;gt;&amp;lt;value&amp;gt;UNIQUENAME&amp;lt;/value&amp;gt;&amp;lt;/property&amp;gt;&lt;br /&gt;  &amp;lt;property name="xaProperties"&amp;gt;&lt;br /&gt;    &amp;lt;props&amp;gt;&lt;br /&gt;      &amp;lt;prop key="serverName"&amp;gt;HOSTNAME&amp;lt;/prop&amp;gt;&lt;br /&gt;      &amp;lt;prop key="portNumber"&amp;gt;PORTNE&amp;lt;/prop&amp;gt;&lt;br /&gt;      &amp;lt;prop key="databaseName"&amp;gt;DBNAME&amp;lt;/prop&amp;gt;&lt;br /&gt;      &amp;lt;prop key="user"&amp;gt;USER&amp;lt;/prop&amp;gt;&lt;br /&gt;      &amp;lt;prop key="password"&amp;gt;PASS&amp;lt;/prop&amp;gt;&lt;br /&gt;      &amp;lt;prop key="driverType"&amp;gt;4&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;/pre&gt;&lt;br /&gt;&lt;br /&gt;Make sure you use driverType 4. Otherwise you'll most likely need a local DB2 client installation. That's what the error messages lead me to believe anyway.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1578264747863933568-8732228278838094872?l=johnsassortedstuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johnsassortedstuff.blogspot.com/feeds/8732228278838094872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1578264747863933568&amp;postID=8732228278838094872&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/8732228278838094872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/8732228278838094872'/><link rel='alternate' type='text/html' href='http://johnsassortedstuff.blogspot.com/2009/06/spring-db2-and-atomikos.html' title='Spring, DB2 and Atomikos'/><author><name>John</name><uri>http://www.blogger.com/profile/12512784982702927677</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1578264747863933568.post-6232482463919769159</id><published>2009-05-24T00:09:00.003+02:00</published><updated>2009-05-24T00:11:03.196+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Automatic tests</title><content type='html'>This is just a post to share a link. See &lt;a href="http://java.dzone.com/videos/configure-your-ide-run-your"&gt;http://java.dzone.com/videos/configure-your-ide-run-your&lt;/a&gt; for a guide to how you can automatically run your unit tests from within Eclipse. Editing and saving and having the automatic compiler fire off your unit tests is quite clever and I'm guessing it will save me a couple of hundred clicks every day&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1578264747863933568-6232482463919769159?l=johnsassortedstuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johnsassortedstuff.blogspot.com/feeds/6232482463919769159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1578264747863933568&amp;postID=6232482463919769159&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/6232482463919769159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/6232482463919769159'/><link rel='alternate' type='text/html' href='http://johnsassortedstuff.blogspot.com/2009/05/automatic-tests.html' title='Automatic tests'/><author><name>John</name><uri>http://www.blogger.com/profile/12512784982702927677</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1578264747863933568.post-3132208447727796406</id><published>2009-05-19T22:28:00.007+02:00</published><updated>2009-06-03T22:17:05.804+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='work'/><title type='text'>Java transactions outside the application server</title><content type='html'>Wow, I've been knee deep in Java Transactions the past few days. I've been trying to get some unit tests running outside of the application server. What I need to do is distributed atomic transactions across two databases. I started out with a framework called JOTM. This turned out to be quite easy to configure together with our existing Spring framework. We could more or less follow examples found on the web and get some code up and running. We could see the transactions starting and committing but when we wanted to roll back we ran out of luck. All logs from spring indicated that the rollback decision was made as expected but the transaction wasn't rolled back. We spent some time banging our heads against the wall and then moved on to the next transaction manager, BitronixTransactionManager. This one was also simple to install and configure but we stumbled upon some weirdness with our DB2 jdbc drivers. This turned out to be because we were using the wrong driverType (should be 4!) so we ditched BTM on unfair grounds and moved on to Atomikos. This was awesome. Since we were all by now experienced in configuring XA datasources, TXmanagers etc it didn't take long at all to wire up the new transaction manager. And you know what? It worked! &lt;br /&gt;&lt;br /&gt;Now we'll just see if things keep working when we move the application back into the application server. I guess we'll be reading up on JBossTS the next few days..&lt;br /&gt;&lt;br /&gt;I've learned a lot from this. I hadn't touched XA stuff and the only thing I knew about transactions was the stuff I learned from reading database manuals. The whole concept of distributed transactions involving several databases from different vendors is pretty neat.&lt;br /&gt;&lt;br /&gt;If you google for JOTM you will probably find some recommendations to stay away from it. You'll get the same recommendation from me, unfortunatly. I can't really understand why it didn't work. I'm still thinking it's because we did something wrong but we didn't really get any clues from the logs or from the documentation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1578264747863933568-3132208447727796406?l=johnsassortedstuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johnsassortedstuff.blogspot.com/feeds/3132208447727796406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1578264747863933568&amp;postID=3132208447727796406&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/3132208447727796406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/3132208447727796406'/><link rel='alternate' type='text/html' href='http://johnsassortedstuff.blogspot.com/2009/05/java-transactions-outside-application.html' title='Java transactions outside the application server'/><author><name>John</name><uri>http://www.blogger.com/profile/12512784982702927677</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1578264747863933568.post-1964481980737717919</id><published>2009-05-01T15:43:00.004+02:00</published><updated>2009-05-01T15:52:33.999+02:00</updated><title type='text'>Whisky... from Japan</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_exkrkQ1M9hM/Sfr-lpAMxpI/AAAAAAAAArM/azLo6vjLPMg/s1600-h/nikka_yoichi_50clLarge.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 240px; height: 320px;" src="http://3.bp.blogspot.com/_exkrkQ1M9hM/Sfr-lpAMxpI/AAAAAAAAArM/azLo6vjLPMg/s320/nikka_yoichi_50clLarge.jpg" alt="" id="BLOGGER_PHOTO_ID_5330853031561709202" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;As a gift from my previous employer I got a bottle of Whisky from Japan. I've been wanting to try Japanese whiskey for some time now but I've always opted for a safer choice in the last second. I'd hate to come home with a bad Whisky! So yesterday I had a little sip (a wee dram) of this Nikka Yoichi. I didn't expect much from it. I was pleasantly surprised though. I was expecting some fairly bland and boring whisky but as it turned out it was quite smooth and fruity with a smokey after taste. Really good. After adding just a few drops of water it tasted even better. lucky me.&lt;br /&gt;&lt;br /&gt;See &lt;a href="http://www.systembolaget.se/SokDrycker/Produkt?VaruNr=10413"&gt;http://www.systembolaget.se/SokDrycker/Produkt?VaruNr=10413&lt;/a&gt; for information about this whisky.&lt;br /&gt;&lt;br /&gt;And on a side note, the spell checking features on blogger.com seems to favour the spelling &lt;span style="font-style: italic;"&gt;whiskey&lt;/span&gt; rather than &lt;span style="font-style: italic;"&gt;whisky&lt;/span&gt;. See &lt;a href="http://en.wikipedia.org/wiki/Whisky"&gt;http://en.wikipedia.org/wiki/Whisky&lt;/a&gt; for more on this spelling issue.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1578264747863933568-1964481980737717919?l=johnsassortedstuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johnsassortedstuff.blogspot.com/feeds/1964481980737717919/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1578264747863933568&amp;postID=1964481980737717919&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/1964481980737717919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/1964481980737717919'/><link rel='alternate' type='text/html' href='http://johnsassortedstuff.blogspot.com/2009/05/whisky-from-japan.html' title='Whisky... from Japan'/><author><name>John</name><uri>http://www.blogger.com/profile/12512784982702927677</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_exkrkQ1M9hM/Sfr-lpAMxpI/AAAAAAAAArM/azLo6vjLPMg/s72-c/nikka_yoichi_50clLarge.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1578264747863933568.post-575687354594734143</id><published>2009-04-24T21:16:00.003+02:00</published><updated>2009-04-24T21:37:35.717+02:00</updated><title type='text'>Stating the obvious</title><content type='html'>We have three computer systems, all of them developed in house using the same programming language and utilizing the same technical platforms. Let's call the systems &lt;font style="font-style: italic;"&gt;A&lt;/font&gt;, &lt;font style="font-style: italic;"&gt;B&lt;/font&gt; and &lt;font style="font-style: italic;"&gt;C&lt;/font&gt;. The system &lt;font style="font-style: italic;"&gt;A&lt;/font&gt; exposes a few services (in a crude, low-level way) that systems &lt;font style="font-style: italic;"&gt;B&lt;/font&gt; and &lt;font style="font-style: italic;"&gt;C&lt;/font&gt; wish to consume. The programming API is clearly defined and the only task remaining is to write the client software. This development effort should be a joint venture between the developers of&lt;font style="font-style: italic;"&gt; B&lt;/font&gt; and &lt;font style="font-style: italic;"&gt;C&lt;/font&gt;, possibly with some assistance from the developers of &lt;font style="font-style: italic;"&gt;A&lt;/font&gt; who might have some good insight. You should absolutely &lt;span style="font-weight: bold;"&gt;not &lt;/span&gt;let B and C come up with their own implementations.&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;This is how you build good software. You collaborate and share. Right now I'm actually finding myself in a situation where I have to explain the benefits of this approach. I'm not sure where to start. Maybe some reverse psychology? "&lt;span style="font-style: italic;"&gt;Hi class, today we're going to demonstrate the benefits of reinventing the wheel&lt;/span&gt;"&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;Building software is about putting together different components and making them work together. If someone else has written a good component that you can use - use it! Expand on it, improve it and contribute to it. Make it better.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1578264747863933568-575687354594734143?l=johnsassortedstuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johnsassortedstuff.blogspot.com/feeds/575687354594734143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1578264747863933568&amp;postID=575687354594734143&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/575687354594734143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/575687354594734143'/><link rel='alternate' type='text/html' href='http://johnsassortedstuff.blogspot.com/2009/04/stating-obvious.html' title='Stating the obvious'/><author><name>John</name><uri>http://www.blogger.com/profile/12512784982702927677</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1578264747863933568.post-3257582410638380427</id><published>2009-04-15T20:28:00.004+02:00</published><updated>2009-04-15T20:36:31.299+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='football'/><title type='text'>Champions league night</title><content type='html'>Tonight Arsenal is facing Villareal at the Emirates. They managed to get a 1-1 draw at the away game so faith in their hands now. I'm not the coach but I would probably field the following team tonight...&lt;br /&gt;&lt;br /&gt;Goal: Almunia&lt;br /&gt;Defenders: Clichy, Sagna, Toure, Silvestre (Gallas is injured..)&lt;br /&gt;Midfield: Fabregas, Arshavin, Nasri, Denilson&lt;br /&gt;Strikers: Adebayor, Bendtner&lt;br /&gt;&lt;br /&gt;Bring in Walcott and/or Van Persie if the game isn't going so well. I don't want Van Persie from start because I feel he is a good ace to have up the sleeve if you need to throw in a quality striker with the ability to tip the game in your favour. Bendtner was born to be substituted in the 64th :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1578264747863933568-3257582410638380427?l=johnsassortedstuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johnsassortedstuff.blogspot.com/feeds/3257582410638380427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1578264747863933568&amp;postID=3257582410638380427&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/3257582410638380427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/3257582410638380427'/><link rel='alternate' type='text/html' href='http://johnsassortedstuff.blogspot.com/2009/04/champions-league-night.html' title='Champions league night'/><author><name>John</name><uri>http://www.blogger.com/profile/12512784982702927677</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1578264747863933568.post-1324365726581730310</id><published>2009-04-15T20:24:00.004+02:00</published><updated>2009-04-15T20:27:45.937+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='work'/><category scheme='http://www.blogger.com/atom/ns#' term='grails'/><title type='text'>Pesky datasources and jndi lookups</title><content type='html'>This one always gets me it seems like. The jndi datasource is exposed from the jboss server as &lt;span style="font-style: italic;"&gt;"jndi/dsName"&lt;/span&gt; and that means my grails configuration should contain the following...&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="groovy"&gt;&lt;br /&gt;jndiName = "java:jdbc/dsName"&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1578264747863933568-1324365726581730310?l=johnsassortedstuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johnsassortedstuff.blogspot.com/feeds/1324365726581730310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1578264747863933568&amp;postID=1324365726581730310&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/1324365726581730310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/1324365726581730310'/><link rel='alternate' type='text/html' href='http://johnsassortedstuff.blogspot.com/2009/04/pesky-datasources-and-jndi-lookups.html' title='Pesky datasources and jndi lookups'/><author><name>John</name><uri>http://www.blogger.com/profile/12512784982702927677</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1578264747863933568.post-8029903388087707907</id><published>2009-04-14T21:06:00.005+02:00</published><updated>2009-04-14T21:15:03.384+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='football'/><title type='text'>First game of the season</title><content type='html'>I went to see the first game of the Superettan season. Sirius vs Ljungskile. The first 60 minutes or so were rather poor and Sirius looked like a team that would not be playing in this league next season. But it was a bit too early to rule them out and a few minutes into the second half they started to shape up and intensified the game, pushing the tempo up so the opponents looked like they were having a hard time to keep up. By this time Sirius were trailing by two goals but they managed to score in the 65th minute or so. They kept the pressure and looked like a winning team for the rest of the game and they also managed to get a draw, 2-2. The final goal was on a free kick and I couldn't really tell if it went straight into the net or if it was a header. I was too cold to pay attention to the game by then. I'm hoping that it was the cold that kept the crowds away. I was expecting more people but I think the count stopped at around 1800 or so, which is pretty poor for an opening game.&lt;br /&gt;&lt;br /&gt;In actually think Sirius deserved to win.&lt;br /&gt;&lt;br /&gt;Now it's time for champions league. I had ruled out Liverpool but just as we speak they've taken a 2-0 lead against Chelsea, at Stanford Bridge!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1578264747863933568-8029903388087707907?l=johnsassortedstuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johnsassortedstuff.blogspot.com/feeds/8029903388087707907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1578264747863933568&amp;postID=8029903388087707907&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/8029903388087707907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/8029903388087707907'/><link rel='alternate' type='text/html' href='http://johnsassortedstuff.blogspot.com/2009/04/first-game-of-season.html' title='First game of the season'/><author><name>John</name><uri>http://www.blogger.com/profile/12512784982702927677</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1578264747863933568.post-3074404108089586319</id><published>2009-04-12T15:42:00.006+02:00</published><updated>2009-04-12T15:55:36.578+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='coffee'/><category scheme='http://www.blogger.com/atom/ns#' term='john'/><title type='text'>Hot cross buns</title><content type='html'>As we were heading home from the easter lunch my &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_exkrkQ1M9hM/SeHyVMZyBkI/AAAAAAAAAmI/Q7XZAkqrVeY/s1600-h/hot_cross_bun.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 270px; height: 203px;" src="http://2.bp.blogspot.com/_exkrkQ1M9hM/SeHyVMZyBkI/AAAAAAAAAmI/Q7XZAkqrVeY/s320/hot_cross_bun.jpg" alt="" id="BLOGGER_PHOTO_ID_5323802680449173058" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;mother gave us a bag of &lt;a href="http://en.wikipedia.org/wiki/Hot_cross_buns"&gt;hot cross buns&lt;/a&gt; . I will enjoy these later on this evening while singing this song. I remember singing it when I was younger.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_exkrkQ1M9hM/SeHyVMZyBkI/AAAAAAAAAmI/Q7XZAkqrVeY/s1600-h/hot_cross_bun.jpg"&gt;&lt;/a&gt;&lt;dl&gt;&lt;dd&gt;&lt;i&gt;Hot cross buns,&lt;/i&gt;&lt;/dd&gt;&lt;dd&gt;&lt;i&gt;Hot cross buns,&lt;/i&gt;&lt;/dd&gt;&lt;dd&gt;&lt;i&gt;one ha' penny,&lt;/i&gt;&lt;/dd&gt;&lt;dd&gt;&lt;i&gt;two ha' penny,&lt;/i&gt;&lt;/dd&gt;&lt;dd&gt;&lt;i&gt;hot cross buns.&lt;/i&gt;&lt;/dd&gt;&lt;/dl&gt; &lt;dl&gt;&lt;dd&gt;&lt;i&gt;If you have no daughters,&lt;/i&gt;&lt;/dd&gt;&lt;dd&gt;&lt;i&gt;give them to your sons,&lt;/i&gt;&lt;/dd&gt;&lt;dd&gt;&lt;i&gt;one ha' penny,&lt;/i&gt;&lt;/dd&gt;&lt;dd&gt;&lt;i&gt;two ha' penny,&lt;/i&gt;&lt;/dd&gt;&lt;dd&gt;&lt;i&gt;Hot Cross Buns&lt;/i&gt;&lt;/dd&gt;&lt;/dl&gt;Sharing hot cross buns is supposed to ensure friendship throughout the coming year. So I encourage you all to go and bake and share! I hope they go well with espresso.&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1578264747863933568-3074404108089586319?l=johnsassortedstuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johnsassortedstuff.blogspot.com/feeds/3074404108089586319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1578264747863933568&amp;postID=3074404108089586319&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/3074404108089586319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/3074404108089586319'/><link rel='alternate' type='text/html' href='http://johnsassortedstuff.blogspot.com/2009/04/hot-cross-buns.html' title='Hot cross buns'/><author><name>John</name><uri>http://www.blogger.com/profile/12512784982702927677</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_exkrkQ1M9hM/SeHyVMZyBkI/AAAAAAAAAmI/Q7XZAkqrVeY/s72-c/hot_cross_bun.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1578264747863933568.post-1334187301686177715</id><published>2009-04-11T22:54:00.006+02:00</published><updated>2009-04-11T23:59:33.991+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='coffee'/><title type='text'>Perfecting the espresso</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_exkrkQ1M9hM/SeEIMoWUBYI/AAAAAAAAAlo/UQsIq-lWDm0/s1600-h/perfect-espresso-shot.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 213px; height: 320px;" src="http://2.bp.blogspot.com/_exkrkQ1M9hM/SeEIMoWUBYI/AAAAAAAAAlo/UQsIq-lWDm0/s320/perfect-espresso-shot.jpg" alt="" id="BLOGGER_PHOTO_ID_5323545247611094402" border="0" /&gt;&lt;/a&gt;So I've spent this evening trying to perfect my espressos in my new machine. The coffee I've got is from COOP, so it's no real gourmet stuff. I'll make sure to get some of that next time I stop by Kaffemaskinen. However, I've managed to get some really good shots with a decent crema. Not quite yet perfected yet but hey, it takes years to become a good barista!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The way I did it was I used the sieve for two cups, not the one for one cup. I filled the sieve with one scoop of coffee from my old measuring spoon (kaffemått) and then applied gentle and even pressure with the tamper and made sure to remove any excess coffee from the rim of the sieve. Read more about the proper technique over at &lt;a href="http://www.coffeeresearch.org/espresso/tamping.htm"&gt;coffeeresearch.org&lt;/a&gt;. Those people are serious about their coffee! I extracted the coffee into a shot glass to get a clear view of the colour and crema. The shot glass was warmed up a bit by running it under hot water for a few seconds.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The resulting espresso was far superior to anything served at your average coffee place but I still have some work to do before I can compete with the people at &lt;a href="http://www.barista.cc/"&gt;Barista&lt;/a&gt; or &lt;a href="http://www.kaffemaskinen.se/"&gt;Kaffemaskinen&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1578264747863933568-1334187301686177715?l=johnsassortedstuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johnsassortedstuff.blogspot.com/feeds/1334187301686177715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1578264747863933568&amp;postID=1334187301686177715&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/1334187301686177715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/1334187301686177715'/><link rel='alternate' type='text/html' href='http://johnsassortedstuff.blogspot.com/2009/04/perfecting-espresso.html' title='Perfecting the espresso'/><author><name>John</name><uri>http://www.blogger.com/profile/12512784982702927677</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_exkrkQ1M9hM/SeEIMoWUBYI/AAAAAAAAAlo/UQsIq-lWDm0/s72-c/perfect-espresso-shot.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1578264747863933568.post-8910036217629566527</id><published>2009-04-10T19:56:00.010+02:00</published><updated>2009-04-11T23:57:18.825+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='work'/><category scheme='http://www.blogger.com/atom/ns#' term='groovy'/><title type='text'>Testing code snippets</title><content type='html'>This is just a post to test the procedure described on &lt;a href="http://codeblog.kello.se/2009/01/07/getting-code-formatting-with-syntax-highlighting-to-work-on-blogger/"&gt;kello.se&lt;/a&gt; to enable proper code formatting in blogger. I would prefer a full blown css driven syntax highlighting solution but this will have to do for now I guess. Just to verify the functionality, here is a short snippet from a small authz solution I've written in grails.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="groovy"&gt;&lt;br /&gt;    def listUsersByRole = {&lt;br /&gt;        def users = User.list()&lt;br /&gt;        def role = new Role()&lt;br /&gt;        def validUsers = []&lt;br /&gt;        role.authorityCode = params.rollkod&lt;br /&gt;        role.scope = params.orgkod&lt;br /&gt;        for (user in users) {&lt;br /&gt;                if(user.hasRole(role)) {&lt;br /&gt;                        validUsers &lt;&lt; user&lt;br /&gt;                }&lt;br /&gt;        }&lt;br /&gt;        .... render view etc ...&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;N.B&lt;/span&gt; the code above is highlighted with a js/css script solution from &lt;a href="http://code.google.com/p/syntaxhighlighter/"&gt;http://code.google.com/p/syntaxhighlighter/&lt;/a&gt;. I'm seeing some strangeness in Firefox with the nice labels etc. But it looks good enough so I'll keep using it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1578264747863933568-8910036217629566527?l=johnsassortedstuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johnsassortedstuff.blogspot.com/feeds/8910036217629566527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1578264747863933568&amp;postID=8910036217629566527&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/8910036217629566527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/8910036217629566527'/><link rel='alternate' type='text/html' href='http://johnsassortedstuff.blogspot.com/2009/04/testing-code-snippets.html' title='Testing code snippets'/><author><name>John</name><uri>http://www.blogger.com/profile/12512784982702927677</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1578264747863933568.post-5886002470439170400</id><published>2009-04-10T19:23:00.004+02:00</published><updated>2009-04-10T19:32:17.620+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='photo'/><title type='text'>Walking in Hågadalen</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_exkrkQ1M9hM/Sd-B4r4JQBI/AAAAAAAAAfc/MB_4HuZbUBY/s1600-h/P1010548.JPG"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_exkrkQ1M9hM/Sd-B4r4JQBI/AAAAAAAAAfc/MB_4HuZbUBY/s320/P1010548.JPG" alt="" id="BLOGGER_PHOTO_ID_5323116095426084882" border="0" /&gt;&lt;/a&gt;We took a little walk in Hågadalen today. The weather was nice. Spring is in the air. This was the first time in a while that I've been able to enjoy a walk with dry feet. My shoes have been taking in water for a while and I haven't had time to get new ones. Today we took a short trip to Sportex and I managed to find the same kind of shoe that I allready had. At a bargain price too! So with dry feet and newly charged batteries in my camera we headed out in the crowded Hågadalen. We managed to find some pretty flowers, a large cluster of ants and a whole lot of people. See more pictures at &lt;a href="http://picasaweb.google.com/lh/photo/25K47HyRZbZL--h6mBwSVw?feat=directlink"&gt;my album&lt;/a&gt;. Once home boredom seems to have struck and I'm pondering of going out for a quick jog or maybe actually get some work done. I need to put in atleast 2-3 hours during the holidays to stay on top of things.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1578264747863933568-5886002470439170400?l=johnsassortedstuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johnsassortedstuff.blogspot.com/feeds/5886002470439170400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1578264747863933568&amp;postID=5886002470439170400&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/5886002470439170400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/5886002470439170400'/><link rel='alternate' type='text/html' href='http://johnsassortedstuff.blogspot.com/2009/04/walking-in-hagadalen.html' title='Walking in Hågadalen'/><author><name>John</name><uri>http://www.blogger.com/profile/12512784982702927677</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_exkrkQ1M9hM/Sd-B4r4JQBI/AAAAAAAAAfc/MB_4HuZbUBY/s72-c/P1010548.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1578264747863933568.post-7186195902979952873</id><published>2009-04-10T17:52:00.006+02:00</published><updated>2009-04-10T18:03:51.491+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='coffee'/><title type='text'>Coffee</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_exkrkQ1M9hM/Sd9saQpnhmI/AAAAAAAAAck/-zGPH5Vzyg4/s1600-h/3139QG2WETL._SL500_AA280_.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 280px; height: 280px;" src="http://2.bp.blogspot.com/_exkrkQ1M9hM/Sd9saQpnhmI/AAAAAAAAAck/-zGPH5Vzyg4/s320/3139QG2WETL._SL500_AA280_.jpg" alt="" id="BLOGGER_PHOTO_ID_5323092482977138274" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I've got myself a new coffee machine. I &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;stumbled&lt;/span&gt; upon a Bosch &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Barino&lt;/span&gt; espresso machine that had been used for demonstration purposes. Not for brewing coffee but just for standing on display. So it hasn't been used! The price was down by 60% or so, so I didn't really have to think twice before bringing out my wallet.&lt;br /&gt;&lt;br /&gt;I've had one cup of coffee so far and I have to say I'm impressed. After a few months of being spoiled with excellent coffee at &lt;a href="http://www.kaffemaskinen.se/"&gt;Kaffemaskinen&lt;/a&gt; I was a bit worried when I fired up the Bosch brewer. Could this thing possibly produce a good espresso? I assure you - &lt;span style="font-weight: bold;"&gt;it can. &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1578264747863933568-7186195902979952873?l=johnsassortedstuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johnsassortedstuff.blogspot.com/feeds/7186195902979952873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1578264747863933568&amp;postID=7186195902979952873&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/7186195902979952873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/7186195902979952873'/><link rel='alternate' type='text/html' href='http://johnsassortedstuff.blogspot.com/2009/04/coffee.html' title='Coffee'/><author><name>John</name><uri>http://www.blogger.com/profile/12512784982702927677</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_exkrkQ1M9hM/Sd9saQpnhmI/AAAAAAAAAck/-zGPH5Vzyg4/s72-c/3139QG2WETL._SL500_AA280_.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1578264747863933568.post-5924534684942322712</id><published>2009-04-10T17:34:00.005+02:00</published><updated>2009-04-11T23:29:43.253+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='work'/><category scheme='http://www.blogger.com/atom/ns#' term='john'/><title type='text'>John's first post</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;John went and got himself a blog. Not only that, he went and wrote a post too! This is it. This blog will mainly contain geeky stuff like code samples, configuration snippets and the occasional rant about random stuff.&lt;br /&gt;&lt;br /&gt;I'm a java developer at a Swedish university. I started out at the operations department, managing servers and stuff. I stayed there for a few years and got my hands dirty with all kinds off stuff ranging from oracle databases to java app servers. I then shifted career for a short time and tried the private market. I loved every minute of it but I learned that I didn't want to do operations stuff anymore. I wanted to develop! Luckily, the friendly people at the university were happy to have me back and they gave me some new assignments. So here I am now. Knee deep in legacy java code, trying to keep my head above the surface :-)&lt;br /&gt;&lt;br /&gt;&lt;div class="zemanta-pixie"&gt;&lt;img src="http://img.zemanta.com/pixy.gif?x-id=d9e7c35b-a4f5-8e2f-aa5d-c6097464ff8a" class="zemanta-pixie-img" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1578264747863933568-5924534684942322712?l=johnsassortedstuff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johnsassortedstuff.blogspot.com/feeds/5924534684942322712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1578264747863933568&amp;postID=5924534684942322712&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/5924534684942322712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1578264747863933568/posts/default/5924534684942322712'/><link rel='alternate' type='text/html' href='http://johnsassortedstuff.blogspot.com/2009/04/john-first-post.html' title='John&amp;#39;s first post'/><author><name>John</name><uri>http://www.blogger.com/profile/12512784982702927677</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
