Understanding Session Functions and Methods

The session functions and methods connect to a session on an Application server. This connection must be made before you can use the component interface methods.

Component Interface Session Functions

This table describes the component interface session function createSession:

Name Description, Programming Syntax

createSession

(In PeopleCode, &session = %session)

Returns a session object.

  • Java: ISession API.createSession()

  • C++: HPSAPI_SESSION PSApiCreateSession()

Component Interface Session Methods

This table describes the component interface session methods:

Name Description, Programming Syntax

Connect

(not used in PeopleCode)

Connects to the application server.

Use these interfaces to call with other programming languages.

  • Java: boolean connect(long apiVersion, string server, string username, string password, byte[ ] ExternalAuth)

  • C++: Bool session_Connect(HPSAPI hSession, PSI32 ApiVersion, LPTSTR server, LPSTR username, LPTSTR password, PSAPIVAPBLOB ExternalAuth)

getCompIntfc

Returns a reference to a component interface. getCompIntfc also checks to determine whether the given user that is connecting has the appropriate security to access the component interface.

Use these interfaces to call with other programming languages.

  • Java: I<CI_Name> getCompIntfc(string ciName)

  • C++: HPSAPI_<CI_Name> Session_GetCompIntfc(HPSAPI_SESSION hsession, LPTSTR ciName)