Oracle Sues Google over Android

News has emerged of legal action being taken by Oracle (which recently acquired Sun Microsystems, the company behind Java) against Google over alleged infringements of patents in the Android operating system which currently enjoys great popularity in the mobile phone market.

As I’ve been giving software patents a bit of thought recently, I find this development quite interesting. The actual complaint against Google has been posted on VentureBeat and is worth a read. The language used comes over as direct and aggressive, but I think that’s just the way these legal claims are phrased generally.

There are a number of patents involved, all issued in the United States – so what are the alleged infringements? Let’s take a look – I’ll link the patents mentioned to copies of the claims and give a few thoughts based on a quick review of what I think the gist is. I should also say that patent claims are generally pretty dull to read so I don’t claim to have done a detailed analysis!

US Patent No. 6125447, “Protection domains to provide security in a computer system” filed in 1997. Lays out mechanisms to manage what software components can do in a computer system.

US Patent No. 6192476, “Controlling access to a resource”, filed again in 1997. A method for controlling, for example, the access a thread has to system resources based on what code is running in the thread at the time.

US Patent No. 5966702, “Method and apparatus for pre-processing and packaging class files” filed in 1999. A collection of mechanisms used in Java’s classloading operations.

US Patent No. 7426720, “System and method for dynamic preloading of classes through memory space cloning of a master runtime system process”, filed 2003. Er – what the title says!

US Patent No. RE38104, “Method and apparatus for resolving data references in generated code”, a re-issue of another patent originally filed in 1992 – three years before Java was released – by the James Gosling. This patent is all about mechanisms Java uses to achieve the flexibility of an interpreted language with performance more akin to a compiled language. I wonder if this (potential) patent suit was a driver for Gosling’s departure from Oracle in early 2010?

US Patent No. 6910205, “Interpreting functions utilizing a hybrid of virtual and native machine”, filed 2002. More mechanisms Java uses to improve performance.

US Patent No. 6061520, “Method and system for performing static initialization”, filed 1998, improving performance of initialising static arrays.

Regardless of your views on software patents in general, I’d say these patents are quite well written and quite specific to the ways Java works. It’s likely that many will view this action as evil Oracle sniping at good ol’ Google, but I’m not sure I share that view.

This isn’t a corporate giant picking on the little guy – right now, Oracle is  worth around $115bn, and Google weighs in at around $158bn. Why shouldn’t Oracle use the intellectual property assets it acquired when it bought Sun?

Will this lawsuit damage Google or kill Android? I don’t think so – besides the size and diversity of Google, Oracle and Google don’t seem to be directly competing in related domains, so it wouldn’t make much sense for Oracle to actually want to damage Google. I expect that this action is a move to get Oracle a slice of the Android pie and I think it might succeed.

Will Oracle’s customers turn away because of this action? Oracle’s big in the corporate world, and big companies aren’t very likely to take issue with business machinations such as these.

It could turn evil from there. If legal action against Google sticks, is it possible for action to be taken against everyone downstream of Google from the phone companies to we the users? It’s more difficult to imagine those kinds of moves being played by Oracle – there would surely then be reputational damage.

Another question I’m not sure of the answer to – where is OpenJDK in all this? Does this action present a future risk to these open source efforts or are there differences in licensing between Android and other open source initiatives?

At this stage at least, it seems to me that Oracle is playing the patent game by the rules. If there’s something wrong, it’s with the game, not the players.


Hibernate 3 Tip – Log PreparedStatement bindings

I was trying to see what values were being bound to placeholders in the JDBC PreparedStatements generated by Hibernate DAO test classes I’ve created as they go about their persistent business.

Dead easy, right? Hibernate supports a configuration parameter ‘show_sql’. Set that to true and see what’s going on under the covers. Well… not so much. For a simple save operation, setting that results in the following logged output:

Hibernate: insert into ComponentGroup (name, id) values (?, ?)

Not exactly what I was hoping for. I don’t know what values have been bound to those two question-marks. After a bit of faffing and google-fu, I found this short-but-sweet post which showed a number of additional logging options to enable (assuming use of log4j). As it turns out, the important one in this case is:

Which add a little more detail to the output:

Hibernate: insert into ComponentGroup (name, id) values (?, ?)
19:23:40,753 TRACE StringType:151 – binding ‘group1’ to parameter: 1
19:23:40,754 TRACE LongType:151 – binding ‘1’ to parameter: 2

It has to be the TRACE level, not DEBUG, and I can now see that the effective SQL, substituting for the placeholders is

insert into ComponentGroup(name, id) values (‘group1’, 1)

which helps me work out the detail of what’s going on.

Quick Review of ‘Spring in Action’

My better half bought me a copy of Spring in Action (2nd Edition) by Craig Walls last year. I think it’s been a great help for me as I’ve been getting started with Spring.

I’d say the first four chapters are worth reading in sequence to get a feel for what Spring does and how it does it.

Chapter 1 introduces what Spring does, with some really nice examples of how using the dependency injection capabilities allows components to be mocked up and unit tested much more easily. I think writing good unit tests can be challenging (well, it is for me anyway) so it’s nice to see this theme taking a prominent role.

Chapters 2 and 3 start onto a description of Spring’s dependency injection capabilities, from declaring beans and references to craziness like declaratively substituting method implementations in a class.

Chapter 4 moves on to Spring support for aspect-oriented programming, a technique with which behaviours of an application that really don’t belong in an object’s code (think security, auditing, etc.) can be defined outside of your business logic. There’s a nice theme of examples running through these chapters that somehow does make this stuff make intuitive sense.

From here on in things get a bit more esoteric. Other topics I found interesting were database access (covering JDBC, Hibernate, JPA and more), web services, EJB and JMS – but there are many more. For these later topics, you tend to get a little background and step-by-step introductions with examples. Given the range of topics there’s a often a surprising depth. The material has also proven to be quite accessible when I’ve gone back for reference.

There aren’t really any downsides. Where I’d like the material to go deeper there are other books I can get that are more specific. The occasional humour can be irritating if I’m in the wrong mood but hey, it’s in moderation.

If you’re looking for a good general introduction to what Spring is and what it can do for you,  can recommend this book.