cancel
Showing results for 
Search instead for 
Did you mean: 

JCo creation

Former Member
0 Kudos

hi,

currently in my webdynpro for java application for each RFC node i am creating different jco connections.

Is this a good method?

please explain me the do's and dont's in creating jco connections

with regards

shanto aloor

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Shanto,

When a client is no longer needed, it should be returned to the pool by calling release on the pool entry. If you want to make sure that this client is no longer used, you should call delete on the pool entry. If neither of these steps are taken, the jcoclient service keeps track of the pool entry. This means that such a pool entry still participates in the connection limit. This can prevent other calls of getJCOClientPoolEntry from obtaining a pool entry when the limit is reached.

Important: Under no circumstances may release be called on a pool entry when the client in question is still being used or referenced. Releasing such a pool entry makes the client available for further use in different threads, resulting in system errors because a client may not be used in different threads at the same time.

Note that calling disconnect or connect on a client has no influence on the number of connections currently counted by the connection limit. The granularity with which a connection is counted is defined by the pool entry. This means that a connection is counted from the time the pool entry was obtained using getJCOClientPoolEntry until this pool entry is released or deleted by the user or by the jcoclient service (in case of HTTP session timeout) or finalized by the Java VM. With regards to the connection limit, what is done with the client between these two times is of no importance.

Special attention must be paid to pool entries that are stored for use in several requests, Proper synchronization must be implemented here to prevent use of a client in different threads, while still keeping parallel execution where possible.

When you obtain a client to work with a JCo repository, its pool entry should not be released while the repository is being accessed.

regards

Sreedhar

Former Member
0 Kudos

hi,

No u dont need to create a Jco for each RFC.

for each back end u need to create a Jco destination

and use the same destination for that particular R/3

u can increase the pool size if u need more connection

but destinationmust be only one for one backend system.

follow this link for more clarity

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3103eb90-0201-0010-71af-be6f4a6f...

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/85a483cb-0d01-0010-2990-c5168f01...

Regards,

Satya.