Creating MysqldResource from a running MySQL
"Xiaolei Li" <[email protected]> Fri, 26 Jan 2007 23:34:41 -0600
| Newsgroups | gmane.comp.db.mysql.java |
|---|---|
| Message-ID | <[email protected]> |
Hi all, I'm using Connector/MXJ in my application and it's working great except for one minor quirk. This happens when the user force-quits the program (via something in the OS say). Normally, when the program exists gracefully, I can shutdown the MysqldResource (and thus the mysqld process). But when it's being force quit, I do not get a chance to do that. As a result, mysqld keeps running after the program exists. So, I figure that's fine for now. But when my program re-launches after a force-quit, I'd like to get a new MysqldResource but have it link to the running mysqld. Then, I can do a graceful shutdown when the program exists again. So, my question is, is it possible to initialize a MysqldResource but have it be associated with a mysqld that's already running? A related question is that if my program exits unexpectedly, can I somehow trap it and quit mysqld? Thank you. -- Xiaolei -- MySQL Java Mailing List For list archives: http://lists.mysql.com/java To unsubscribe: http://lists.mysql.com/[email protected]