9 months of intense development later, our first big integration project with Tourico Holidays, went live today, with an additional 1000-odd hotels appearing on our site (with more to come). A good example is Texas where we had only a few hotels outside of the major cities and we now have about 90 (plus more inside the major cities, of course).
Continue reading “Sometimes, things just work…”
Category: Java
The rumours of Ruby’s death are greatly exaggerated…
Sheesh… it seems like every man and his dog is jumping on the latestTIOBE index figures showing a very> small dip in the popularity of Ruby. Talk about lies, damned lies, and statistics…
Continue reading “The rumours of Ruby’s death are greatly exaggerated…”
Why external Maven repositories are a bad idea
Using EJB3 with Spring
In my previous entry, I talked about how you could easily use Spring from within EJB 3 beans, thanks to the magic of EJB interceptors. But what about the other way? How do you use EJB 3 from Spring?
*Update:* It looks like the Interface21 guys have had similar ideas – check out Project Pitchfork
Using Spring with EJB 3
Back when we were planning the migration to Glassfish, I realised we would have two dependency-injection frameworks in use – EJB 3 and Spring. For obvious reasons, I wanted to know more about how these would interact. At the time (last July), I couldn’t find anyone who had used EJB 3 and Spring together – even Ben Alex from Interface21 hadn’t come across it. Six months later, and I still haven’t heard of anyone using Spring _from_ EJBs. Except for us.
Testing EJBs without a container
One of the more annoying aspects of testing EJBs has always been the fact you need to bundle them up in a JAR (and often an EAR) and deploy them to a server to thoroughly test them. This process drags out the development of unit tests, and makes life generally painful.
As of EJB 3, however, it’s no longer necessary. instead, it is fairly trivial to mock out the container entirely (and safely!)
Interfaces with EJB3
Starting last October, we went through a process of upgrading the main application at Wotif to be running under Java EE 5 (not just Java SE 5). The biggest part of this was upgrading from EJB 2 to EJB 3.
One of the things I noticed was that EJB3 gives you a lot of choices for how to implement and configure EJBs and their associated interfaces. There’s a lot of “standards” on how to do it, many of them conflicting, but very little explanation of why. This is the set of standards I came up with (and was largely successful in getting implemented), and why I chose them.
Running on Glassfish
Well, it took long enough, but it’s finally done:
Response Headers - http://www.wotif.com/ X-Powered-By: Servlet/2.5, JSP/2.1, JSP/2.1, JSP/2.1, JSP/2.1, JSP/2.1, JSP/2.1, JSP/2.1, JSP/2.1, JSP/2.1 Set-Cookie: PersistCountryCode=1; Domain=.wotif.com; Expires=Wed, 23-Sep-2037 22:11:45 GMT; Path=/ Content-Encoding: gzip Content-Type: text/html;charset=utf-8 Content-Length: 11520 Date: Wed, 24 Jan 2007 22:11:45 GMT Server: Sun Java System Application Server Platform Edition 9.0_01 Connection: close 200 OK
Phew. Now maybe I can get those backlogged EJB3-based articles out.
CVS to Subversion Migration – a war story
One of the things that was annoying us at Wotif for some time has been how slow our CVS repository had been getting. Doing a tag after a release, for example, could take up to 15 minutes, CruiseControl was taking up to 45 minutes to do a scan, that sort of thing. Basically, the server … Continue reading “CVS to Subversion Migration – a war story”
One of the things that was annoying us at Wotif for some time has been how slow our CVS repository had been getting. Doing a tag after a release, for example, could take up to 15 minutes, CruiseControl was taking up to 45 minutes to do a scan, that sort of thing. Basically, the server we were using was almost literally having the hard disks melt… a 4GB CVS repository was being hammered almost continually. So, we finally bit the bullet a few weeks ago, and moved to Subversion, and I thought I’d share the experience.
Continue reading “CVS to Subversion Migration – a war story”
How not to handle exceptions from static code block in Java
Saw a “post at taragana.com”:http://blog.taragana.com/index.php/archive/how-to-handle-exceptions-from-static-code-block-in-java on “How To Handle Exceptions From Static Code Block in Java”. It came down to advocating logging it and rethrowing a runtime exception which would “normally ends the program execution”. Sorry, but I couldn’t let this piece of extremely bad advice slide…
Saw a “post at taragana.com”:http://blog.taragana.com/index.php/archive/how-to-handle-exceptions-from-static-code-block-in-java on “How To Handle Exceptions From Static Code Block in Java”. It came down to advocating logging it and rethrowing a runtime exception which would “normally ends the program execution”. Sorry, but I couldn’t let this piece of extremely bad advice slide…
Continue reading “How not to handle exceptions from static code block in Java”
