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 PowerBuilder

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 com.sybase.jaguar.component.

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 Manuals Web site.

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

Property

Description

Where displayed

auto.failover

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)

bind.thread

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 scalability.

Instances (Bind Thread)

code.set

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

interfaces

Identifies the interfaces that the component implements.

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

All Properties

minpool

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.

Resources

maxpool

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.

Resources

name

Specifies the name of the component.

The value must take the form: package/component

General (component part only)

pb.appname

Specifies the name of the PowerBuilder application.

General

pb.class

Specifies the name of the PowerBuilder custom class user object.

General

pb.cookie

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

The path takes this form: Repository\Component\package\component\Ccookie

All Properties

pb.debug

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

All Properties

pb.librarylist

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.

General

pb.live_edit

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

See “Live editing”.

All Properties

pb.trace

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

All Properties

pb.version

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

All Properties

pooling

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 pooling.

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.

Instances

sharing

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 com.EAServer.server.services property.

Instances

state

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.

Persistence

state.gs

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

The default is: getState, setState

Persistence (State Methods)

stateless

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.

Instances

storage

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

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, Table)

thread.safe

Indicates whether multiple invocations can be processed simultaneously.

For more information see “Concurrency property”.

Instances (Concurrency)

timeout

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

Resources (Instance Timeout)

tx_outcome

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

The allowable settings are:

With 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

tx_timeout

Specifies the maximum duration of an EAServer transaction.

EAServer checks for timeouts after each method returns.

Resources (Transaction Timeout)

tx_type

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

Transactions

tx_vote

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)

type

Specifies the type of component.

For PowerBuilder objects, EAServer sets this property to pb.

General