# .net wrapper and object pooling

**URL:** <https://techcommunity.softwareag.com/t/net-wrapper-and-object-pooling/58965>\
**Category:** Forum\
**Tags:** Mainframe-Integration, EntireX\
**Created:** [March 10, 2004, 4:01pm UTC](https://techcommunity.softwareag.com/t/net-wrapper-and-object-pooling/58965 "2004-03-10T16:01:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jose](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@Jose](https://techcommunity.softwareag.com/u/Jose)\
**Post date:** [March 10, 2004, 4:01pm UTC](https://techcommunity.softwareag.com/t/net-wrapper-and-object-pooling/58965/1 "2004-03-10T16:01:52Z")

</div>

We are making a multi-tier .net architecture with .net exx wrappers to go to a OS/390 mainframe protected via RACF and EXX security.  
The architecture starts with a .NET gui (we want to prompt for userid and password (RACF)).  
the middle tier is a win2K server where the .net wrapped objects are re-used to go to the mainframe. Her we would like to implement .net object pooling. However when we make an instantiation of a .net wrapped object, properties like userid and password become get-only properties. So, ther is no way of doing pooling for multi-users. The only pooling is to keep objects for each individual user. We will end up with 200 users.   
Is this the way to go or did is miss something in the architeture ?

---

<div class="post-metadata">

**Author:** ![Dietmar\_Gartner](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/dietmar_gartner/32/127_2.png) [@Dietmar\_Gartner](https://techcommunity.softwareag.com/u/Dietmar_Gartner)\
**Post date:** [March 10, 2004, 9:00pm UTC](https://techcommunity.softwareag.com/t/net-wrapper-and-object-pooling/58965/2 "2004-03-10T21:00:46Z")

</div>

Hi Jose,  
  
the Broker class of the current .NET Wrapper runtime requires the user ID at construcution time and does not allow to overwrite it later (the user ID is then _get-obly_ and the password is _set-only_ - via the Logon()method). So, for each user that logs on to the EntireX Broker, you need a Broker object constructed with the user ID and perform the Logon() method.  
However, you can still pool your wrapped objects. You just need to instantiate different Service and Broker objects for each different user on demand.  
  
Example:  
- there already is a pool of wrapper objects for users u\_1 to u\_n  
- another user u\_x comes along  
- if there is a free wrapper object in the pool for this user, re-use it  
- if there is no wrapper object available for this user, either  
 o create a new wrapper object with new  
 Service and Broker class instances for this user, or  
 o re-use a free wrapper object from the pool, but overwrite  
 its Service object with new Service/Broker instances that  
 were created for this user  
  
Does this help?  
  
Regads, Dietmar.

---

<div class="post-metadata">

**Author:** ![Jose](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@Jose](https://techcommunity.softwareag.com/u/Jose)\
**Post date:** [March 12, 2004, 12:08am UTC](https://techcommunity.softwareag.com/t/net-wrapper-and-object-pooling/58965/3 "2004-03-12T00:08:07Z")

</div>

Hello Dietmar  
  
Do I understand it correctly that if the application potentially required 200 distinct users u\_1, u\_2,…,u\_200 at need a pool of 200 object, being at least 1 for each individual user ?   
If so, isn’t that a lot ? What is the impact on server resources ?  
  
Regards  
 Jose

---

<div class="post-metadata">

**Author:** ![Dietmar\_Gartner](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/dietmar_gartner/32/127_2.png) [@Dietmar\_Gartner](https://techcommunity.softwareag.com/u/Dietmar_Gartner)\
**Post date:** [March 12, 2004, 3:16pm UTC](https://techcommunity.softwareag.com/t/net-wrapper-and-object-pooling/58965/4 "2004-03-12T15:16:28Z")

</div>

Hi Jose,  
  
you do not need to permanantly have the 200 (or more) objects in existance at the same time. Just create the Service and Broker objects as they are needed. They are light-weight. However, the connection to the Broker and RPC Server have to be re-established each time a new Service/Broker object pair is created.  
  
Regards, Dietmar.

---

<div class="post-metadata">

**Author:** ![Dietmar\_Gartner](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/dietmar_gartner/32/127_2.png) [@Dietmar\_Gartner](https://techcommunity.softwareag.com/u/Dietmar_Gartner)\
**Post date:** [March 12, 2004, 5:10pm UTC](https://techcommunity.softwareag.com/t/net-wrapper-and-object-pooling/58965/5 "2004-03-12T17:10:30Z")

</div>

Hi Jose,  
  
one addition: I agree, there should be a method in the Broker class to logon to the Broker with a different userID ans password.  
  
Regards, Dietmar.

---

<div class="post-metadata">

**Author:** ![Jose](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@Jose](https://techcommunity.softwareag.com/u/Jose)\
**Post date:** [March 12, 2004, 11:56pm UTC](https://techcommunity.softwareag.com/t/net-wrapper-and-object-pooling/58965/6 "2004-03-12T23:56:02Z")

</div>

Hello Dietmar  
  
The point is as well that the logon call goes via EntireX to finally do a RACF call. RACF call’s can be consuming. Even if they are cached in memory by the EntireX security server, it is to be considered to save the call. The idea was to just keep the security token alive and when the user comes back in the to continue the security session by passing the kept security token. Can this be done ?  
  
Regards  
  
 Jose

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:39pm UTC](https://techcommunity.softwareag.com/t/net-wrapper-and-object-pooling/58965/7 "2021-04-02T14:39:34Z")

</div>


