About shared components
How EAServer manages program variable
space
The EAServer architecture
is component-oriented. Each component maintains its own state. When
a single client instantiates several PowerBuilder objects on the
server, EAServer maintains program
variable space for the objects separately. Each PowerBuilder user
object running in EAServer has
its own copy of the global and shared variables. The PowerBuilder
objects share no common state. They can communicate only through
methods, EAServer shared components,
server files, and databases.
To allow clients to share state information, EAServer provides support for shared
components. Shared components allow multiple clients to share the same
component instance.
EAServer Manager and the Management Console
In EAServer 5.x, you use EAServer Manager to manage properties
in EAServer. In EAServer 6.x, you use the EAServer Manager plug-in the Sybase Management
Console.
Marking a component as shared in a PowerBuilder wizard is
equivalent to marking it as shared on the General page of the component’s
properties in the Management Console or the Instances page in EAServer Manager. Only a single
instance of the component can be instantiated in EAServer.
Clients (and other server components) access a shared component
as if it were any other kind of component.
Benefits of using EAServer shared components
Shared components allow you to:
-
Provide convenient access to common data that would otherwise
need to be retrieved separately by each client connection -
Reduce the number of database accesses, allowing
the database server to be available for other processing
EAServer shared components
versus PowerBuilder shared objects
EAServer shared components
offer many of the same benefits as PowerBuilder shared objects.
PowerBuilder components that you deploy to EAServer can
act as clients to EAServer shared
components, as well as to PowerBuilder shared objects. EAServer shared components can also
be accessed by components and clients that are not implemented in
PowerBuilder.
However, EAServer does not
treat PowerBuilder shared objects as if they were EAServer shared components. Therefore,
the functions used to manipulate PowerBuilder shared objects (SharedObjectRegister, SharedObjectGet,
and so forth) do not work with EAServer shared
components. If you try to call one of these functions inside a PowerBuilder
component running in EAServer,
the request will fail.