You should check on the database side, not the java side. MySQL Administrator comes with a statistics package that will tell you the number of connections.
In general, there should be enough connections for the system to routinely get a database connection without much delay. If you need to configure connection pooling or your DBMS system, generally it should be analyzed and done on a level above the base Java code. For example, its rare to check available connection information in a large
J2EE system every time you request a data access object.
[ May 06, 2008: Message edited by: Scott Selikoff ]