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"/
Updating server.xml
Open the server.xml file with a text editor.
Copy and paste an existing section of code, such as the PortalDB section, to use as a template.
Modify the resource name, driver, URL, and service name values using the template values as a guide.
Modify the database connection values:
Username – the database user name
Password – the database password
maxActive – the maximum number of database connections allowed. This value should reflect the maximum expected user load for the database.
maxIdle – the maximum number of idle database connections available at all times. This value should reflect expected user load fluctuation for the database.
maxWait – the maximum length of time to wait for a database connection. If additional connections are requested that exceed the maxActive property, the additional connections are put into a wait state until an available connection is returned to the pool. maxWait throws an exception when the defined time is exceeded.
See “Data connections” for performance and tuning guidelines
for data connections defined in server.xml.
Save and close the file.