Download Oracle Database JPublisher User's Guide

Transcript
JPublisher Options
The -dbjava option automatically sets -nomain=true because of Java stored
procedure limitation. In case a method with the signature main(String[]) is to be
generated with the -nomain=true setting, then JPublisher will rename the method,
for example, into main0(Stringp[]).
The default setting is:
-nomain=false
PL/SQL Code Generation Options
This section documents the following options that specify JPublisher behavior in
generating PL/SQL code:
■
-overwritedbtypes
Specifies whether naming conflicts are checked before creating SQL types.
■
-plsqlfile
Specifies scripts to use in creating and dropping SQL types and PL/SQL packages.
■
-plsqlmap
Specifies whether PL/SQL wrapper functions are generated
■
-plsqlpackage
Specifies the name of the PL/SQL package in which JPublisher generates PL/SQL
call specs, conversion functions, wrapper functions, and table functions.
These options are mostly used to support Java calls to stored procedures that use
PL/SQL types. The options specify the creation and use of corresponding SQL types
and the creation and use of PL/SQL conversion functions and PL/SQL wrapper
functions that use the corresponding SQL types for input or output. This enables
access through JDBC.
Generation of SQL types
JPublisher may generate new SQL types when publishing PL/SQL types and
generating PL/SQL wrappers for server-side Java classes. The -overwritedbtypes
option determines how JPublisher names the generated SQL types. The syntax for this
option is:
-overwritedbtypes={true|false}
Prior to Oracle Database 10g release 2 (10.2), JPublisher checked the database for
naming conflicts and chose a name, which was not already in use, for the generated
SQL type. Since Oracle Database 10g release 2 (10.2), JPublisher generates SQL type
names by default, regardless of the existing type names in the database. The
-overwritedbtypes=true setting, which is the default, overwrites the existing
types if the type name is the same as that of the generated SQL type. This enables
JPublisher to generate exactly the same PL/SQL wrappers over different runs.
To ensure that JPublisher does not overwrite any type inside the database while
executing the generated PL/SQL wrapper, you must explicitly specify
-overwritedbtypes=false.
A frequently reported problem in releases prior to Oracle Database 10g release 2 (10.2)
is that after the generated PL/SQL wrapper is processed, rerunning the JPublisher
command generates a different set of SQL types. A workaround for this problem is to
run the PL/SQL dropper script before the JPublisher command is rerun.
Command-Line Options and Input Files
6-37