Running Business Processes and Composite Applications : Administering My webMethods Server : Working with the Common Directory Services API : Prerequisites : Initializing Common Directory Services
Initializing Common Directory Services
When the CDS API is accessed from inside My webMethods Server (from a CAF application for example), CDS is already initialized and no further action is needed. If you want to use the CDS API from an external application or service that has access to My webMethods Server, the CDS API must be explicitly initialized from the external application or service.
You initialize Common Directory Services by invoking the com.webmethods.sc.mws.MWSLibrary.init() static method. The input parameters are expected as Java system properties and must describe a JDBC connection URL to a My webMethods Server database schema. Instead of using remote call backs to My webMethods Server, the CDS API connects to this schema and reads all configuration and principal information.
Here is sample code showing how to initialize CDS using the MWSLibrary class:
System.setProperty(MWSLibrary.SYSTEM_PROP_DB_DRIVER,
"com.wm.dd.jdbc.sqlserver.SQLServerDriver"); // JDBC Driver Class
System.setProperty(MWSLibrary.SYSTEM_PROP_DB_URL,
"jdbc:wm:sqlserver://localhost:1433;DatabaseName=webm82_dev");
    // JDBC Connection URL
System.setProperty(MWSLibrary.SYSTEM_PROP_DB_USER, "webm82_dev");
    // DB username
System.setProperty(MWSLibrary.SYSTEM_PROP_DB_PASSWORD, "password");
    // DB
password
MWSLibrary.init();
Copyright © 2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback