Bug#341777: Support Mysql for WebApps deployed to Tomcat

Andreas Schildbach andreas at schildbach.de
Mon Dec 5 15:49:39 UTC 2005


Wolfgang Baer wrote:

> if you need stuff in your webapps you
> should put it in or link it from the webapps libs/classes directory to
> get it picked up. This is also some kind of security problem as
> common/lib is trusted.

First of all, it is both common and recommended practise to _not_ 
include the database driver with the application, but instead aquire 
connections from a container provided DataSource instead. If you're 
going to use Tomcat's JDBC realms, you will not even have an alternative 
than putting the database driver (or a symlink) into common/lib.

> You would have a dangling symlink if libmysql-java is not installed
> or removed after some time.

I understand your point. Then what about a separate package just for the 
symlink? The package could depend on both tomcat(5|4) and libmysql-java, 
so it would disappear if either the database driver or tomcat is 
uninstalled.

> Another point is where would you draw the line ? If linking libmysql-java
> why not also jdbc for postgresql, sapdb, hsqldb ...

Indeed, there should be solutions for each major database, at least for 
all of the "official Debian supported" DBs. Maybe one package for each 
supported db?

> you can add almost 
> every
> library to this list.

Indeed, there are more cases like this. It is also common practise to 
get JavaMail Sessions from a DataSource. I know JavaMail is not and will 
probably never be packaged by Debian, but there is an os implementation 
of JavaMail which fills the gap.




More information about the pkg-java-maintainers mailing list