Provides a connection factory configuation for use with a SAS Metadata Server.

Connection Factory Configuation using SAS Metadata Server

Metadata accessed through the SAS Metadata Server is expected to be stored in a SAS Metadata Repository using the SAS Management Console tool. IOM servers and logins defined this way are always wrapped with a LogicalServer metadata object, and they may be identified in a connection factory configuration using the name or fully-qualified ID of the LogicalServer metadata object or using a live connection to the LogicalServer metadata object itself.

The following code fragment demonstrates connection factory configuration using SAS Metadata Server.

String classID = Server.CLSID_SASOMI;
String host = "metadata.abc.com";
int port = "1234";
String userName = "admin";
String password = "admin1";
Server metadataServer = new BridgeServer(classID,host,port);
ConnectionFactoryConfiguration metadataConfig = new ManualConnectionFactoryConfiguration(metadataServer);
ConnectionFactoryInterface cxf = ConnectionFactoryManager.getConnectionFactory(metadataConfig);
ConnectionInterface cx = cxf.getConnection(userName,password);
org.omg.CORBA.Object obj = cx.getObject();
IOMI iOMI = IOMIHelper.narrow(obj);
String repositoryID = "A0000001.A1234567";
String logicalServerName = "myServer";
ConnectionFactoryConfiguration cxfConfig = new OMRConnectionFactoryConfiguration(iOMI,repositoryID,logicalServerName);