Impressed by Hibernate Annotations

I have been a big fan of Hibernate for some time and I have only used Hibernate 2.x in the past. Most recently I jumped right to the cutting edge and have been using Hibernate Annotations on my current project. Even though Hibernate Annotations are only in a beta release, everything worked fairly seamlessly and any issues we had were only minor inconveniences. My conclusion is that it is definitely worth moving to Hibernate Annotations if you are on a project or about to start a project based on Java 5.

There are many great reasons to use Hibernate Annotations and my list includes:

  • Reducing your dependencies on XML for configuration files
  • Increase the speed of your development loop as annotations become part of your application and you don’t have to worry about copying files into your classpath
  • Removes the complexity of ensuring that your code and XML files become out of sync (though XDoclet eases this a little, you still have to make sure the generated files end up in your classpath)
  • Modern IDEs (specifically IntelliJ and I think Eclipse) makes adding, changing, and automagic completion of annotation information an easier task that looking up document references.

I have always been pretty impressed by the amount of documentation for Hibernate (it is such a rarity for many open source projects) and the same level of diligence has been applied to the documentation for Hibernate Annotations. The documentation takes you through pretty much the same detail as the normal Hibernate reference and is enough to satisfy most needs. I am sure that we will be seeing another version of Hibernate in Action book coming soon when Hibernate Annotations release their final version.

Caveats for early users of Hibernate Annotations

  1. Lagging Tool Support - Like the lag there was (is?) when Java 5 was released, the same could be said for tool support for Hibernate when using annotations. At least of this writing, we had difficulty using the schema export task as it seemed to instantiate the wrong type of Configuration object, but a quick java snippet seemed to fix it for us.
  2. Strange Default Behaviours – As I have not really used Hibernate 3 in anger, I’m not sure if this is a Hibernate issue or a Hibernate Annotation issue but nevertheless strange. Annotations such as the field level @Id one does not default to the GeneratorType.AUTO by default.
  3. Half Hearted Lucene Integration – I’m beginning to become a really great fan of Lucene and was surprised to see that Hibernate Annotations now had an @Indexed annotation for Lucene support. Unfortunately it seems like what support was half-heartedly added demonstrated by minimal documentation on indexing objects, but not necessarily about retrieving them. Upon closer inspection the index created by the Annotations is useful if you are using a different or custom Lucene Analyzer upon reading it and there is no way of configuring it.

Tips for migrating to Hibernate Annotations

Obviously I have been fairly lucky to be using Hibernate Annotations on a new project. For those that are on an older version there is likely to be more effort in migrating. The documentation seems to imply that the guys have given much though to people migrating from declarative Hibernate mappings and it is good to know that you can mix and match Hibernate Annotations and normal Hibernate configuration files and specify which configuration will override the other (although you cannot use both on the same entity hierarchy). A suggested migration path would involve:

  1. Migrate from Hibernate 2.x to Hibernate 3.1
  2. Introduce Hibernate Annotations in replacement of configuration files for a few of your domain objects and test that your build and release process continues to operate
  3. Continue to replace configuration files for Hibernate Annotations for the rest of your domain.

A Place by the Poole

The last two weeks I’ve been spending a bit of time working for a client down in Poole, Dorset, a town located a couple of hours by train south west of London. It is best described as a quaint English seaside town, the sort that you tend to see in many English shows and movies. It apparently has one of the better beaches in England, though you probably need to be in the peak of summer to use it, assuming that is you can wade through the swarms of people covering the sand to actually get to it.

If you actually see people in Poole (Monday nights are completely dead around town) you will find yourself surrounded by two sorts of people, the elderly and bikers (yes, you read correctly).

Understanding Poole is a pleasant place for people to retire and you’ll find yourself constantly surrounded, be it in the shopping centre, around town or in the pubs, with loads of people with white hair. During summer, early on Tuesday evenings, you’ll find the second crowd congregates by the Quay-side where the “biggest and best weekly” motorcycle event in the UK is held (well at least as described in the brochure). Police shut down the entire wharf side as bikes of all sorts including vintage, home-made, standard and premium ones are lined up one after the other. Of course because it is a school night, you’ll find the entire evening finishes early and most of the crowd has dispersed by about 9 at night.

So what do you do if you ever find yourself in Poole? Your best bet during the day is to take a cruise around the harbour or a ferry to the Brownsea Island which apparently has a number of great walking tracks. In the town the biggest attractions are the waterfront museum describing the town’s history, a pottery factory and a historic walking trail lasting for about an hour an half around town called the Cockle Trail. If you find yourself here at night, there are enough restaurants and take away stores to suit any budget and enough bars and pubs to do the same.

Poole is one of those places that, if you’re looking for a place to relax and avoid the hustle of London, you will enjoy for a weekend and I do not recommend it as a destination if you want a week filled with things to do.

The Hunt for a Home In London

