19 January 2008

Alright -- this one bugs me to no end.

Have you ever worked with Hibernate, and some sort of Java remoting API on Java 1.6? That could apply to ALMOST anyone. EJB3 users (me!). Spring HttpInvoker/Hibernate3 (me!). RMI/Hibernate3 (me!). They all count.

Did you get a bug whereby a remote client complains (err, blows chunks with a ClassCastException) about not being able to set a field on an entity/POJO that makes use of Hibernate's "lazy" initialization across the wire? You did? Were you going to tell me about it? I mean, come on. I thought we were friends.

I upgraded Ubuntu and JBoss on my dev machine at home to be able to test. Amazingly bad things ensued. I spent a good hour finding a bug that I was sure must be afflicting other people. After all, it's essentially a bug in JBoss' EJB3. And Hibernate. And Java. And RMI. I don't know but it seemed rather hard to pin.

It was a bug in Java 1.6. I don't know why, I don't know the details. This lone result (which eluded a lot of my google searches -- which means this was so minor an issue that even Google didn't find it!?) suggested a workaround and I - ears burning - jumped at the completely ridiculous, nonsensical solution. Because... it was just crazy enough to work. A few update-java-alternatives later, I was back on Java 1.5. I re-ran my tests.

IT WORKED WHY WOULD IT WORK? HOW WOULD THAT EVEN BEGIN TO BREAK?

Everything's fine now! Hurrah. I can have my hour back, too?  No?

MySQL got bought by Sun. Oracle bought BEA. I understand the BEA acquisition. Oracle's Application server sucks rocks. BEA is the gold standard and Oracle has cash to burn. Simple economics: don't innovate what you can accquire quicker.

But why would Sun buy MySQL? Sun is pitching it as a rounding-out of its stack -- now they have the language (Java!), the database (JavaDB for embedded, MySQL for enterprise), the server (Glassfish) and the tool chain (javac, Netbeans, and the recently retired Sun Java Web creator, etc.).

Does this put them in the line of sight of Oracle, which has a better database and a better application server? Why didn't they buy the company supportig Postgres, which is a better database (well, that is, I define "better" as being more readily deployed as a replacement for Oracle. Neither have particularly good clustering, enterprise features, but Postgres comes closer in terms of portability.)? Is Sun betting on the up-and-coming InnoDB database engine replacement (whose parent company Oracle owns, a propos) Falcon to make MySQL an Oracle killer? Even a Microsoft SQL Server killer?

And of course, what does this mean for the PHP/Lamp community? MySQL's crossed over. It's got an air of "enterprise" to  it from Sun's purchase. More so than even their teamup with SAP. More so than MySQL's oft-public proliferation and succcess storeis. This database, which until recently didn't support constraints in a useful way, is now Sun's. Will they keep making releases available for free? Will they switch to the commercial model completely? Will this again jeopardize the MySQL /PHP extension's status? Heck, does this mean that the Java MySQL driver will get some love?

I can't wait to hear more.