Connecting to a Zero-Configuration Workspace Server

Overview of Connecting to a Zero-Configuration Workspace Server

Zero-configuration workspace server connections enable you to create a local workspace server without specifying any connection attributes. This feature is specific to Windows environments.
Zero-configuration workspace server connections do not require an object spawner or a SAS metadata server.
To create a zero-configuration workspace server connection, you must meet the following requirements:
  • SAS 9.3 or later is installed on the same machine where the client is running.
  • Your client and your SAS software run on a Windows machine.
  • The sspiauth.dll file is in either your system PATH, your java.library.path, or in the home directory of your Java client.
A zero-configuration workspace server runs as a child process of the Java process that creates it. The server runs as the same user ID as the owner of the Java process.
The com.sas.services.connection.ZeroConfigWorkspaceServer class creates the zero-configuration connection.

Example of Connecting to a Zero-Configuration Workspace Server

The Java code in this example demonstrates how to create a Server
import com.sas.iom.SAS.IWorkspace;
import com.sas.iom.SAS.IWorkspaceHelper;
import com.sas.services.connection.ConnectionFactoryManager;
import com.sas.services.connection.ManualConnectionFactoryConfiguration;
import com.sas.services.connection.SecurityPackageCredential;
import com.sas.services.connection.ZeroConfigWorkspaceServer;


 server = new ZeroConfigWorkspaceServer();
 config = new ManualConnectionFactoryConfiguration(server);
 manager = new ConnectionFactoryManager();
 factory = manager.getFactory(config);
 cred = new SecurityPackageCredential();
 cx = factory.getConnection(cred);
 try { 

   //  Narrow the connection from the server.
   org.omg.CORBA.Object obj = cx.getObject();
   IWorkspace iWorkspace = IWorkspaceHelper.narrow(obj);

< insert iWorkspace workspace usage code here >

 }
 finally {cx.close();}
Note: To make the previous example more readable, we have removed most of the code structuring elements. The example will not compile as it is shown.