After several weeks of intense house hunting, I finally have a place that I can call home in London. Accommodation over here is severely skewed towards a renter’s market, with so many students, professionals and tourists flocking here that there is such an excess in demand over supply. In looking for my more permanent place to live, I have managed to cover a fair bit of London, at least what is covered by the tube, and seemingly a lot more than what many other people who live here have been to. You find that your standards in the home you want tend to slip fairly quickly as you pay extravagant prices for such a small place. My experience was probably even more difficult, looking for a flatshare with total strangers in totally unknown places. It was effectively the combination between the job hunt and the house hunt bundled as a lovely package (not!)

Over the four weeks that I was looking, I looked at just over 30 different units, houses and flats all over London. The overwhelming part of London is that there are so many areas to live and it is difficult to work out where you should live. A good third of the properties I saw were really dedicated to discovering more the different areas more so than really trying to find a place to live. It seems that the south west parts are dominated by Antipodeans and was highly recommended to me, but most of my workmates live in the North (a.ka. Islington and Camden). In the several weeks I was looking, I saw places all over including Paddington, Maida Vale, Notting Hill, Bayswater, Putney, Fulham, Hammersmith, Islington, Camden, Clapham North, Clapham Common, Brixton, West Kensington, and Earl’s Court.

Fortunately as time went by, I discovered a small talent in being able to filter out properties that just weren’t up to scratch so I wouldn’t have to waste time actually visiting the place, only to reject it later. In all of the places that I visited there were about five out of the thirty-plus that I actually wanted to stay in. Unfortunately many of the early ones came off the market (i.e. housemate didn’t end up moving, or a mate who was so-so about moving in ended up moving in). The important thing though is that I now have a place I can call home.

Read on if you are interested in a few tips from me about finding a place in London: (more…)

Momix - Opus Cactus

Add the maturity, style and choreography of Circ Du Solei but without the circus acts, add stunning lighting and visual tricks performed on stage by a set of dancers, all backed by a soundtrack as if made by Buddha Bar’s Claude Challe himself and that only begins to describe what the Momix show is all about. This visually rich show is held at the Peacock theatre, and my sister got us bargain stall tickets normally retailing for more than at least £30 for only £10.

It is much too difficult to describe what the show is about – perhaps it is best classified as contemporary dance as there is no singing and no real acting, but then it is not so much about the dancing than it is about the visual tricks that have been mastered by the performers. Their costumes and props in combination with the detailed lighting and music, take you from the real world where you are sitting and plunge you into a surreal world where what you see on stage may not be what you think.

A show that is best explained if you watch if for yourself and something that I can highly recommend.

Covent’s Belgo Centraal

Belgo CentralAlthough Belgium is apparently just a Eurostar train ride away, I’m surprised that I haven’t yet had food nor a beer from a Belgium restaurant or bar. As you can probably tell from the title of this post, that all changed last night as I feasted on a filling meal at the Belgo Centraal restaurant. Located opposite the Paul Frank store and Neal’s Yard in Convent Garden, a flight of stairs will take you down to the spacious basement holding the huge kitchens and the large number of tables and benches making up the restaurant.

Until this morning I did not realise that the Belgo Centraal is actually part of a larger chain (funnily enough called Belgo Restaurants) but not on the same scale as your McDonalds franchise. It seems that the chain is having a promotion for many of its restaurants and last night we partook in the Beat the Clock one. By ordering one of the promotional meals (that is also served with a Maes lager, house wine or soft drink) you only pay the price at the time of your order as long as it is between 5pm and 6:30pm.

Thrilled by the mussels (or moule as they call it) at the Belgium Beer Café back home, I decided to go for the moule and frites special. Although I will admit that the meal was not as good as the same as you would get back home, it was still tasty overall. Perhaps it was the size of the more miniature mussels that took more effort eating, or that it was the white wine sauce (or did you ask for soup?), or maybe it was the frites that were more like french fries than anything (still definitely much better than your typical English chip affair, but not matching the extravagance and crispness of the thick beer battered ones back home). Don’t be mislead by my detailed description, the mussels were still a huge serve and extremely tasty even without the sauce. My sister and her friend both ordered a chicken which was I was told was extremely succulent through and full of flavour, even with the rich sauce that almost drowned it.

The food was so good that we even decided to follow it with a dessert comprised of a Belgian waffle sitting in a rich dark chocolate sauce and topped with a scoop of hazelnut ice-cream.

Details: Belgo Centraal
Found on: 50 Earlham Street, Covent Garden, London, WC2 9HP
Contactable on: +44 (0)20 7813 2233
Highlights: Open tables and atmosphere that is quite busy but not overwhelmingly noisy. Good food and beer selection (the schnapps sticks looked deadly though entertaining). Beat the clock deal also offers great value for diners.
Room for improvement: Benches are a little too close together, perhaps making it too easy for a knee in the back as people walk by.
The Kua Rating: 7 out of 10

