-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Lucia Sheehan wrote:
I am creating a java application and am using tomcat.   I would like to be
able to use mySQL in embedded mode, is this possible?  you mentioned in
this thread that it could be made linkable in a java application, can you
tell me what needs to be done to achieve this?

There is no off the shelf support for the 'embedded' mysql server from Java. Different people over the past couple of years have looked at doing it, and have ran into problems with performance and threading issues due to JNI (the Java Native Interface), and the fact that varying JVMs don't always play well with Posix Threads, and the overhead of converting to/from C and Java Strings. Of course, Java (especially something like Tomcat) requires threading, and so that would begin to cause issues with any JNI-based access to 'libmysqld' (as the embedded MySQL server library is called).

There are a few people on the mailing list [EMAIL PROTECTED] that have 'embedded' (but not used 'libmysqld') MySQL in their Java applications by using Runtime.exec() and controlling MySQL by issuing command-lines built up from configuration files in their applications to call either 'mysqld' or 'mysqladmin'. (The same topic came up around the 20th of last month, you can check out the various issues and explanations by going to the archive). If you're interested, one person on the mailing list pointed out their project (http://jose-chess.sourceforge.net/) that has this code already. Check it out in their CVS repo:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jose-chess/src/de/jose/db/MySQLAdapter.java?rev=1.1.1.2&content-type=text/vnd.viewcvs-markup


Is there a reason that something similar to this wouldn't work for you?

-Mark


- -- MySQL 2003 Users Conference -> http://www.mysql.com/events/uc2003/

For technical support contracts, visit https://order.mysql.com/?ref=mmma

__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mark Matthews <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
/_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
<___/ www.mysql.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+RYd1tvXNTca6JD8RAoWsAJ0S010nOrizCLWgA0vyARMQZVN+PQCgrCjv
Gk91xkabikezE7tFwqAw1M8=
=UUrp
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to