Accessing component properties – PB Docs 125

Accessing component properties

ContextKeyword service object

You can use the ContextKeyword service object to get a specific
component property value from the component’s .properties file.
To retrieve a property value, you call the GetContextKeywords function
(to enumerate all the properties of an EAServer component,
use the Jaguar::Repository API).

Before you can use the ContextKeyword service object, create
a reference to the object by calling the GetContextService function,
using Keyword as the service name.

EAServer properties for

Table 23-7 lists
component properties that pertain to PowerBuilder custom class user
objects running as EAServer components.
Component properties are prefixed with the string

The values of all component properties are displayed on the
All Properties tab of the Component Properties dialog box in EAServer Manager in EAServer 5.x. Some properties also
map to items on other tabs in this dialog box as shown in Table 23-7.

For descriptions of the properties in EAServer 6.x,
see the CORBA Components Guide on the Sybase
Product Documentation Web site.

Table 23-7: EAServer component
properties for PowerBuilder components in EAServer 5.x



Where displayed


Enables client proxies for the component
to transfer to alternative servers when a server becomes unavailable.

This property cannot be enabled unless you have enabled automatic demarcation/deactivation.

Automatic failover requires that your application use a cluster
of servers, so that redundant servers are available to run the application’s
components. The cluster must include at least one name server and
clients must resolve proxy references using naming services. See “Load
Balancing, Failover, and Component Availability” in the EAServer
System Administration Guide
for more information.

Transactions (Automatic Failover)


Indicates whether the component instance
must always be invoked on the creating thread.

Valid values are TRUE and FALSE.
This property must be set to TRUE for live editing
but should be set to FALSE otherwise to improve

Instances (Bind Thread)


Specifies the name of the coded character
set used by the component.

By default, the component uses the server’s coded
character set (specified on the General tab in the Server Properties
window). For European or Asian languages, you may need to set this
property to a value such as iso_1 or big5.

All Properties


Identifies the interfaces that the component

This is a comma-separated list of IDL interface names, each
of which takes the form: module::interface.

All Properties


When instance pooling is enabled, specifies
the minimum number of instances that can be pooled.

To release idle pooled instances, EAServer has
a garbage collector thread that runs periodically. Each time it
runs, the garbage collector removes one idle instance from the pool,
unless the minimum pool size has been reached. The default is 0.



When instance pooling is enabled, specifies
the maximum number of instances that can be pooled.

If the maximum pool size is reached, EAServer destroys
excess instances after deactivation. The default is 0, which means
no maximum pool size is in effect.



Specifies the name of the component.

The value must take the form: package/component

General (component part only)


Specifies the name of the PowerBuilder



Specifies the name of the PowerBuilder
custom class user object.



Provides a number used to construct the
path for the library list.

The path takes this form: RepositoryComponentpackagecomponentCcookie

All Properties


Indicates whether you can debug the component
in the PowerBuilder debugger.

All Properties


Specifies the PowerBuilder library list.

When a library name has a prepended dollar sign ($), EAServer assumes that its location
is relative to the EAServer Repository
directory. When a library name does not have a prepended dollar
sign, EAServer assumes the name
specifies an absolute path.



Specifies whether you can build the project
from the User Object painter instead of the Project painter.

See “Live editing”.

All Properties


Specifies trace options for logging activity
against the component (currently disabled).

All Properties


Specifies the version of PowerBuilder
in which the component was built.

All Properties


Indicates whether the component is pooled.

When the pooling property is set to TRUE,
the component is always pooled and the CanBePooled event is never
triggered. When the pooling property is set to FALSE,
the CanBePooled event is triggered, allowing selective refusal of

If the tx_vote property is set to FALSE,
the component is pooled after each method; otherwise, it is pooled
at the end of the transaction.



Indicates whether this is a shared component.

When the sharing property is set to TRUE,
all clients share a single component instance. Pooling options do
not apply to shared components.

To make a shared component a service, add it to the list of
services specified for the



When using automatic persistence, specifies
the name of an IDL type.

For PowerBuilder, the named type is a user-defined structure
that must encapsulate all data to be persisted. When you select
Automatic Persistent State, enter the name of the structure in the
State text box on the Persistence tab page, and click OK, default
values are supplied for other properties on the page. Stateful failover
is supported for PowerBuilder components when using automatic persistence.
For more information, see the chapter on managing persistent component
state in the EAServer Programmers Guide.


The names of methods in the state structure
that get and set the state datatype, specified as a 2-item comma-separated

The default is: getState, setState

Persistence (State Methods)


Applies only to EJB session Beans and
non-EJB components that use the control interface CtsComponents::ObjectControl.

Setting this property has the same effect as setting the
tx_vote property to FALSE, but it also
disables the activate and deactivate events. Do not set this
property if you want to specify that a component is stateless. Instead, set
pooling to TRUE and tx_vote to FALSE.



Specifies the name of a component that
reads and writes component state information from a remote database

Required when using automatic persistence, or when using component-managed
persistence with an implementation that delegates to EAServer’s built-in storage
component. The default is: CtsComponents/JdbcStorage

Also specifies the connection cache and table used by the
storage component.

Persistence (Storage Component, Connection Cache,

Indicates whether multiple invocations
can be processed simultaneously.

For more information see “Concurrency property”.

Instances (Concurrency)


Specifies how long an active component
instance can remain idle between method calls before being automatically

Resources (Instance Timeout)


Determines whether a CORBA::TRANSACTION_ROLLEDBACK exception
is thrown to the client when a transaction is rolled back.

The allowable settings are:

  • always

    The default. The server sends the exception to the client
    when a transaction is rolled back.

  • failed

    EAServer does not send the
    exception to the client when a transaction is rolled back. If you
    use this setting, you can code your components to raise a different
    exception with a descriptive message after calling the RollbackWork
    transaction primitive.

the failed setting in effect, EAServer may
still throw a CORBA system exception if unable to commit a transaction
at your component’s request.You can set this property to
failed if you require that no exceptions be sent to the client for
rolled-back transactions or that an alternative exception be sent.
This setting is useful if you require that the client be able to
retrieve output parameters after a transaction is rolled back: if
an exception is thrown, the output parameters are not available.

All Properties


Specifies the maximum duration of an EAServer transaction.

EAServer checks for timeouts
after each method returns.

Resources (Transaction Timeout)


Indicates whether the component participates
in EAServer transactions and in
what way.

Valid values are:

  • not_supported

  • supports

  • requires

  • requires_new

  • mandatory

  • user-managed

  • never



Indicates whether the component supports
automatic demarcation and deactivation.

When tx_vote is set to TRUE, the
component must control transaction state and component deactivation
by explicitly calling methods of the TransactionServer service object.

When tx_vote is set to FALSE, EAServer automatically deactivates
the component after each method invocation. You do not need to make
explicit calls to SetComplete to cause deactivation
because SetComplete is assumed by default. To
override the default state, you can call SetAbort.

Transactions (when the Automatic Demarcation/
Deactivation check
box is checked, the value of this property is FALSE)


Specifies the type of component.

For PowerBuilder objects, EAServer sets
this property to pb.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x