Category: java

  • Batching JMS messages for performance; not so fast

    Recently an idea had crossed my radar around speeding up performance of messaging producers; batching messages into a single transaction. The idea being that there is overhead in the standard behaviour of a message bus that can be optimised out if you group messages into a single transaction. My initial thoughts about this were that […]

  • Get Functional

    That was the message that was coming through the Devoxx conference presentations this year. The idea that it will help your code run in the brave new world of multi everything (multi-core, multi-thread etc.) is one that’s widely touted, but rarely the primary driver for its use. Instead, it’s about less code, that’s more easily […]

  • Deep Diff Pizza

    There is nothing I love more than a proprietary, undocumented API. Call it an unfortunate fact of life, but weird object models that hang together by the skin of their teeth are out there. Most of the time there’s no validation logic to check that they’re semantically or syntatically correct until you send this tangle […]

  • A Better Builder

    The builder pattern should be familiar to anyone who has needed to change data from one format to another. Often called assemblers, translators or similar, they’re found peppered throughout almost every project. The idea is pretty simple: It’s OK for translating small object graphs, but for non-trivial work, these things can turn into huge heaving […]

  • Would you like a toolbar with that platform upgrade?

    It’s innocuous enough. “A new update of Java is available. Do you want to upgrade now?” Sure, OK. Why not. Click. Dowload. Install. WTF? What’s the story here? Are Sun that strapped for cash that they need to make a few bucks by installing Yahoo’s “value adds”?

  • When a Cache is more than a Cache

    Recently I have come across a number of instances when I have needed to perform searches across data cached in memory. Standard cache implementations, however do not provide anything more than basic key-value lookups, which is a bit of a pain. One of my colleagues came up with a clever solution to this – keeping […]

  • Hibernate/JPA Ternary Relationships

    After much pain and suffering trying to get ternary relationships working correctly using the JPA annotations, I finally hit upon this post. The secret sauce: it makes use of the (rather poorly documented) @CollectionOfElements Hibernate annotation to annotate the set of link objects in the primary class, and makes the link class @Embeddable. No primary […]

  • Pimping Builds

    From the Pimp My Build session by the Atlassian guys. Use Ant imports. The imported stuff can check for preconditions and fail cleanly using the <fail unless=”…”> tag. Use macros. Don’t build stuff you don’t need using the <uptodate> task. Use <outofdate> from ant-contrib, which is even better. You can use audio snippets to tell […]

  • JavaOne Flights Booked

    Everything is finally booked and I am looking forward to hitting the shores of San Francisco next weekend. The lineup looks really good and I’m still having difficulty choosing between the sessions. I will also be at CommunityOne, which looks outstanding for a free event. 14 tracks!? Amazing! Hats must go off to the organizers. […]

  • JavaOne Pre-booking

    I finally got around to booking in onto some of the tech sessions for JavaOne in San Francisco next month. Gasp! The amount of stuff going on is incredible. From new languages on the JVM (Fortress, Scala, JRuby) to SOA, mobility and techniques in app development it’s pretty easy to book up 12 hours a […]