Security Administration (ISecurityAdmin Interface) |
Terminates the transaction context for the specified TCTXT handle.
Category: Transaction context methods
Syntax |
EndTransactionContext(tCtxt,resource,flags);
Parameters |
Details |
The EndTransactionContext method terminates the transaction context on the specified resource.
If a valid existing resource was specified when the corresponding BeginTransactionContext() method was called, then RESOURCE should be an empty string.
SECAD_COMMIT_TC and SECAD_DISCARD_TC are symbols representing the valid values for the FLAGS parameter.
Set SECAD_COMMIT_TC to commit changes in the transaction context before terminating the transaction context. The changes in the transaction context are written to the SAS Metadata Server as authorization metadata objects that are associated with the specified resource.
Set SECAD_DISCARD_TC to discard the changes.
The caller must have WriteMetadata permission on the target resource to commit the changes to the SAS Metadata Server.
Exceptions Thrown |
The SAS Open Metadata Interface explicitly returns the following exceptions for the EndTransactionContext method:
SECAD_INVALID_TC_HANDLE
SECAD_INVALID_ACTION
SECAD_NOT_AUTHORIZED
Examples |
The following code fragment shows how the EndTransactionContext method is issued in a Java environment:
public void endTransactionContext (String transCtxt, int options) throws Exception { try { iSecurityAdmin.EndTransactionContext(transCtxt, "", options); } catch (Exception e) { System.out.println("EndTransactionContext: Exceptions"); e.printStackTrace(); throw e; } }
The following example issues an EndTransactionContext method to specify to commit the changes indicated in tCtxt.value:
iSecurityAdmin.EndTransactionContext(tCtxt.value, ISecurityAdmin.SECAD_COMMIT_TC);
Related Methods |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.