| Using the Java Connection Factory |
Load balancing enables a Java Connection Factory to distribute server load between a cluster of redundant servers. For more information about load balancing, see Overview of Load Balancing in the SAS Intelligence Platform: Application Server Administration Guide.
Note: Load balancing can be used with SAS Stored Process
Servers and SAS Workspace Servers only . ![[cautionend]](../../../../common/61991/HTML/default/images/cautend.gif)
A connection factory that is configured for load balancing uses a group of redundant servers called a load-balancing cluster to send connection requests to the server that has the least load. If a server in the load-balancing cluster is unavailable, then connection requests are sent to other servers instead.
The following code fragment configures a connection factory to use load balancing:
String classID = Server.CLSID_SAS; Server server0 = new BridgeServer(classID,foo0.bar.abc.com,1234); Server server1 = new BridgeServer(classID,foo1.bar.abc.com,1234); Server[] servers = {server0,server1}; Cluster cluster = new LoadBalancingCluster(servers); ConnectionFactoryConfiguration cxfConfig = new ManualConnectionFactoryConfiguration(cluster);
Note: Load-balancing clusters require additional configuration
on the server side. For details, see Planning and Configuring
a Load-Balancing Cluster in the
SAS Intelligence Platform: Application Server Administration Guide. ![[cautionend]](../../../../common/61991/HTML/default/images/cautend.gif)
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.