Oracle8i SQLJ Developer's Guide and Reference
Release 8.1.5

A64684-01

Library

Product

Contents

Index

Prev  Chap Top Next

Properties Files

This section consists of two properties files--one for the SQLJ runtime connection and one for translator option settings. These files are located in the following directory:

[Oracle Home]/sqlj/demo

Runtime Connection Properties File

The sample applications in this chapter use the Oracle.connect() method, a convenient way to create an instance of the DefaultContext class and establish it as your default connection. This method offers several signatures; the signature used in the samples takes a properties file--connect.properties--to specify connection parameters. Here are sample contents of that file:

# Users should uncomment one of the following URLs or add their own.
# (If using Thin, edit as appropriate.)
#sqlj.url=jdbc:oracle:thin:@localhost:1521:ORCL
#sqlj.url=jdbc:oracle:oci8:@
#sqlj.url=jdbc:oracle:oci7:@
#
# User name and password here (edit to use different user/password)
sqlj.user=scott
sqlj.password=tiger

The version of this file in [Oracle Home]/sqlj/demo is configured to use the OCI 8 driver and scott/tiger schema. This is appropriate for the sample applications in this chapter, presuming you have a client installation as described in Chapter 2, "Getting Started".

For other uses, you must edit the file appropriately for your particular database connection.

SQLJ Translator Properties File

The following properties file, sqlj.properties, is used in translating the SQLJ demo applications. As is, this file will specify offline semantics-checking. To specify online semantics-checking, uncomment the sqlj.user entries or add new sqlj.user entries as appropriate. An appropriate checker, either offline or online as applicable, will be chosen for you by the default OracleChecker class.

For information about SQLJ properties files, see "Properties Files for Option Settings".

###
### Settings to establish a database connection for online checking
###

### turn on checking by uncommenting user 
### or specifying the -user option on the command line
#sqlj.user=scott
sqlj.password=tiger

### add additional drivers here
#sqlj.driver=oracle.jdbc.driver.OracleDriver<,driver2...>

### Oracle JDBC-OCI7 URL
#sqlj.url=jdbc:oracle:oci7:@

### Oracle JDBC-OCI8 URL
#sqlj.url=jdbc:oracle:oci8:@

### Oracle JDBC-Thin URL
#sqlj.url=jdbc:oracle:thin:@<host>:<port>:<oracle_sid>
#sqlj.url=jdbc:oracle:thin:@localhost:1521:orcl

# Julie's database using thin driver
sqlj.url=jdbc:oracle:thin:@dlsun669:5521:815

### Warning settings
###  Note: All settings must be specified TOGETHER on a SINGLE line.

# Report portability warnings about Oracle-specific extensions to SQLJ
#sqlj.warn=portable

# Turn all warnings off
#sqlj.warn=none

# Turn informational messages on
#sqlj.warn=verbose

###
### Online checker
###

### Force Oracle 7.3 specific checker (with Oracle 8.0 JDBC and database):
#sqlj.online=oracle.sqlj.checker.Oracle7JdbcChecker

### JDBC-generic checker:
#sqlj.online=sqlj.semantics.JdbcChecker

###
### Offline checker
###

#sqlj.cache=on

### Force Oracle 7.3 specific checker (with Oracle 8.0 JDBC):
#sqlj.offline=oracle.sqlj.checker.Oracle7OfflineChecker

###
### Settings for the QueryDemo example
###
### shows how to set options for a particular connection context
###
#sqlj.user@QueryDemoCtx=scott
#sqlj.password@QueryDemoCtx=tiger
#sqlj.url@QueryDemoCtx=jdbc:oracle:oci8:@
#sqlj.url@QueryDemoCtx=jdbc:oracle:oci7:@
#sqlj.url@QueryDemoCtx=jdbc:oracle:thin:@<host>:<port>:<oracle_sid>




Prev

Top

Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index