cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between JCO.createClient and JCO.addClientPool??????

Former Member
0 Kudos

Hi SDN,

The difference between the two is that JCO.createClient creates a direct connection where as JCO.addClientPool creates a pool of connections.

Now the problem is.........

<b>

When I write my application using JCO.createClient API, the application gives an exception as <u><i>You are not authorized to login to the target system. </i></u> But when I use the JCO.addClientPool API, the connection is established and the application works properly without any exception.

</b>

<b> What is the concept behind this????? </b>

regards

Brahmachaitanya C. Wajapey

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

And i want to add an notice for that. Wenn you createClient() , you must also use IRepository mRepository=new Repository("Repositoryname", "Clientname");.

But wenn you addClientPool();, you must use

IRepository mRepository=new Repository("Repositoryname", "Poolname");.

tiny trick, but i spent a lot of time to find it.

Former Member
0 Kudos

Hi Brahmachaitanya,

<b>Your Qns: What is the concept behind this?????</b>

JCO supports two RFC access possibilities -> direct connections and connection pools.

JCO supports two RFC access possibilities -> direct connections and connection pools. Both can be explained by the following example: A company offers company cars for every employee. Hence every employee will have his own car provided by the company -> direct connection. If the number of employees will get too large the company might have budget problems. Another company has a car pool where employees are allowed to take a car whenever there's one available -> Connection pool. The employess just take a car whenever they need it and whenever there's one available. The car pool does not waste as many ressources like when each employee has its own car. But if there are too few cars available there might be a bottleneck. Hence regarding to ressources a connection pool is more efficient than direct connections but it also enlarges the risk of a bottleneck.

a) direct connections

If you use direct connections there will always be a connection for each user inside your application. For each connection there will also always be a session on the R/3 application servers(s). The connection (and session) will be held as long as it will be use. Hence you will have to manage the connection(s). Direct connections influence an R/3 systems's performance if too many connections are used. That's why I would recommend to use this type of connection only in small applications or in applications where there is only sporadic communication between Java and R/3.

b) connection pools

Connection pools establish and manage connections that are potentially used by various users. It can be compared with a company's car pool. That's why there won't be a connection to the R/3 system for each user. If an application tries to access an R/3 system for a user it will take a connection from the pool and it will pass it back to the pool as soon as the communication between R/3 and Java is finished. The sizing of a connection pool is important since if the size is too small there might be a bottleneck and if the size is too large system ressources might be wasted.

I think its helps you.

Regards

Prakash T

Former Member
0 Kudos
venkatakalyan_karanam
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi Brahma

Check this out for more details

http://help.sap.com/saphelp_nw2004s/helpdata/en/f0/eedf3d0eb8af5ee10000000a114084/frameset.htm

http://help.sap.com/saphelp_nw2004s/helpdata/en/17/d609b48ea5f748b47c0f32be265935/frameset.htm

When you use creatClient API it will create the connection but every connection requires a pool. Thats why when u create a JCO in SLD it will ask for POOL .

Thanx

Pankaj