I am trying to interact with SAS server using Java Client. I am able to establish the connection using Java Connection Factory. Once the connection is established, I need to resuse the same session or IWorkspace object created for consecutive calls to SAS server and close the session whenever I need. The session must be active till I close the session.
Below is the code I use to establish the connection:
// identify the IOM server
String classID = Server.CLSID_SAS;
String host = "rnd.fyi.sas.com";
int port = 5310;
Server server = new BridgeServer(classID,host,port);
// make a connection factory configuration with the server
ConnectionFactoryConfiguration cxfConfig =
// get a connection factory manager
ConnectionFactoryManager cxfManager = new ConnectionFactoryManager();
// get a connection factory that matches the configuration
ConnectionFactoryInterface cxf = cxfManager.getFactory(cxfConfig);
// get the administrator interface
ConnectionFactoryAdminInterface admin = cxf.getAdminInterface();
// get a connection
String userName = "abcserv";
String password = "abcpass";
ConnectionInterface cx = cxf.getConnection(userName,password);
org.omg.CORBA.Object obj = cx.getObject();
IWorkspace iWorkspace = IWorkspaceHelper.narrow(obj);
I need to somehow persist the IWorkspace object or some way to get the same IWorspace object and reuse the same object for all the consecutive calls. Please let me know, how this can be achived.
When I use WorkspaceConnector to create the IWorkspace Object, there is a way to get the Iworkspace object by using below code:
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.