cancel
Showing results for 
Search instead for 
Did you mean: 

Too many connections to call SAP functions

Former Member
0 Kudos

Hello everyone,

I'm having a random problem while accessing SAP functions on my applications.

Sometimes i get this message:

Could not create JCOClientConnection for logical Systems: WD_MODELDATA_DEST - Model: class com.xxx.sap.NameController.
Please assure that you have configured the RFC connections and/or logical system name properly for this model.

A friend tells me that this has to do with the fact that i use one model per SAP function ,

and a custom controller for each unique model.

This creates too many connections and launches the error.

Can anyone tell me how to solve this problem without

having to reimport all my functions into one single model and one single custom controller ??

My biggest problem is that doing that would increase the time spent on project development dramatically.

Thank you everyone,

Nuno Santos

Accepted Solutions (0)

Answers (2)

Answers (2)

guillaume-hrc
Active Contributor
0 Kudos

Hi,

<b>Questions</b>

1. Are all connections closed (timeout, explicit logout link ?)

2. Is the number of connections kept to a reasoable level ?

If the answer is yes to both, is <b>raising the possible number of simultaneous connections acceptable in the JCo configuration</b> ?

Best regards,

Guillaume

Former Member
0 Kudos

Hi Guillaume,

My answers:

1. All connections are closed by time-out, but i would really apreciate if someone could explain how to explicitly close them after calling them.

2. No. That is the big problem. This was my first project, and in a very simplistic (and stupid) way i created a webdynpro model for each SAP function that i call. This means that an application may call 5 or 6 functions during it's runtime, meaning 5 or 6 connections. Multiply this by a few hundred users...

What are my choices here?

Help will be really apreciated.

Thanks to everyone,

Nuno Santos

Former Member
0 Kudos

Nuno,

The code that i gave absolutely works with NW04. I am using it currently. Just make it sure that you are calling the model instance properly.

Regards,

Anand

Former Member
0 Kudos

Solved it on my own with lots of work ! I really created a unique model and added there all the dozens of sap functions that i needed in my applications. Now i'm using only one model, and the number of connections diminished dramatically . Still, if there are users enough using the portal at the same time to launch the error again, i'll close the connections lika Anand said. Thank you all.

Former Member
0 Kudos

Nuno,

Write these lines of code after executing the RFC.

<Model Name> anyName =

(<Model Name>)WDModelFactory.getModelInstance(<Model

Name>.class);

anyName.disconnectIfAlive();

Hope this would solve your problem.

Regards,

Anand

Former Member
0 Kudos

Hello Anand,

My Netweaver doesn't recognize the method disconnectIfAlive(). Am i missing something (the portal is version 2004, not 2004s)? Or is there other way of disconnecting a model ?