Previous Page | Next Page

Security Administration (ISecurityAdmin Interface)

EndTransactionContext

Terminates the transaction context for the specified TCTXT handle.

Category: Transaction context methods


Syntax

EndTransactionContext(tCtxt,resource,flags);


Parameters

Parameter Type Direction Description
tCtxt string in Passed handle representing a server-side transaction context.
resource string in Passed resource identifier for the object for which the transaction context is to be terminated, if TCTXT was obtained using a null value.
flags int in
SECAD_COMMIT_TC

Specifies to persist the security changes in the transaction context to the SAS Metadata Server.

SECAD_DISCARD_TC

Specifies to discard the security changes in the transaction context and cancel the security update.


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.

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:


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

Previous Page | Next Page | Top of Page