Chapter 4 Load Balancing, Failover, and Component Availability
You can implement the Sybase Failover for High Availability Systems (failover) feature in Adaptive Server Enterprise 12.0 with Jaguar server database connectivity using Java Connection Management (JCM).
You configure JCM by enabling Java Database Connectivity (JDBC) connections to establish failover-enabled connections to Adaptive Server Enterprise 12.0. jConnect requires that the connection's attributes be configured on an LDAP server and accessed using JNDI. See the jConnect and JNDI documentation for more details on the jConnect configuration for LDAP.
jConnect 4.2 (EBF 8719 or later) and JNDI 1.2 are required.
You can download jConnect 4.2 (EBF 8719 or later) from http://www.sybase.com/products/internet/jconnect/jdbcreg42_52.html
You can implement failover using either:
To set up jConnect to access LDAP and JNDI with JDBC 1.0 and JDBC 2.0 connections, you must:
In the examples in this section, you must enter the
text of an indented line on the same line as the previous one.
To configure LDAP, run your Jaguar server with JDK 1.2 and use your LDAP software to set up an LDAP entry of the form:
servername=primaryserver, o=Sybase, c=US
1.3.6.1.4.1.897.4.2.5: TCP#1#hostname portnum
1.3.6.1.4.1.897.4.2.10: REQUEST_HA_SESSION=true
1.3.6.1.4.1.897.4.2.15:servername=secondaryserver,o=Sybase, c=US
servername=secondaryserver, o=Sybase, c=US1.3.6.1.4.1.897.4.2.5:
TCP#1#aeon 9898
Use Jaguar Manager to configure the connection cache with these values for the specified properties:
DBuid
DBpasswd
jdbc:sybase:jndi:ldap://<ldapserver>:<ldapport>
/servername=primaryserver;o=Sybase;c=US
You must specify a semicolon (;) as the field separator
in the Connection URL field.
To change the default values or specify additional properties that Jaguar uses for LDAP server configuration, you can create <cachename>.props files in the $JAGUAR/Repository/ConnCache directory as shown in the following example:
cachename.props:
java.naming.factory.initial=com.sun.jndi.ldap.
LdapCtxFactory
java.naming.factory.object=com.sybase.jdbc2.jdbc.
SybObjectFactory
java.naming.provider.url=ldap://duplo:389/o=Sybase,
c=US
where duplo:389 is the port where the LDAP server is running. The values listed for the first two properties are the defaults used by Jaguar.
After creating this file, you must specify the java.naming.provider.url.
You set up JDBC 2.0 extn / JTA drivers as follows:
Using your LDAP software, set up an LDAP entry of the form:
servername=serverwithxa, o=Sybase, c=US
1.3.6.1.4.1.897.4.2.5: TCP#1#hostname portnum
1.3.6.1.4.1.897.4.2.10: REQUEST_HA_SESSION=true
1.3.6.1.4.1.897.4.2.18: XADataSource
1.3.6.1.4.1.897.4.2.15: servername=secondarywithxa,
o=Sybase, c=US
servername=serverwithxa, o=Sybase, c=US
1.3.6.1.4.1.897.4.2.18: XADataSource
1.3.6.1.4.1.897.4.2.5: TCP#1#aeon 9898
Use Jaguar Manager to configure the XA resource with these values for the specified properties:
DBuid
DBpasswd
LdapLookup=ldap://<ldapserver>:<ldapport>/servername=
primarywithxa;o=Sybase;c=US
You must specify a semicolon (;) as the field separator
in the Connection URL field.
To find out if your database connection to the LDAP server is working, ping the connection cache.
To ping the connection cache:
If the server does not respond or an error occurs, make sure that:
Copyright © 2000 Sybase, Inc. All rights reserved. |
![]() |