Creating MysqldResource from a running MySQL
Posted by: Xiaolei Li
Date: January 26, 2007 11:28PM

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 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 been 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.

Options: ReplyQuote


Subject
Written By
Posted
Creating MysqldResource from a running MySQL
January 26, 2007 11:28PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.