Hi,

I would like to use OWB on WebSphere 6.1 (similar to Tomcat 5.5) which requires Java 1.5 and supports Servlet API 2.4.
OWB needs Java 1.6 and Servlet API 2.5.

Part 1: Java 1.6

After a close look into the sources I see, there is one basic dependency to Java 1.6: java.util.ServiceLoader To solve this problem, I've added a utility class in my local copy and delegate calls to ServiceLoader to this utility.

The utility class itself calls ServiceLoader, if the class is available (Java 1.6) or uses com.googlecode.bspi.ServiceLoader (Java 1.5).
So the application needs one new dependency (only in the case of Java 1.5).

I've also changed the maven-compiler-plugin to generate Java 1.5 compatible byte code.

Jira: https://issues.apache.org/jira/browse/OWB-582

Part 2: Servet API 2.5

Some classes uses the new function ServletContext.getContextPath() for logging and giving a thread a useful name.

Here, I also added a utility class, and call servletContext.getServletContextName() in the case of Servlet API 2.4

Jira: https://issues.apache.org/jira/browse/OWB-583

Conclusion:

There are not many dependencies to the new APIs and there are simple workarounds. With this changes (and a similar patch for the ServiceLoader in CODI) I'm able to run OWB on WebSpere 6.1 and Tomcat 5.5 with Java 1.5.

Any suggestions?

Regards,

Udo

Reply via email to