Archives for : Oracle

Oracle to Sun Customers

Oracle’s statement to Sun Customers.

What? No mention of Java.  I really couldn’t care about Solaris or SPARC.  What is the future of Java?

My thoughts on Oracle, Sun and Java

Over at Oren’s Blog there was the following comment:

So what. I don’t care much what the writer says. Java is open source, so Oracle can’t “own” it in the sense they can’t control it.

to which I responded:

Java itself is not opensource only the JDK. This means if you want to help to make changes to the core libraries you can but if you got a wild hair for some reason and wanted to figure out how to add LINQ to Java you couldn’t. See

This is an important distinction. The JDK is opensource, not Java. This means the future of Java is in the hands of Oracle and it scares me. Development on the Oracle DB itself has been rather stagnant. I’m not saying that there haven’t been new features added, just that Oracle hasn’t been making any big leaps forward.

I’ve had the unique opportunity for the last 6 years to develop professionally in Java and the last 5 years in C#, a man of both worlds. When C# first came out I was thinking, so what? I can do that in Java and do it easier and cleaner. C# had a lot of catching up to do. Fast forward 5 years and Java is so far behind the curve now. Development of the Java language has become stagnant. Like the Oracle DB, new features are added sure, but there haven’t been any significant leaps forward. Java has simply fallen behind. I just hope Oracle doesn’t do to Java what it has done to it’s DB and let it die a slow death. As pointed out by Andrew nearly all of Oracle’s business is with the government, and having worked on some government contracts I can tell you that is starting to slip.

As a new generation of IT moves into places of power they simply are not as enamored with Oracle as the old guard were and they are willing to look to other solutions.

So what does this mean? C, C++ and Perl haven’t had any new features for a long time. Does a language need to make leaps forward? C, C++ and Perl live in different worlds with different purposes then Java and .Net. Sure there are some cross purposes but for the most part they are separate. Java has to continue to innovate if it wants to stay a viable mainstream language. I hope that Oracle can bring innovation back to Java and yet worry that it doesn’t really care.


In thinking back, the only part of my comment I disagree with is:

having worked on some government contracts I can tell you that is starting to slip.

The reason I disagree with it is because, at this moment, the federal government and the DOD are still firmly entrenched in the idea that Oracle is the only way to go. So basically I’m saying that things aren’t starting to slip, at least not right now.

But I do firmly believe the next part of my comment:

As a new generation of IT moves into places of power they simply are not as enamored with Oracle as the old guard were and they are willing to look to other solutions.

My point here is that I think Oracle cares about Java because their tools are written in Java. But that is it’s only extent. Now that the JDK is opensourced I’m sure we’ll see some movement in the JDK but very little, if not nothing, in the Java language itself. This is really a shame.

There is no doubt that Java rules in the web application market against .Net and ASP.Net, just as there is no doubt that Apache rules in the web server market against IIS. Maybe that is fine for Java. Maybe Sun wants it to be consigned to a subset of the development market. But there are some heavy hitters in that market, Ruby, PHP, and Perl to name a few.

So why not try and carve out a significant share in all markets? Java has never truly had a significant share in the desktop application market. I feel it was held back by how bad AWT and then Swing were. In Java 6 it seems like they’ve tried to make some steps forward with the new desktop APIs but it doesn’t seem like that is enough.

6 years ago Java was an innovation. Now it’s merely stagnant. It’s APIs can’t keep up, it’s language features can’t keep up. With every new release of .Net I find it easier and easier to do everything. With every new release of Java I think, “That’s kind of cool but that doesn’t help me.”

There is a definite flaw there. I hope Oracle dumps a bunch of money into Java and really gets the development platform, from both the JDK and the language features perspective, kicked into high gear. It’s just that it seems that Oracle actually likes stagnation. If it ain’t broke, don’t fix it is their attitude. The problem is that, while that may work for the Oracle DB with their heavy paying government projects, it doesn’t work for Java.


UpdateOrInsert (Upsert)

Hibernate used an InsertOrUpdate (aka Upsert) method to save values (netTiers uses Save for the same thing).  This made things really simple, no need to work out if you have inserted the object, just call InsertOrUpdate and Bob’s your uncle.  Here I present the InsertOrUpdate method (well, copied from but I made it universally applicable 🙂 .  A handy little thing that lets you use do both.


UPDATE Table1 SET (...) WHERE Column1='SomeValue'
   INSERT INTO Table1 VALUES (...)

It’s nice, it’s simple and does what needs to be done without a lot of work. 

Here is the same approach can be used for postgresql, oracle and mysql.


UPDATE Table1 SET (...) WHERE Column1='SomeValue'
   INSERT INTO Table1 VALUES (...)


UPDATE Table1 SET (...) WHERE Column1='SomeValue'
IF sql%rowcount=0
   INSERT INTO Table1 VALUES (...)


INSERT INTO Table1 (Column1, ...) VALUES (SomeValue, ...)

See also:

UPDATE: Btw, if you’re using SQL Server 2008 you can use MERGE to do this.