back to article Java arrives on Heroku code cloud

Heroku – the multi-language "platform cloud" owned by – is now running Java applications. Akin to Google App Engine, Microsoft Azure, or VMware's Cloud Foundry, Heroku is an online service for building, deploying, and readily scaling applications. It was originally designed for Ruby on Rails apps, but has since …


This topic is closed for new posts.
  1. David Dawson


    Seems a bit odd to belabour the point on 'J2EE containers', when the linked example is how to start up a new instance of Jetty, which is ...

    <drum roll>

    A J2EE container (note the javax.servlet.HttpServlet references in the example if you don't believe me)

    Despite what is discussed lower down, it is a full servlet container (not just a 'web server'), which is a portion of the J2EE spec, and forms the basis of most J2EE implementations, and all containers.

    You can stitch a few things onto it to implement the full spec.

    Its a lovely piece of kit, and is extremely good for embedding into another app, which is what is being done here.

    So, after all this pedantry is done, this looks a nice environment to deploy into; given that you don't actually _need_ to deploy onto a J2EE container, but rather can fire one up if you want to, this does give you a lot of flexibility.

    Bad example though :-)

    1. Destroy All Monsters Silver badge


      Jetty is just a "servlet container", i.e. a callback mechanism where the call just happens to be a HTTP request. Nothing particularly fancy.

      A J2EE container is old-school anyway (so ugly and 2000). Today, we have "JEE" containers. And they contain services for messaging, naming, database access (EJB3), code injection, AOP, and whatnot. They also contain HTTP callback handling.

      None of this is necessarily needed of course. And some of it should really be rolled back into the standard JVM environment, in particular some of the annotation-based facilities.

      1. David Dawson


        I'm pretty sure I mentioned that it was a servlet container ....

        Hold on..

        Yep, I most certainly did.

        JEE is a rebrand of enterprise java, nothing more. It came in with the switch from Java 1.4 to Java 5 (internally still called 1.5). JEE 5/6 is much nicer, but not that much nicer. Especially when (in my experience) most development is done using the many non spec frameworks around (spring/ hibernate being chief) for final deployment on Tomcat. And honestly, EJB? It was the wrong solution. originally, and only got a bit better by becoming a standardised version of hibernate, which is _still_ better.

        Servlets are part of the enterprise java spec (whatever you decide to call it), so its right to say they are part of enterprise java. Jetty has been around in one form or another since 2000, similar with Tomcat, which was the original reference implementation for servlets.

        I was discussing that its amusing that they rail against the Java 'containers' and then use one of them in their example. They explicitly mention Tomcat as something they want to move away from, however they fire up an equivalent. I could write code that starts up Tomcat in almost the exact same way as the Jetty example they provide, and in a similar amount of code.

        As a side note, the 'annotation based facilities' are to a large extent available outside of the enterprise containers, although you need a container of some sort for a lot of it (spring/ hibernate with JDO would work).

        I'm not having a go at their implementation, which seems fine. Its a managed JVM instance, not a container, so they are right in that. However their example does not fit the 'we are replacing java containers', since they use one.

        A better example would be to throw away the entire spec, and write a little web server using straight sockets, maybe with a little integration of freemarker or velocity. That would give a web server, with a nice templating language, and could be implemented in 20 lines or so.

        1. Destroy All Monsters Silver badge
          Paris Hilton

          Slow down! Right now!

          No you mentioned that it was a J2EE container. Which it clearly isn't.

          Why aren't you rebuilding the application stack?

          I mean, you have the whole weekend.

          1. David Dawson

            I was going slow

            Jetty is a java enterprise container, equivalent to tomcat, which they explicitly mention as a target. Fair enough, is not a full implementation of the jee( you're right, that's the correct name now) spec, but it's an implementation of part of it. So i disagree with ' it clearly isn't'. The difference we are describing is between a jee application server and a servlet container.

            I'd say they are both java enterprise containers, although different. You would not.

            And why don't I stitch it together into a full jee (I want proposing to build it all myself, just switch it together from the different components, it can be done, i didn't say it should..)? Because that would be daft my dear fellow, i deploy spring based web apps like most other people in the field I'm in. To tomcat, or sometimes jetty, to which I'm partial. Java enterprise (well, ejb mainly) was bypassed years ago. It's got some adoption, but it's not been the default for ages.

            I'm still of the opinion that they choose an unfortunate example for their new system, which looks nice.

            Seriously, try and build a webserver in java. Use one of the off the shelf templating libs, or better yet, build the thing in groovy or scala. It'll be done in 20 lines, and will work ok for moderate lead. You don't need something of the complexity of a servlet container for many things.

            So forget the weekend, I'd take half an hour.

  2. Wile E. Veteran

    Modern languages?

    But will it support Ada?

  3. Larry Cable

    the controversy is ... there is no controversy!

    Seriously? Oh Herouku have abandoned the full J {2} EE specification and they are eschewing implementing containers! ... stop the presses clear the back page.

    This is not news, pretty much all of the current Java clouds have already done this, perhaps with the exception of RedHat/JBoss for obvious reasons ...

    This does however beg the question, how does this relate to, which was supposed (I thought) to be a strategic partnership between Salesforce and VMWare to deploy Java/Spring etc in order to capture the enterprise developers???

    funny that the keen hacks @ the Register failed to investigate ... yawn

This topic is closed for new posts.

Other stories you might like