We're updating the issue view to help you get more done. 

Discontinue Java 1.4 API Support


I propose that we officially stop support of running Cargo on JDK 1.4. This would imply an end of support for embedded JDK 1.4 containers, but not affect our ability to support local or remote 1.4 containers.

Merits of moving to JDK 5
As you may know, JDK 1.4 is end of life by Sun and 5 EOL is fast approaching. We should feel comfortable discontinuing support for a JDK version no longer supported by Sun. While we maintain support for JDK 1.4, we limit our ability to use the more expressive language features and APIs that depend on JDK 5+. For example, JUnit 4 annotation-based test cases can be expressed in less lines, and Generic types could eliminate most of our runtime casts. Lightweight Java 5 frameworks like Guice can rid us of the more complicated lines of our codebase. I expect that moving to JDK 5 would allow us to reduce the "cruft" in our codebase significantly, making it easier to read and maintain. When the code is easier to read and maintain, developers have more incentive to move the project forward.

I don't know the full history, or if there was an explicit desire to retain support for Cargo on JDK 1.4. I expect in the past we retained support for JDK 1.4 in order to launch 1.4-only containers (such as WebLogic 8.1). Now, the Cargo API is decoupled from the JDK of the container. So, we can run Cargo on JDK 5 and launch JDK 1.4 containers through the system property cargo.java.home.

Code impact of dropping JDK 1.4
A move off JDK 1.4 wouldn't imply an immediate need for code change. It could start with communication of how to use the property cargo.java.home and disabling the long-broken all-ci-java-1.4 profile. Cargo is already tested on 5, so there is no inherent work required.

Making container's JDK assignment more managable
Most containers are only truly supported on one JDK, and the Major version doesn't typically change through the lifecycle of that container.
We could ease things by adding a feature that binds a major java version to a container. With this assignment in place, Cargo could assign the correct JDK from presets for 1.4, 5, and 6. These presets could be set by system properties like: cargo.java.home.1_4. I've used this system to launch JDK 1.4, 5, and 6 WebLogic containers over the last couple months. I've had no issues and continue to run all my builds from Java 5.

Sooner or later, we will drop support for JDK 1.4. Moving to Java 5 will reduce the burden of development, as we can take advantage of APIs and libraries that require it. I believe now is good a time as any, as we have proven features that mitigate the impact of this to our users.



Adrian Cole


Adrian Cole


Fix versions

Affects versions