All Examples 

package examples.workspace.shared

Class Index

about this package

The SharedSpace example shows how to allow different clients to share access to objects in a Workspace. In this example, one client sets a key/value pair and another client retrieves the value.

how to use this package

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.

there's more . . .

First check out the other Workspace-related examples, in the examples/workspace and the examples/workspace/monitor directories.

Then read the Developers Guide for this API, Using WebLogic Workspaces. Also check out the overview in Writing a T3Client application.

Copyright © 1997-2000 by BEA Systems, Inc. All rights reserved.

Last updated 12/29/1998