WebLogic Server 6.0 Code Examples, BEA Systems, Inc.

examples.jndi
Class InitialContextExample

java.lang.Object
  |
  +--examples.jndi.InitialContextExample

public class InitialContextExample
extends java.lang.Object

This example shows how to create a context with default (guest access) to the naming system, and how to create a context that has authenticated access to the naming system.

The following sections cover what to do:

  1. Build the Example
  2. Run the Example

Build the Example

  1. Set up your development shell, as described in Setting up your environment.

  2. Compile the example by executing the following command or by executing the build script provided for this example in the samples/examples/jndi directory. The script will perform the following step:

    1. Compile the InitialContextExample as shown in this example for Windows NT/2000:

       $ javac -d %CLIENT_CLASSES% InitialContextExample.java

Run the Example

  1. Start the 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
    where:
    hostname
    Host name of the WebLogic Server.
    port
    Port where the WebLogic Server is listening for connections (weblogic.system.ListenPort)

Author:
Copyright (c) 1998-2000 by BEA Systems, Inc. All Rights Reserved.

Constructor Summary
InitialContextExample()
           
 
Method Summary
static void main(java.lang.String[] args)
          Runs this example from the command line.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InitialContextExample

public InitialContextExample()
Method Detail

main

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

Documentation is available at
http://e-docs.bea.com/wls/docs60

Copyright © 2000 BEA Systems, Inc. All Rights Reserved.