skip to main content
Developing JDBC Applications : Specifying Application IDs
 

Specifying Application IDs

Application IDs are alphanumeric strings passed by an OpenAccess SDK Client that identify the client application to an OpenAccess SDK service that has been configured to accept connections only from specific application IDs.
After establishing a connection with the JDBC Client, immediately invoke setApplicationId. The setApplicationId method is defined on the interface com.ddtek.jdbc.extensions.oaExtensionInterface, and uses the following method prototype:
public void setApplicationId(String s) throws SQLException
You can set the application ID as shown in the following example:
import java.sql.*;
import com.ddtek.jdbc.extensions.oaExtensionInterface;
 
...
Connection con = DriverManager.getConnection(...);
 
String appId = "myAppID";
if (con instanceof SlExtensionInterface)
{
SlExtensionInterface slCon = (oaExtensionInterface)con;
slCon.setApplicationId(myAppID);
}
where myAppID is the application ID.
For more information about configuring OpenAccess SDK services to accept connections only from specific application IDs, refer to the OpenAccess SDK Administrator’s Guide.