Bug#341777: Support Mysql for WebApps deployed to Tomcat

2005-12-06 Thread Arnaud Vandyck
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Kalle Kivimaa wrote:
 Andreas Schildbach [EMAIL PROTECTED] writes:
 
I'm afraid I don't know about the packaging policy. I can only say that 
the webapp can't know what database the server-admin or deployer is 
going to use, especially since in the Realm case he's got the option of 
an in-memory or file-based realm, requiring no database at all. If you 
 
 If a webapp wants to use a DB, it is up to the maintainer of that
 webapp package to decide which DB's s/he is going to support. I'd
 guess that I would simply link all those JDBC libraries which are in
 main (actually, I probably need to do this when JSPWiki 2.4 comes
 out), but some other maintainers might take a different approach. But,
 still, this is not a Tomcat5 problem.

I'm not sure it's the responsability of JSPWiki to add symlinks in the
tomcat5 directory tree.

Maybe we can add a little script in tomcat5 to let an administrator add
a symlink if the package is installed, but what does happen if the
package is removed (libmysql-java or libpg-java or else)?

The idea of adding three or four one line package will be rejected by
ftp-masters as Kalle already said.

Maybe an explanation in the README file with a link to
http://tomcat.apache.org/tomcat-5.0-doc/jndi-datasource-examples-howto.html
can help.

Also, note that the configuration of tomcat5 should be done by an
administrator, not a usual user. An administrator should know about the
symlink to common/libs and has the right to do that.

Cheers,

- --
  .''`.
 : :' :rnaud
 `. `'
   `-
Java Trap: http://www.gnu.org/philosophy/java-trap.html
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDlWMS4vzFZu62tMIRAqnwAJ4gVHf3r3fcyXHeNw+elstpLvWkVgCgpVtW
+7CnMuum9134/zIRVDvYhzE=
=lxEN
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#341777: Support Mysql for WebApps deployed to Tomcat

2005-12-06 Thread Andreas Schildbach

Kalle Kivimaa wrote:


If a webapp wants to use a DB, it is up to the maintainer of that
webapp package to decide which DB's s/he is going to support.


Why don't you let the administrator decide upon the database? After all, 
that's what the SQL standard and the JDBC driver/JNDI datasource 
architectures are designed for.



I'd
guess that I would simply link all those JDBC libraries which are in
main (actually, I probably need to do this when JSPWiki 2.4 comes
out), but some other maintainers might take a different approach.


Does this mean that if I'm going to install JSPWiki 2.4, that package 
depends on drivers of all databases in main, and thus I have to install 
all those drivers? I'm afraid I'm not very happy with this solution, 
because I'd like to limit to just one database system. Why would I want 
drivers for dozends of DBs on my system if I'm only going to use Postgres?


Also, what approach are you going to take with tomcat5-admin? The admin 
uses Realms for authentication if this hasn't changed lately, so the 
database driver cannot be copied/linked to WEB-INF/lib rather than 
common/lib.



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#341777: Support Mysql for WebApps deployed to Tomcat

2005-12-06 Thread Kalle Kivimaa
Arnaud Vandyck [EMAIL PROTECTED] writes:
 I'm not sure it's the responsability of JSPWiki to add symlinks in the
 tomcat5 directory tree.

Well, it does so already :) It has to register itself as a webapp and
it has to add a policy file.

-- 
* Sufficiently advanced magic is indistinguishable from technology (T.P)  *
*   PGP public key available @ http://www.iki.fi/killer   *



Bug#341777: Support Mysql for WebApps deployed to Tomcat

2005-12-05 Thread Wolfgang Baer

tags 341777 + wontfix
thanks


Hi Andreas,

Andreas Schildbach wrote:

Package: tomcat5
Severity: wishlist

