Appendix A

Jlink services footnote: There is a difference between the old SunONE servers and the new Tomcat servers that has a small potential to affect projects that use jlink services deployed as WAR files. There are multiple factors that determine whether this difference will affect your services so we are providing this information for completeness.

Up until now we have been asked to package and deploy our jlink services inside a WAR file.  Although we use WAR packaging to deploy the services, the reality is the services are not recognized as webapps by the SunONE server and consequently they are not loaded or run as webapps by the SunONE server.  Behind the scenes, the jlink framework loads these classes directly from the file system, so that we are able to access them from our code.  The WAR packaging approach was employed as a convenience to take advantage of the existing UNAS push scripts.  This technique relied on the fact that the SunONE server does not automatically process *.war files.  SunONE requires that an entry is made in its ‘server.xml’ file before it will try to run any *.war file.  This is not the case with Tomcat.  Our Tomcat servers are configured to automatically attempt to load and run anything with a *.war extension.  This means that in the new VM environment, Tomcat will attempt to load and run every *.war file it encounters, including jlink services packaged as WAR files.   As mentioned earlier, this difference may or may not affect your code depending on several factors.  Rather than delve into those factors we’ll just provide a recommendation for avoiding them.  To avoid these problems simply include a valid, minimal ‘web.xml’ file in your jlink services WAR.  It should be valid so Tomcat doesn’t print error messages complaining it’s invalid.  It should be minimal, meaning, you don’t define or register any web components in it like servlets, filters, initializers, welcome files or the like.  An example minimal ‘web.xml’ file will be published for projects to use if they do not have one.

While discussions have taken place focusing on changing the packaging of jlink services from WARs to JARs, this will not be an option for this phase of the migration.  For the immediate future, the recommendation above is the simplest and best way to avoid problems.  If you however, still suspect you have a problem please contact [TBD].