Consultor Eletrônico



Kbase P104494: How to share a connection pool between multiple .NET/Java proxies from a .NET/Java Open Client
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/2006
Status: Unverified

GOAL:

How to share a connection pool between multiple .NET/Java proxies from a .NET/Java Open Client

GOAL:

Is it possible to share the connection pool without using the Connection object

GOAL:

Using session free connection

FACT(s) (Environment):

OpenEdge 10.0x

FIX:

The connection pooling can only be shared between multiple proxies by the Connection object.

Hereafter is the scenario explaining how it works:

- When a session-free AppObject is instantiated, a pool of connections to the application service is established.
A session-free AppObject is instantiated using an explicitly provided Connection object. The Connection object instance establishes a reference to the AppObject's connection pool.

- If the same Connection object instance is then used to instantiate other session-free AppObject instances, the subsequent AppObject instances will share the connection pool referenced by the Connection object.
SupAppObjects and ProcObjects always share the connection pool of their associated AppObject.


The C# code shows how to use the same Connection for multiple .NET proxies.
// Create a Connection Object
Connection cnn = new Connection("AppServer://hostname:5162/asbroker1","","");
cnn.SessionModel= 1; // Session Free

// Instantiate the first AppObject using the Connection object
proxy1 ao1 = new ao1(cnn);

// Instantiate the second AppObject using the Connection object
proxy2 ao2 = new ao2(cnn);
String sOut = null;

// Call a Progress procedure 'test1' from proxy1
ao1.test1(out sOut);

// Call a Progress procedure 'test2' from proxy2
ao2.test2(out sOut);