Step 1: adding a JNDI entry to server.xml

To add a new JNDI data source resource, you must make an entry must for the resource in the server.xml file located in SYBASE\tomcat\conf if you are using Tomcat. Here is an example for PortalDB:

<!-- Global JNDI resources -->
<GlobalNamingResources>
    <Resource name="jdbc/portaldb" auth="Container" 
      type="javax.sql.DataSource"
      driverClassName="com.sybase.jdbc3.jdbc.SybDriver"
      url="jdbc:sybase:Tds:labxp.sybase.com:4747”?
      servicename=portaldatabase"
      username="dba"
      password="SQL"
        maxActive="20"
        maxIdle="10"
        maxWait="20000"/

StepsUpdating server.xml

  1. Open the server.xml file with a text editor.

  2. Copy and paste an existing section of code, such as the PortalDB section, to use as a template.

  3. Modify the resource name, driver, URL, and service name values using the template values as a guide.

  4. Modify the database connection values:

    NoteSee “Data connections” for performance and tuning guidelines for data connections defined in server.xml.

  5. Save and close the file.