Setting Up Application Properties

The Application instance contains the information and authentication credentials needed to register and connect to the Sybase Unwired Platform server.

The following code illustrates how to set up the minimum required fields:
// Initialize Application settings
Application app = Application.getInstance();

// The identifier has to match the application ID deployed to the SUP server
app.setApplicationIdentifier("SUP101");


// ConnectionProperties has the infomation needed to register
// and connect to SUP server
ConnectionProperties connProps = app.getConnectionProperties();
connProps.setServerName("supserver.mycompany.com");
connProps.setPortNumber(5001);
// Other connection properties need to be set when connecting through relay server

// provide user credentials
LoginCredentials loginCred = new LoginCredentials("supAdmin", "supPwd");
connProps.setLoginCredentials(loginCred);

// Initialize generated package database class with this Application instance
SUP101DB.setApplication(app);
Related reference
Application APIs