Skip to Content
0
Former Member
Jul 01, 2009 at 07:02 PM

Sharing JCo connections

30 Views

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