Using Named SQLJ Connection Contexts

A SQLJ executable statement can designate a connection context object that specifies the database connection where the SQL operation in that clause will execute. If the SQLJ statement omits the connection context clause, then the default connection context is used.

To use a named SQLJ connection context:

  1. Declare a context class .
  2. Create a context object.

Named connection contexts are not required: SQLJ statements that omit the connection context name use the default connection context.


Embedding SQL in Java Programs with SQLJ
About SQLJ

 

Copyright © 1997, 2004, Oracle. All rights reserved.