on 04-08-2014 1:43 PM
i am SAP .net connector to use RFC
how do i define the maximum pool size
I have used the following code
SAP.Connector.Destination dest = new SAP.Connector.Destination();
dest.ConnectionString = "ASHOST=xx SYSNR=xx CLIENT=xx USER=xx PASSWD=xx MaxPoolSize=xx";
SAP.Connector.Connection connection = SAP.Connector.SAPConnectionPool.GetConnectionFromPool(dest);
Alternatively i have also tried
SAP.Connector.Destination dest = new SAP.Connector.Destination();
dest.AppServerHost = ConfigurationManager.AppSettings["SAP_SERVER"];
dest.Client = xx;
dest.Password = ConfigurationManager.AppSettings["SAP_PWD"];
dest.SystemNumber = 00;
dest.Username = ConfigurationManager.AppSettings["SAP_UNAME"];
SAP.Connector.Connection connection = SAP.Connector.SAPConnectionPool.GetConnectionFromPool(dest);
and to return the connection
public void RetConnection(SAP.Connector.Connection RetCon)
{
if (RetCon != null)
{
RetCon.PrepareForPooling();
SAP.Connector.SAPConnectionPool.ReturnConnection(RetCon);
RetCon = null;
}
}
pl help me with what i should use to set my connection pool size
Thanks & Regards
Jayapriya
Hello Jayapriya,
You are not referring to NCo 3.0 configuration, hence there is different configuration options,not PeakConnectionsLimit or MAX_POOL_SIZE. Actually, your code looks more or less like NCo 2.x. NCo 2 has MaxCapacity and MaxOpenConnections. Check whether those are helpful for you. Nevertheless, I would recommend to you that you migrate your application to 3.0 - NCo 2.0 has gone out of support over a year ago.
Best regards,
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I used this way (RfcConfigParameters.PeakConnectionsLimit and RfcConfigParameters.PoolSize), where cd is an implementation of IDestinationConfiguration:
RfcConfigParameters cd = new RfcConfigParameters();
if (s.LoadBalancing) {
cd.Add(RfcConfigParameters.MessageServerHost, s.Server);
cd.Add(RfcConfigParameters.MessageServerService, s.MsgSrvPort.ToString());
cd.Add(RfcConfigParameters.LogonGroup, s.LogonGroup);
} else {
cd.Add(RfcConfigParameters.AppServerHost, s.Server);
cd.Add(RfcConfigParameters.SystemNumber, s.SystemNumber);
}
cd.Add(RfcConfigParameters.Client, s.Client);
cd.Add(RfcConfigParameters.SystemID, s.ID);
cd.Add(RfcConfigParameters.User, s.User);
cd.Add(RfcConfigParameters.Password, s.Password);
cd.Add(RfcConfigParameters.Codepage, "1100");
cd.Add(RfcConfigParameters.Language, "E");
cd.Add(RfcConfigParameters.PeakConnectionsLimit, "150");
cd.Add(RfcConfigParameters.PoolSize, "1");
//cd.Add(RfcConfigParameters.UseSAPGui, "2");
dm.AddConnectionDetails(s.ID, cd);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.