All Examples  This Package

Class examples.jndi.InitialContextExample


public class InitialContextExample
extends Object
This example illustrates how to obtain an initial WebLogic naming context. It shows how to create a context with default (guest), or authenticated access to the naming system, and how to create a naming context using the WebLogic Environment object.

Build the example:

  1. Set up your development shell, as described in Setting up your environment.
  2. Compile the files in this directory as shown in this examples for Windows NT:
      $ javac -d %CLIENT_CLASSES%
Run the example:
  1. Start WebLogic Server in a new command shell.
  2. In your development shell, run the client with the following command:
      $ java examples.jndi.InitialContextExample t3://hostname:port username password
    Host name of the WebLogic Server
    Port where the WebLogic Server is listening for connections (weblogic.system.ListenPort).
    username password
    If provided, the example creates an initial context with authenticated access privileges by also specifying the Context.SECURITY_CREDENTIALS property
Copyright (c) 2000 by BEA Systems, Inc. All Rights Reserved.

Method Index

 o main(String[])
Runs this example from the command line.


 o main
 public static void main(String args[])
Runs this example from the command line.

All Examples  This Package