If I have both packages tomcat5 and libmysql-java installed, I'd like to 
have the Connector/J driver availble for web applications installed into 
Tomcat, just as if I had copied the driver to common/lib. Why don't you 
symlink from /usr/share/tomcat5/common/lib/mysql.jar to 
/usr/share/java/mysql.jar?


You would have a dangling symlink if libmysql-java is not installed
or removed after some time. Also 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.

Another point is where would you draw the line ? If linking libmysql-java
why not also jdbc for postgresql, sapdb, hsqldb ... you can add almost every
library to this list.

Regards,
Wolfgang


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#341777: Support Mysql for WebApps deployed to Tomcat

2005-12-05 Thread Andreas Schildbach

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.



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#341777: Support Mysql for WebApps deployed to Tomcat

2005-12-05 Thread Kalle Kivimaa
Andreas Schildbach [EMAIL PROTECTED] writes:
 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.

Umm, as far as I understand the Debian packaging policy, this would be
a severe violation of no unneccesary package bloat -policy. Dozens
of lines of code for a simple ln -s. IMO it is the responsibility of
the webapp package requiring database access to manage any symlinks,
not of Tomcat, not of the database, nor a specialized Tomcat DB
package.

-- 
* Sufficiently advanced magic is indistinguishable from technology (T.P)  *
*   PGP public key available @ http://www.iki.fi/killer   *



Bug#341777: Support Mysql for WebApps deployed to Tomcat

2005-12-05 Thread Andreas Schildbach

Kalle Kivimaa wrote:


Umm, as far as I understand the Debian packaging policy, this would be
a severe violation of no unneccesary package bloat -policy. Dozens
of lines of code for a simple ln -s. IMO it is the responsibility of
the webapp package requiring database access to manage any symlinks,
not of Tomcat, not of the database, nor a specialized Tomcat DB
package.


I'm afraid I don't know about the packaging policy. I can only say that 
the webapp can't know what database the server-admin or deployer is 
going to use, especially since in the Realm case he's got the option of 
an in-memory or file-based realm, requiring no database at all. If you 
look at the J2EE specification, all the application needs to know is the 
path to a JNDI Data Source. Webapps should not contain specific database 
drivers, nor the URL to a database, nor any database login information. 
This is all configured in the JNDI context provided by the servlet 
container (or application server).


Look at the options: If there is not going to be a package like this, 
the only option right now would be to manually copy the database driver 
to common/lib or manually creating a symlink there. Doesn't this 
practice also stand against the idea of Debian? The symlink created this 
way could be dangling, too. Common/lib could be exposed via /etc, where 
the user is allowed to put configuration. I would still prefer the 
packaging solution.



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#341777: Support Mysql for WebApps deployed to Tomcat

2005-12-05 Thread Kalle Kivimaa
Andreas Schildbach [EMAIL PROTECTED] writes:
 I'm afraid I don't know about the packaging policy. I can only say that 
 the webapp can't know what database the server-admin or deployer is 
 going to use, especially since in the Realm case he's got the option of 
 an in-memory or file-based realm, requiring no database at all. If you 

If a webapp wants to use a DB, it is up to the maintainer of that
webapp package to decide which DB's s/he is going to support. I'd
guess that I would simply link all those JDBC libraries which are in
main (actually, I probably need to do this when JSPWiki 2.4 comes
out), but some other maintainers might take a different approach. But,
still, this is not a Tomcat5 problem.

-- 
* Sufficiently advanced magic is indistinguishable from technology (T.P)  *
*   PGP public key available @ http://www.iki.fi/killer   *



Bug#341777: Support Mysql for WebApps deployed to Tomcat

2005-12-02 Thread Andreas Schildbach

Package: tomcat5
Severity: wishlist

If I have both packages tomcat5 and libmysql-java installed, I'd like to 
have the Connector/J driver availble for web applications installed into 
Tomcat, just as if I had copied the driver to common/lib. Why don't you 
symlink from /usr/share/tomcat5/common/lib/mysql.jar to 
/usr/share/java/mysql.jar?



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]