A Typical London Outfit

Seems to consist of… (more…)

An Introduction to the “He Who Knows” Challenge

Just like my mate, Ben, we’ve both been challenged by a colleague at a common former employer of ours. This mutual colleague of ours has spent a fair amount of time in London, and going by the moniker, ‘He Who Knows’, has requested the following:

I submit a challenge to you young Kua. I would like a Kua-rating on the following.

  • The hot chocolate at Amato.
  • The espresso at Bar Italia.
  • The G&T at the Finsbury Circus Lawn Bowls club.
  • The little Italy Long Island Iced Teas.
  • The Conran restaurants.
  • The extension to the British Library.
  • The new Baltic Exchange.
  • The Kua newspaper of choice.
  • The pret-a-manger experience.
  • The Leadenhall fishmonger.
  • The Boro markets.
  • The Evensong at Southwick cathedral.

Can you succeed where others have failed ?

Not one to back down from a challenge, I intend on properly getting around to all of the places and giving them the proper review. There are no guarantees on how fast I’ll get around to doing these, but I can assure you that each one will be appropriately reviewed in due time. Watch this space.

To Market, To Market

Update: Summary added for the ‘He Who Knows’ Challenge

The Borough MarketsLocated just outside the London Bridge Underground station, you will easily stumble across London’s Borough Markets, with the closest thing back home in Brisbane being the farmer’s markets organized by Jan Power. I had high expectations for these markets, having read about this place sometime last year at The Passionate Cook’s food blog, and after visiting can say that I was definitely not disappointed.

The only way that I can succinctly describe the markets is that it is distinctly London. Unlike the powerhouse markets back home where you can walk up one side and down the other, the Borough markets can be difficult to navigate. Just like the city that hosts it, the markets comprise of winding paths connecting all the stalls seemingly held together by the swarms of people from all over the world that flow through them all. Admittedly the markets are not as big as I was first anticipating, consisting of about 70 stalls and a handful of stores, but the quality and variety of food and produce available certainly make up for it.

The offerings of food is amazing and had I actually had a kitchen to return home to yesterday, probably would have come away with much more than I did. Stretching further than just typical farmer markets fare, the markets have pretty much everything you would need for any pretty fine dinner, and listing them all here would not really give justice to what the markets really do offer, but you can find huge varieties of fresh fruit and vegetables, seafood, poultry, meat, game, jams, cheese, wines, breads, cakes, chocolates and just so much more.

Whats Up Doc?One of London’s premium coffee stores, Monmouth, has a double presence here with a small stall in the heart of the markets fuelling the crowd’s almost frenzied movements with shots of caffeine, and the more permanent fixture on the street just opposite the markets. The more permanent fixture is so popular, that like all busy pubs in the city, that it has people cascading onto the streets, all standing around chatting and drinking coffee out of proper cups and saucers. Neil’s Yard Diary, well known for its quality cheese products also has a physical store just next to Monmouth but was so busy inside I didn’t feel up to pushing my way through to its delightful offerings (especially where there is one just a street away from work).

It should be fairly obvious to a person new to London that meat and meat products play a big game in British food fares (or is that just London?). Amongst the many meat products on offer, I saw a much wide variety of things including fresh Haggish, Black Pudding, pies, sausages, rabbits hanging, wild boar, pheasants and an amazing amount of cured, smoked or dried meats. I was thoroughly impressed by one particular store, the name currently eluding me that had four or five legs of cured pork meat each held by a single vice all on a large long bench. At the request of a customer, attendants would shave off fresh slices of what looked like prosciutto or parma-ham, with a long blade to be carefully layered on sheets of plastic.

Feeling like I couldn’t come away from the markets without making a purchase, but unable to really buy anything that useful (my hotel room doesn’t have a bar-fridge or anything) I decided to pick up a punnet of fresh raspberries to snack on, and a small bottle of oak-smoked garlic butter to give to my sister.

The markets are only open from noon until 6pm on Friday and then 9am to pm on Saturday. Crowds on a Saturday are thin early on, but increase in density pretty quickly. There are plenty of things that you can still pick up, even if you don’t live in London (fresh coverture chocolates, cakes, croissants, sweets, berries, coffee, etc) and even though the markets are on the southeast side of London, it is extremely easy to get to. It’s definitely a place I will be visiting regularly.

Details: The Borough Markets (Location)
Found on: 8 Southwark Street, SE1
Highlights: Fantastic variety of food, nice atmosphere and great variety, and the potential to see Jamie Oliver walking around.
Room for improvement: Crowds and people with strollers make it difficult getting around to all the stalls and combined with the winding paths may make it difficult for you to return to that stall you may want to revisit.
The Kua Rating: 8.5 out of 10 (I’m impressed but I haven’t visited any of other London’s market offerings)

Next Page »