Oracle 5.0 Reference Manual page 2120

Table of Contents

Advertisement

connections. All load-balanced connections sharing the same
value, regardless of how the application creates them, will be managed together.
loadBalanceEnableJMX
a loadBalanceConnectionGroup, but if you want to manage this externally, enable JMX by
setting this property to true. This enables a JMX implementation, which exposes the management
and monitoring operations of a connection group. Further, start your application with the
Dcom.sun.management.jmxremote
operations using a JMX client such as jconsole.
Once a connection has been made using the correct connection string options, a number of monitoring
properties are available:
• Current active host count.
• Current active physical connection count.
• Current active logical connection count.
• Total logical connections created.
• Total transaction count.
The following management operations can also be performed:
• Add host.
• Remove host.
The JMX interface, com.mysql.jdbc.jmx.LoadBalanceConnectionGroupManagerMBean, has
the following methods:
int getActiveHostCount(String group);
int getTotalHostCount(String group);
long getTotalLogicalConnectionCount(String group);
long getActiveLogicalConnectionCount(String group);
long getActivePhysicalConnectionCount(String group);
long getTotalPhysicalConnectionCount(String group);
long getTotalTransactionCount(String group);
void removeHost(String group, String host) throws SQLException;
void stopNewConnectionsToHost(String group, String host) throws
SQLException;
void addHost(String group, String host, boolean forExisting);
String getActiveHostsList(String group);
String getRegisteredConnectionGroups();
The
getRegisteredConnectionGroups()
defined in that class loader.
You can test this setup with the following code:
Load Balancing with Connector/J
– The ability to manage the connections is exposed when you define
JVM flag. You can then perform connect and perform
method returns the names of all connection groups
2100
loadBalanceConnectionGroup
-

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents