You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most Java web applications are packaged as JAR or WAR files that can run on the command line or in a Servlet container but not both. Cantaloupe is distributed as a dual JAR/WAR that can run either way. But this is an unusual way of packaging an application that has several disadvantages:
It deviates from the standard build processes that Maven, Gradle, etc. all want to do. For example, you can see all of the hackery in pom.xml that is needed to get this working.
There are class-loading issues when running as a JAR. Before the Servlet context has loaded, the system class loader only has access to a few classes and care must be taken not to include any dependencies that have other dependencies that would bloat the JAR/WAR as well as cause problems once the Servlet class loader takes over. SLF4J/Logback are a couple of these dependencies and a recent change to Jetty has resulted in Nothing is getting written to the access.log #338. Fixing this will be difficult and error-prone.
The dual JAR/WAR is somewhat larger than a dedicated JAR or WAR would be as it contains some duplicate classes.
It requires more maintenance and testing.
Tangential to this issue are the usual arguments against containers, which IMO are strong and would weigh on a decision about whether to drop the dual JAR/WAR in favor of an ordinary JAR.
Version 5.x would be a good time to do a switch. But, I know that this would inconvenience some container users, and I'm willing to consider arguments in opposition.
The text was updated successfully, but these errors were encountered:
Most Java web applications are packaged as JAR or WAR files that can run on the command line or in a Servlet container but not both. Cantaloupe is distributed as a dual JAR/WAR that can run either way. But this is an unusual way of packaging an application that has several disadvantages:
pom.xml
that is needed to get this working.Tangential to this issue are the usual arguments against containers, which IMO are strong and would weigh on a decision about whether to drop the dual JAR/WAR in favor of an ordinary JAR.
Version 5.x would be a good time to do a switch. But, I know that this would inconvenience some container users, and I'm willing to consider arguments in opposition.
The text was updated successfully, but these errors were encountered: