Faisal-
It sounds like you should check out Connector/MXJ.
As you know, MySQL is native application, but we have a tool which, in a limited way, "wraps" the server as a standard JMX MBean. As a JMX MBean, Connector/MXJ makes the MySQL database appear to be a java-based component. It does this by determining what platform the system is running on, selecting the appropriate binary, and launching the executable. It will also optionally deploy an initial database, and via standard JMX management APIs present (and allow the setting of) parameters which are appropriate for that platform.
You can download sources and binaries from:
http://dev.mysql.com/downloads/connector/mxj/1.0.html
Included are instructions for deploying to JBoss, and a very simply custom JMX server based on the Sun reference JMX implementation.
Connector/MXJ 1.0.9 contains MySQL 4.1.8 resources for the following platforms:
* Linux x86
* Mac OS X 10.3
* Windows XP/2K/NT x86
* SunOS sparc
And it's not hard to add new platforms to the list, if that doesn't suit your needs.
Cheers,
Eric
Eric Herman, Software Developer
MySQL AB, www.mysql.com
Office: +31 6 207 19 662 MySQL VoIP Ext: 6594
Are you MySQL certified? www.mysql.com/certification