cancel
Showing results for 
Search instead for 
Did you mean: 

Sharing JCo connections

Former Member
0 Kudos

Based on various SAP documentation, for optimization purpose, it is recommended that Model objects in the same application share the same JCo connection by calling setConnectionProvider() method.

For example, an application may have 4 Model objects (M1, M2, M3 and M4) that will make RFC calls to the same R/3 back-end.

My understanding is that only one JCo destination (ie 1 JCo pool) should be used; also, in order to use the same JCo connection, setConnectionProvider() method should be called.

Here are my questions:

1) Is there some more complete codes snippets that implement that concept ".

Instantiation of M1?

Instantiation of M2?

Instantiation of M3?

Calling setConnectionProvider() by M2 or M3?

Releasing the connection to the pool? (also, is this needed)?

2) what can be the drawback(s) of the connection sharing strategy if the application has several model objects (example 10 model objects)?

Regards,

Hortense Andrian

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos
former_member187439
Active Participant
0 Kudos

I'm not sure about the setConnectionProvider() method and sharing of JCO. But for your information -- Did you refer a "WebDynpro" application as "Application with 10 model objects" in your message? I have more than one DC (Development Components). I maintain all the models in one DC and maintain that DC as models DC. In my remaining DC's, i use one or more models from this models DC as per my requirements. This shows better performance.