Zurück

How to connect Net8 and Java clients using TCP/SSL ?

SQL*Net and Net8 History

Until Oracle 8, the database would only communicate with standard Net clients and use TTC (Two-Task-Common). Two-Task Common is Oracle's implementation of the OSI presentation layer. It provides character set and data type conversion between different character sets or formats on the client and server.

Net8 in an Oracle8i Environment

Oracle 8i and upcoming releases are highly devoted to the Internet, and Java now integrates the
Database, it was necessary to implement additional components to the Net8 architecture. Among those components, there are 2 core modifications that need to be understood:

  • CORBA / IIOP

  • SSL

This release of Net8 supports a new presentation layer called General Inter-Orb Protocol (GIOP) that is used for those clients connecting to the Java option. Internet Inter-Orb Protocol (IIOP) is an implementation of GIOP over TCP/IP or TCP/IP with SSL. Oracle provides the GIOP service implementation.

IIOP Client-Side Interaction

IIOP clients have different communication stack than a typical Net8 client stack, as shown below, IIOP clients use:

  • GIOP as the presentation layer rather than Two-Task Common
  • No session layering rather than Transparent Network Substrate (TNS)

Typical Client vs. IIOP Client Communication Stacks

The server side does not require many of the Net8 communication layers needed in a typical Net8 connection. Instead, the server side only requires a network protocol of TCP/IP and an Oracle protocol of TCP/IP or TCP/IP with SSL. The only component of Net8 required is Transparent Network Substrate (TNS). The figure below depicts a communication stack between an IIOP client and the Java option in the Oracle database.

Client/Server Communications Stack in an IIOP Environment

Secure Socket Layer SSL

Secure Socket Layer is a protocol used for sending encrypted information over the Internet. It was developed by Netscape and has been incorporated into many other web servers and browsers. It has become one of the most popular cryptographic protocols on the Internet and supporting SSL is now a necessity for many applications, SSL integrates encryption, authentication and data integrity. It uses public key certificates to authenticate both the client and the server in SSL transactions. SSL as a layer is implemented above TCP/IP and beneath the application layer.

Ports and Protocols

Protocol Port Description
TCP/IP 1521 Default listening port for client connections to the database. In future releases, this should become 2483 for TCP/IP and 2484 for TCP/IP with SSL.
TCP/IP 2481 Recommended and officially registered port for client connections to the Java option using TCP/IP.
TCP/IP with SSL 2482 Recommended and officially registered port for client connections to the Java option using TCP/IP with SSL
TCP/IP with SSL 1575 Default and officially registered listening port for an Oracle Names server using TCP/IP with SSL

If you have configured SSL and specified a Listening port for SSL connections on 1521 you will end up with a TNS-12560 error when starting the listener.

Listener.ora Configuration for Net8 clients only

When using the Net8 assistant to configure your Listener locations you get the choice between 3 protocol stacks (IIOP clients, Net8 clients and custom). Choose a valid port as mentioned in the above table. Below are exampls of a Listener.ora file which can handle traditional Net8 connections as well as SSL connections and Java clients using SSL. Notice that entry point waiting for Java clients has a GIOP presentation layer instead of TTC and does not use the Network Session layer (NS) which is part of the TNS component. This is the reason why
session = RAW.

#
# Listener.ora for Net8 clients only
#
LSNR816 =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = arkum)(PORT = 1521))
      )
    )
  )

SID_LIST_LSNR816 =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = D:\Oracle\Product\8.1.6)
      (PROGRAM = extproc)
    )
  )

#
# Listener.ora for IIOP clients only
#

LSNR816 =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
      )
    )
    (DESCRIPTION =
      (PROTOCOL_STACK =
        (PRESENTATION = GIOP)
        (SESSION = RAW)
      )
      (ADDRESS = (PROTOCOL = TCP)(HOST = arkum)(PORT = 2481))
    )
  )

SID_LIST_LSNR816 =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = D:\Oracle\Product\8.1.6)
      (PROGRAM = extproc)
    )
  )

#
# Listener.ora for IIOP and Net8 clients
#

LSNR816 =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = arkum)(PORT = 1521))
      )
    )
    (DESCRIPTION =
      (PROTOCOL_STACK =
        (PRESENTATION = GIOP)
        (SESSION = RAW)
      )
      (ADDRESS = (PROTOCOL = TCP)(HOST = arkum)(PORT = 2481))
    )
  )

SID_LIST_LSNR816 =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = D:\Oracle\Product\8.1.6)
      (PROGRAM = extproc)
    )
  )