ISecurityPackageLogonDataEx.ServiceLogon

Fore Syntax

ServiceLogon: Boolean;

Fore.NET Syntax

ServiceLogon: Boolean;

Description

The ServiceLogon property determines whether connection via platform web service is established without creating a repository connection.

Comments

The property is relevant only on working with theDatabaserepository object.

If the property is set to True, connection to DBMS server is established using the platform web service. Only the connection with DB server is created without repository connection. This connection can be used to work with relational objects created in repository and stored on the DB server. Security module parameters to perform connection via web-service are set in the ServiceLogonData property.

By default the ServiceLogon property is set to False, connection to the DBMS server is performed according to settings determined for database in the IDatabase.LogonData property.

Fore Example

Executing the example requires a repository containing database with the MS_DB identifier.

Sub UserProc;
Var
    MB: IMetabase;
    DB: IDatabase;
    LdEx: ISecurityPackageLogonDataEx;
    SvcLd: IPrimaryServiceSPLD;
Begin
    MB := MetabaseClass.Active;
    DB := MB.ItemById("MS_DB").Edit As IDatabase;
    LdEx := DB.LogonData As ISecurityPackageLogonDataEx;
    LdEx.ServiceLogon := True;
    SvcLd := LdEx.ServiceLogonData As IPrimaryServiceSPLD;
    SvcLd.Endpoint := "http://test-srv:9090/axis2/services/PP.SOM.Som";
    (DB As IMetabaseObject).Save;
End Sub UserProc;

On executing the example additional parameters of the specified database will be changed: connection to DBMS server, which settings are determined in database parameters, will be established using the platform web service with the specified address.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Db;
Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    DB: IDatabase;
    LdEx: ISecurityPackageLogonDataEx;
    SvcLd: IPrimaryServiceSPLD;
Begin
    MB := Params.Metabase;
    DB := MB.ItemById["MS_DB"].Edit() As IDatabase;
    LdEx := DB.LogonData As ISecurityPackageLogonDataEx;
    LdEx.ServiceLogon := True;
    SvcLd := LdEx.ServiceLogonData As IPrimaryServiceSPLD;
    SvcLd.Endpoint := "http://test-srv:9090/axis2/services/PP.SOM.Som";
    (DB As IMetabaseObject).Save();
End Sub;

See also:

ISecurityPackageLogonDataEx