Oracle8i Java Tools Reference Release 3 (8.1.7) Part Number A83727-01 |
Library | Service | Contents | Index

## Miscellaneous Tools

This section describes special-purpose tools.

- java2rmi_iiop

- modifyprops

### java2rmi_iiop

In the current JServer Enterprise JavaBeans implementation, EJBs communicate with clients by RMI-over-IIOP. This presents a difficulty for a CORBA client that wants to pass an object to an EJB for the EJB to invoke (call back) because the CORBA transport is IIOP, not RMI-over-IIOP. The CORBA client needs to pass the EJB an object the EJB can invoke with RMI-over-IIOP. The `java2rmi_iiop` tool generates the stubs, skeletons, and other classes a client or server needs to make an object remotely invocable by an EJB. (`java2rmi_iiop` is the analog of the VisiBroker for Java `java2iiop` tool, except that it expects interfaces that extend `java.rmi.Remote` rather than `org.omg.CORBA.Object`)

The Java interface definitions must follow the RMI spec:

- Interfaces must extend `java.rmi.Remote.`

- All remote methods must throw at least `java.rmi.RemoteException.`

- All arguments and return values of the remote methods must be valid RMI types.

#### Syntax

    java2rmi_iiop [options] <file>.java ...
      [-no_bind]
      [-no_comments]
      [-no_examples]
      [-no_tie]
      [-root_dir <directory>]
      [-verbose]
      [-version]
      [-W <number>]
      [-wide]

#### Argument Summary

Table 1-59 summarizes the `java2rmi_iiop` arguments.

##### Table 1-59 java2rmi_iiop Argument Summary

Argument | Description
--- | ---
`-nobind` | Suppresses the generation of `bind()` methods.
`-no_comments` | Suppresses comments in generated code.
`-no_examples` | Suppresses the generation of example code.
`-no_tie` | Suppresses the generation of tie code.
`-root_dir` | Places all generated files in the specified directory instead of in the current directory.
`-verbose` | Emits extra messages.
`-version` | Displays the version of VisiBroker for Java that you are currently running.
`-W` | Setting this option to 0 (zero) suppresses all warnings from the compiler.
`-wide` | Maps Java `String`/`char` to IDL `wstring`/`wchar`.

#### Example

Generate RMI-over-IIOP class files for an RMI interface:

    java2rmi_iiop Dictionary.java

### modifyprops

Some aspects of the Oracle8 i ORB are governed by properties it reads when a new session running the ORB starts. You can change these properties with the `modifyprops` tool. Developers should change ORB properties only when Oracle technical support provides instructions to do so.

#### Syntax

    modifyprops {-u | -user} <user/password@<database> [options]
    {<key> <value> [,<key> <value>] ... | <key> -delete}
      [-o | -oci8]
      [-t | -thin]

#### Argument Summary

Table 1-60 summarizes the `modifyprops` arguments.

##### Table 1-60 modifyprops Argument Summary

Argument | Description
--- | ---
`-user` | Specifies a user, password, and optional database connect string. See "user" for details.
`-oci8` | Directs `modifyprops` to connect with the database using the OCI8 JDBC driver. `-oci8` and `-thin` are mutually exclusive; if neither is specified, then `-oci8` is used by default. Choosing `-oci8` implies the form of the database connect string. See "user" for details.
`-thin` | Directs `modifyprops` to communicate with the database using the thin JDBC driver. `-oci8` and `-thin` are mutually exclusive; if neither is specified, then `-oci8` is used by default. Choosing `-thin` implies the form of database connect string See "user" for details.
`<key> <value>` | Oracle technical support will advise you of the values to enter for `<key>` and `<value>`.

#### Argument Details

user

    {-user | -u} <user>/<password>[@<database>]

The permissible forms of `@<database>` depend on whether you specify `-oci8` or `-thin`; `-oci8` is the default.

- `-oci8`: `@<database>` is optional. If you do not specify, then `modifyprops` uses the user's default database. If specified, then `<database>` can be a TNS name or a Net8 name-value list.

- `-thin`: `@<database>` is required. The format is `<host>:<lport>:<SID>`.

  - `<host>` is the name of the machine running the database.

  - `<lport>` is the listener port that has been configured to listen for Net8 connections. In a default installation, it is 5521.

  - `<SID>` is the database instance identifier. In a default installation it is `ORCL`.

| Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
Library | Service | Contents | Index