All Examples  This Package

Class examples.workspace.shared.SharedSpace

java.lang.Object
   |
   +----examples.workspace.shared.SharedSpace

public class SharedSpace
extends Object

To set up this example:

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

  2. Compile this example by executing the following command in your development shell:

    $ javac -d %CLIENT_CLASSES% SharedSpace.java

  3. Start WebLogic Server in a separate shell.

This example illustrates how a user can create a workspace that can be shared among multiple clients. In this example, the user supplies a workspace name, a key string, and a value. The named workspace is created, and an arbitrary name=value pair is stored in the workspace. Another client can then extract the value from the named workspace by supplying the workspace name, and the key string. For example, the command:

$ java examples.workspace.shared.SharedSpace t3://hostname:port NASDAQ SUNW 34

Where hostname:port is the host name and port number of your WebLogic Server.

creates a workspace called NASDAQ on the WebLogic Server localhost listening on port 7001, and stores the the name=value pair SUNW=34 in the workspace.

This command allows a different client to retrieve the value for SUNW:

$ java examples.workspace.shared.SharedSpace t3://hostname:port NASDAQ SUNW

Where hostname:port is the host name and port number of your WebLogic Server.

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

Constructor Index

 o SharedSpace()
Default constructor.

Method Index

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

Constructors

 o SharedSpace
 public SharedSpace()
Default constructor.

Methods

 o main
 public static void main(String argv[])
Runs this example from the command line. This example takes the following arguments to retrieve a value:
  • WebLogic Server URL (host and port)
  • Name of the Workspace
  • Key to retrieve a value from the workspace
Add one additional argument to store a value rather than retrieve it:
  • Value to be stored


All Examples  This Package