killSessions

Description

killSessions kills the specified session(s) in a PowerServer or a PowerServer cluster and rolls back the associated transactions. To kill sessions in a PowerServer cluster, you need to first configure the cluster in AEM. The mobile session IDs listed in AEM are not the real session IDs. You can view source to get the real mobile session IDs.

Syntax for .NET component

proxyobject.of_execinterface ( "killSessions", ref any paralist[] )

Argument

Description

proxyobject

The instance of the proxy object generated for AppeonDotNetComponent.

paralist[]

Arrays of Any type. Specifies the parameter arrays for the component function.

paralist[1] - The ID of sessions which you want to kill. If there are multiple sessions, separate them with semicolons (;).


Return value of of_execinterface

Returns 0 if it succeeds and -1 if it fails.

Return value of killSessions

Boolean.

It returns true if it succeeds and false if it fails. The return value is stored in the ReturnValue property of the proxy object.

Code example

Any la_l[] 
Long lRet 
...
la_l[1] = ls_sessionids

lRet = loadDBList.of_ExecInterface ("killSessions", la_l) //result is returned to loadDBList.ReturnValue

Syntax for EJB component

io_ejb.regstring ( String sessionIDs )

io_ejb.Invokeretbool ( long objid, "killSessions", true, ref boolean retval )

Argument

Description

io_ejb

A reference of Appeon EJBobject.

sessionIDs

The ID of sessions which you want to kill. If there are multiple sessions, separate them with semicolons (;).

objid

The handle to the component method.

retval

The return value of killSessions function: true if it succeeds and false if it fails. This parameter must be declared, but need not to be assigned with values, as it is used to hold the return value.

Return value of Invokeretbool

Returns 0 if it succeeds and -1 if it fails.

Return value of killSessions

Boolean.

It returns true if it succeeds and false if it fails. The return value is stored in the retval property of the Invokeretbool function.

Code example

Note that invokeretbool function is called because the return value is a boolean.

string ls_msg 
boolean retval01 
...
io_ejb.regstring (ls_sessionids)

ls_msg = io_ejb.invokeretbool (il_bean1, "killSessions", true, ref retval01) //result is returned to retval01

Syntax for Web Service

killSessions ( string sessionstring )

Argument

Description

sessionstring

The ID of the session(s) which you want to kill. Multiple session IDs are separated with semicolons (;).


Return value

Returns 1 if it succeeds and -1 if it fails.

Code example

//-- connected with the web service
……
string ls_return,ls_server,ls_app,ls_session
ls_server = sle_1.text
ls_app = sle_2.text
ls_session = sle_3.text 
ls_return = ieon_ws.killsessions(ls_session)
mle_1.text = ls_return