Chapter 7 PowerDynamo and Java


Configuring Dynamo to use Java

You must configure your Web site to use Java class objects within your Web site. You should be aware of the following configuration options in the Configuration folder of Sybase Central if you wish to create and use instances of Java class objects within your Dynamo scripts.

Steps Java VM

Dynamo provides Java support only if you have selected a Java VM in the Sybase Central Configuration folder.

  1. From the Configuration folder, open the Default General Settings folder.

  2. In the right pane, double-click the Java VM setting.

  3. Select the Java VM option from the drop-down list and click OK.

  4. Restart PowerDynamo if you change the Java VM.


Note   Note If using the Sun VM you must have JDK 1.1.6 or higher installed. For information, see http//java.sun.com/jdk/1.1. If using the Microsoft VM, you must have msjava.dll (version 5) installed. For information, see http//www.microsoft.com/java/download.htm.

Steps Java class cache

To improve performance, information about the methods and properties of Java classes is cached. To set the Java class cache:

  1. From the Configuration folder, open the Mappings folder.

  2. In the right pane, double-click the URL prefix to modify.

  3. Enter the maximum size of the java cache and click OK. The default value is 2048KB.

  4. If you change your cache size, you must restart PowerDynamo.


Steps Classpath for the mapping

Class files that are stored in a database-hosted Web site must have their class path specified in Sybase Central. If class files in the file system are being called, you do not need to set this classpath. To set the Classpath:

  1. From the Configuration folder, open the Mappings folder.

  2. In the right pane, double-click the URL prefix to modify.

  3. Enter the classpath for this mapping in the field provided and click OK.

  4. If you change your classpath, you must restart PowerDynamo.


Note  

Executing scripts from within Sybase Central
To execute scripts that use the Java objects from within Sybase Central, the mapping and Dynamo site name must be identical. If you are running your scripts exclusively through a server such as the Personal Web Server, this is not necessary.

Check he following PATH and CLASSPATH environment variables:

 


Copyright © 1999 Sybase, Inc. All rights reserved.