SAS 9.1.3 Integration Technologies » Developer's Guide


Using the Java Workspace Factory
Connecting with Directly Supplied Server Attributes
Connecting with Server Attributes Read from an LDAP Server
Language Service Example
Returning a Workspace to the Java Workspace Factory
Java Clients

Using the Java Workspace Factory

Note: It is recommended that you use the Java Connection Factory interface in order to take advantage of the new features available with SAS 9 Integration Technologies.

The SAS workspace is the highest-level component in the IOM object hierarchy, and connecting to a workspace object is the first step in using an IOM server. The WorkspaceFactory class provides methods for creating and connecting to a SAS workspace on an IOM server.

The Java Workspace Factory provides a consistent interface for connecting client programs to IOM servers through all the various permutations of communications technologies. While IOM servers are designed to integrate with many different communications technologies and support many different usage scenarios, the Java Workspace Factory hides these complexities. In addition, the Java Workspace Factory is flexible enough to support a Java client program from its early development stages through its deployment in a production environment.

In a Java client program, you can use either of two methods to supply the Java Workspace Factory with the information that it needs in order to connect to an IOM server:

  • You can place the required information directly in the client program. For details, see Connecting with Directly Supplied Server Properties. Connections can be made one at a time on an as-needed basis; or you can set up a pool of connections to be shared and reused across multiple Java client applications and multiple connection requests. Connection pooling is secure, and it can dramatically reduce connection times in environments where one or more client applications make frequent but brief requests for IOM services.

  • Alternatively, you can obtain the required information from a managed, secure LDAP directory using indirect logical names. For details, see Connecting with Server Properties Read from an LDAP Server. When you use this method, the decision about whether to use connection pooling is made by the LDAP administrator. In addition, when using the LDAP server, the Java Workspace Factory can be configured to control access to workspace objects and to the Java Workspace Factory's administrative functions.
The Java Workspace Factory can log diagnostic and status messages and write them to output for use in debugging or performance monitoring. For details, see Logging Java Workspace Factory Activity.

After you are finished using a workspace object that you have obtained from the Java Workspace Factory, you must return it to the factory by calling the close() method on the WorkspaceConnector. For details, see Returning a Workspace to the Java Workspace Factory. When you are finished with the instance of the Java Workspace Factory itself and you no longer need to request workspace objects from it, you must shut it down by calling the shutdown() method or the destroy() method. For details, see Shutting Down the Java Workspace Factory. These processes are the same whether you are using connection pooling or making single connections, and whether you provide information about the IOM servers directly in your client program or indirectly using an LDAP directory server.