TransactionServer object

The TransactionServer object provides information about the current transaction context and enables a component running in a transaction server to control the transaction and its own life cycle.

Properties

TransactionServer property

Datatype

Description

ClassDefinition

PowerObject

An object of type PowerObject containing information about the class definition of the object or control


Events

TransactionServer event

Occurs

Constructor

When the object is created

Destructor

When the object is destroyed


Functions

TransactionServer function

Datatype returned

Description

ClassName

String

Returns the name assigned to the object.

CreateInstance

Integer

Creates an instance of a component running on the COM+ server. This function is called from within a component instance running on COM+.

DisableCommit

Integer

Declares that the component's transaction updates are inconsistent and cannot be committed in their present state.

EnableCommit

Integer

Declares that the component's work might be incomplete but its transaction updates are consistent and can be committed.

GetContextService

Integer

Creates a reference to a context-specific instance of the specified service.

GetParent

PowerObject

Returns a reference to the name of the parent object.

ImpersonateClient

Integer

Allows the component to take on the security attributes of the client for the duration of a call.

IsCallerInRole

Integer

Indicates whether an object's direct caller is in a specified role (either individually or as part of a group).

IsImpersonating

Boolean

Queries whether the component is impersonating the client.

IsInTransaction (obsolete)

Boolean

Indicates whether the component is executing in a transaction.

IsSecurityEnabled

Boolean

Indicates whether or not security is enabled for the component

IsTransactionAborted (obsolete)

Boolean

Determines whether the current transaction has already been aborted.

Lookup (obsolete)

Long

Allows a component to create an instance of another component running on the same EAServer host.

Obsolete function

Lookup is an obsolete function, because EAServer is no longer supported since PowerBuilder 2017.

PostEvent

Boolean

Adds an event to the end of the message queue for the object.

RevertToSelf

Integer

If the component is impersonating the client, restores the component's security attributes.

SetAbort

Integer

Declares that the component cannot complete its work for the current transaction and that the transaction should be rolled back. The component instance will be deactivated when the method returns.

SetComplete

Integer

Declares that the transaction in which a component is participating should be committed and the component instance should be deactivated.

TriggerEvent

Integer

Triggers a specific event in the object and executes the script for the event.

TypeOf

Object

Returns the type of the object.

Which

Integer

Returns 0 if the object is not running in a transaction server, 1 if running in EAServer, or 2 if running in Microsoft MTS or IIS4.