cancel
Showing results for 
Search instead for 
Did you mean: 

JCO Connection using Message Server

Former Member
0 Kudos

Hi,

I am trying to Logon via JCO.Client to a SAP System using an SAP MessageServer.

When I connect using SAP MessageServer, Can I use connection pool ?

I think connection pool make a connection to SAP and reuse connection.

In that Case, SAP Logon Group using MessageServer is working ? (Load Balancing)

If you have any sample code, It'll be great for me.

Regards, Arnold.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello ,

I'm using a connection to a message server using a JCO.Client too and I would like to know if it is normal that when a user is connected via SAP JCo to the message server we can see it in Active Users on the message server and on the selected AS instance until we close the connection.

Thank you,

Arnaud

Former Member
0 Kudos

Yes, you may use JCo connection pooling also when doing logon balancing via the message server.

But of course, an open connection will never switch or move to another SAP application server. So all connections stay connected to the application server to which they were opened. The message server will only be queried when the pool needs to open a new connection. The JCo connection pool will hand out its pooled connections following the LIFO-principle (Last-In - First-Out), thus allowing JCo to close unneeded connections after the specified connection timeout.

Please see this SDN-Wiki for an explanation of the different pooling parameters:

[https://wiki.sdn.sap.com/wiki/display/SI/Java+Connectivity]

Former Member
0 Kudos

You also may need to remember the race condition for the first time the pool is created; if you are using message beans on a J2EE/JEE - or multiple threading of some other kind. (Unless you have some kind of initialisation in your code that will definitely run before any parallel executions.)

If you are running your code on a web server pooling will very noticeably assist with performance.