Oracle GlassFish, or Why You Should Think About Open Source Again

Oracle’s recent announcement about the discontinuation of commercial services for JEE’s reference implementation GlassFish has caused many reactions in the community involved with JEE. The reactions reach from:

This event seems to have a big impact on the whole Java ecosystem as many of the above people are key players and influencers in our community, and they neither agree nor know what this step by Oracle means for the future of JEE.

The most interesting point of view among all of the above, in my opinion, is tomitribe’s, looking at things from a mere business point of view with respect to Open Source. They’re saying:

Open Source Isn’t Free

Or in other words, “There ain’t no such thing as a free lunch”. And to quote tomitribe even more, a very interesting thought they’re setting out is this:

What this says to me is that we as an industry still do not fully understand Open Source.

We most certainly do not understand Open Source. I’m an Open Source software vendor myself. I believe that Open Source is:

An excellent marketing tool

People look at Open Source as something “generally good”. When I talked about jOOQ at conferences and when it was an all-Open-Source piece of software (not yet dual-licensed), I got lots of opportunity to do free advertising. This has rapidly changed, now that I am offering an alternative commercial license.

A good tool enabler

I get free access to

The same here. As I’m now a “commercial” software vendor, some tools are no longer accessible to me.

The truth is: Open Source is a business strategy

It really is. And it seemed to have worked well for RedHat or Pivotal in the past. Has it worked for anyone else? We don’t know yet, as most other larger companies have such huge amounts of revenue in “classic” fields that they can simply “afford” Open Source. In fact, they’re so good at investing manpower and innovation into Open Source, it keeps the commercial competition in check, as it is hard to write a better and more complete JEE implementation than Weblogic or Websphere.

Apparently, even Larry Ellison is said to agree that the future of data centers lies within using commodity machines. At the same time, RedHat suggests “trying free” to Oracle.

No matter what the impact of the commercial unsupport of GlassFish on JEE will be, we’re only at the beginning of fully understanding what kind of impact this large scale “freemium” model will have on our world. This isn’t just about the software industry. The whole Internet has brought us “free” stuff. We get:

  • “Free” standards (compare W3C, IETF standards to ISO standards!)
  • “Free” Facebook and Twitter and GMail accounts
  • “Free” newspapers
  • “Free” music and films
  • “Free” commodity services for all sorts of work
  • “Free” work force as we can offshore anything to low-wage countries

This has been picked up recently by Tim Kreider, the author of “We Learn Nothing”, where he depicts how writing “free stuff” for the New York Times helps building “exposure”, and how that’s just nonsense as all this hard journalist work doesn’t pay anymore.

Does building “exposure” ring a bell?

Yes, I can build “exposure” by writing free Open Source on GitHub, and by answering complex questions for free on Stack Overflow. I personally use both tools to advertise jOOQ, no doubt. So I get a service (advertising) for a service (content). My deal appears fair to me. But loads of GitHub and Stack Overflow users contribute … just for the sake of contributing. To whom? To GitHub and Stack Overflow. And why? I don’t know.

So, should you contribute to GlassFish, if Oracle starts decreasing support and loosening interest as they have before with MySQL, Hudson, and other products inherited from Sun?

Let’s remember that Karl Marx has already taught us that our idea of capitalism will inevitably lead us to (citing from Wikipedia):

  • technological progress
  • increased productivity
  • growth
  • rationality
  • scientific revolution

Absolutely! There’s no way that productivity can get any better than by having loads of software developers world wide produce better and better tools (growth, progress) for nothing more than … for free!

So, don’t be a pawn of others’ Open Source strategies

So, instead of contemplating what Oracle’s move away from supporting the Open Source reference implementation of JEE means, become active yourself! Don’t just blindly consume Open Source, make it an option like any other option by consciously deciding in favour of Open Source or commercial software, depending on your specific needs.

Stop advertising their cool products for free at conferences, unless you pull out your own advantage from such an advertisement. Open Source is just yet another business model.

Annotatiomania™ 2.1

It’s been a while since I have last ranted about annotations and the increasing Annotatiomania™ in the JEE ecosystem. I haven’t been exposed to much JEE either, until yesterday, when I was confronted with an awesome talk by Adam Bien at ch-open, where I’ve also held a talk about jOOQ. JEE 7 ships with lots of goodies.

But then, I saw this!

Let me treat you to a introductory example of how to use a stored procedure through JPA 2.1, which our friends from EclipseLink have had the courtesy to share with us:

    @NamedStoredProcedureQuery(
       name="ReadUsingMultipleResultSetMappings",
       procedureName="Read_Multiple_Result_Sets",
       resultSetMappings={
           "EmployeeResultSetMapping", 
           "AddressResultSetMapping", 
           "ProjectResultSetMapping", 
           "EmployeeConstructorResultSetMapping"
       }
   )
   
   @SqlResultSetMappings({
       @SqlResultSetMapping(
           name = "EmployeeResultSetMapping",
           entities = {
           @EntityResult(entityClass=Employee.class)
           }
       ),
       @SqlResultSetMapping(
           name="EmployeeConstructorResultSetMapping",
           classes = { 
               @ConstructorResult(
                   targetClass = EmployeeDetails.class,
                   columns = {
                       @ColumnResult(
                           name="EMP_ID", 
                           type=Integer.class
                       ),
                       @ColumnResult(
                           name="F_NAME", 
                           type=String.class
                       ),
                       @ColumnResult(
                           name="L_NAME", 
                           type=String.class
                       ),
                       @ColumnResult(
                           name="R_COUNT", 
                           type=Integer.class
                       )
                   }
               )
           }
       )
   })
   public Employee(){
       ....
   }

Obviously, Eclipse Copernicus (or what’s Kepler’s successor?) will ship with an Enterprise-licensed source code formatter built by Nobel Prize mathematicians to actually display the above. With that license, you also get a 50% discount coupon on the latest 67″ Samsung flat screen for an Enterprise coding experience. Awesome!

Also, whenever I hear “ReadUsingMultipleResultSetMappings”, I immediately think J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource, too. Some powerful permutation mathematics and random natural language processing is thus involved.

Not just did JPAnnotatiomania™ 2.1 treat us with stored procedure support, named fetch graphs are now also part of the game. Do note that with only a few lines of code, we will finally be safe from writing tedious SQL! Behold:

   @NamedEntityGraph(
       name="ExecutiveProjects"
       attributeNodes={
           @NamedAttributeNode("address"),
           @NamedAttributeNode(
               value="projects", 
               subgraph="projects"
           )
       },
       subgraphs={
           @NamedSubgraph(
               name="projects",
               attributeNodes={
                   @NamedAttributeNode("properties")
               }
           ),
           @NamedSubgraph(
               name="projects",
               type=LargeProject.class,
               attributeNodes={
                   @NamedAttributeNode("executive")
               }
           )
       }
   )

Another 5000$ spent on formatting licenses to format the above.

Conclusion

No longer shall effective developers be paid by the lines of code, but they should be paid by the lines of @-signs they write. And I’m surely looking forward to Adam Bien’s next talk, about JEE 7 Best Practices!