JCO Connection pooling
hi,
<b>How to create connection pooling in WAS for SAP R/3 System.</b>
I have written session bean for Creating SalesOrder in SAP Using JCO.
my application will create 100 connection objects if 100 Client Calls for my SessionBean .so that i need to avoid creation of connection objects for <i><b>every time</b></i>.
pls tell me how configure WAS for JCO connection pooling .and How to get those connection objects. and how to use that connction object in my application.
regards
Guru
Hi
See this help
http://help.sap.com/saphelp_nw2004s/helpdata/en/83/85343e8c7f6329e10000000a114084/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/6a/82343ecc7f892ee10000000a114084/frameset.htm
Kind Regards
Mukesh
Similar Messages
-
How to use a JCO connection pool in an EJB?
Hi *,
I want to build a WebService using SAP Web AS (J2EE Engine) that connects to a R/3 ERP (release 4.7).
I thought of building a stateless session bean that will be deployed as webservice. The session bean shall connect to the R/3 in order to call some BAPIs. I'd like to use a JCO connection pool. But I'm not sure, where I should create and destroy the connection pool. Are the EJB methods ejbCreate() and ejbRemove() the right ones? If so, my businness methods would just have to get a connection from the pool and call the BAPIs, right? If not, what do you suggest?
Another question: I already deployed a bean as webservice. Since not really knowing how to use the connection pool, I created a bean with one business method that creates a connection pool whenever it gets called. But if I have to change something in the bean so that I have to redeploy the bean I can't call my business method anymore, because JCO cannot load a native library once again, as it is already loaded, This leads to an exception. So I have to restart the complete engine everytime I redeploy my bean. Are there any workarounds for this problem? I'm not sure whether this is connected to the wrong use of the JCO connection pool.
Kind regards,
LarsHi *,
I want to build a WebService using SAP Web AS (J2EE Engine) that connects to a R/3 ERP (release 4.7).
I thought of building a stateless session bean that will be deployed as webservice. The session bean shall connect to the R/3 in order to call some BAPIs. I'd like to use a JCO connection pool. But I'm not sure, where I should create and destroy the connection pool. Are the EJB methods ejbCreate() and ejbRemove() the right ones? If so, my businness methods would just have to get a connection from the pool and call the BAPIs, right? If not, what do you suggest?
Another question: I already deployed a bean as webservice. Since not really knowing how to use the connection pool, I created a bean with one business method that creates a connection pool whenever it gets called. But if I have to change something in the bean so that I have to redeploy the bean I can't call my business method anymore, because JCO cannot load a native library once again, as it is already loaded, This leads to an exception. So I have to restart the complete engine everytime I redeploy my bean. Are there any workarounds for this problem? I'm not sure whether this is connected to the wrong use of the JCO connection pool.
Kind regards,
Lars -
Web dynpro console - monitor - JCO Connection pools
If you go to the web dynpro console -> monitor -> JCO connection pools you see a table with information.
JCo Clients MonitorJCO Pools - 12:31:02.992
Name Size Currently used Maximum used Max.connections Max.pool size
Can somebody explain what for example the "Size" and "Maximum used" mean in this table?
And if you have set max.pool size to 20, what things can override this setting in the SAP system?Hi,
You can follow this link for information on JCO in Web Dynpro Java:
[http://help.sap.com/SAPHELP_NW04S/helpdata/EN/3a/3b1b40fcdd8f5ce10000000a155106/frameset.htm|http://help.sap.com/SAPHELP_NW04S/helpdata/EN/3a/3b1b40fcdd8f5ce10000000a155106/frameset.htm]
-Kunal Kotak -
Problem with JCo Connection Pool
Hi,
I have a problem with using an RFC Model in my WebApplication. So sometimes the access to the function block works, and sometimes it doesn't work. Now I know, that there is a problem with the connection pool. Look at this message:
com.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: Connection pool WD_X24_MODELDATA_DEST_CPIC_REKTO_DE_useDefinedUser is exhausted. The current pool size limit (max connections) is 10 connections.
So it looks like a problem with closing the JCo Connections after using. Do know where the problem is? Because I'm using many other function blocks with no problems.Hello,
You need to increase the pool size via Visual Administrator.
Server 0 -> Services -> JCO RFC Connections.
Change the pool size from there. I believe a restart is in order.
Regards,
Jan -
JCO connection pool is exhausted
hi
I am using RFC module in my web dynpro application. When the application is used for sometime, the JCO connection will get exhusted. The JCO connection will not release itself. I can't find any method in web dynpro to release the connection manually. How can I solve this problem?Hi,
What is scope of the connection. View properties of MODELDATA and METADATA destinations.
You can change the scope of the connection..
or
wdContext.current<BAPI INPUT>Element().modelObject().modelInstance().disconnectIfAlive();
For more ways , give a forum search.. There are a lot of close forum posts.. Gud luc..
Regards
Bharathwaj -
Configuring JCo3 Connection Pool with single sign on on non SAP Java server
Hi Everyone,
i have configured a connection pool on JBoss as per JCo3 Documentation and is working great.
Now I need help to configure this connection pool with single sign on so that RFc on SAP ECC systems are executed using end users credential rather than using single user name password used to configure JCo connection pool.
On SAP Java stack I am sure its possible within Java WebDynpro and i assume using JCA resource adapter. But what if we don't want to use SAP Java App server.
Any help will be appreciated.
Thanks,
Divyakumar JainEason, 你好!
I have exactly the same problem. Did you find a solution to this problem? If so, please let me know! -
Unable to close metadata jco connection
Hi Experts,
when checking the JCo Connection Pools in Web Dynpro Console, I found that all MetaData JCo are in use and unable to disconnect automatically.
the following is metadata jco destination setting
Maximal Pool Size 1
Maximum Connections 5
Connection Timeout 60
Maximum Wait Time 10
how can i do to close these jco connection?Hi Sidney,
I dont really understand why you want to remove the Jco connections. If you click on the "Remove" button as posted earlier by someone, it will completely remove your Jco configurations and you have to create them again on your own. SO, dont do that.
If you want to disconnect the Jco connection in webdynpro java, we can do that by using the following piece of code at the end of the connection process.
As far as I know, by default the Jco connections gets disconnected after certain time limit. Because, I never had to disconnect the Jco whenever I used one.
wdContext.currentModelElement().modelObject().modelInstance().disconnectIfAlive()
Regards,
Gopal. -
Finding component that does not close JCO connections
Hi,
I'm working on a big project with many webdynpro components. My problem is that I seem to be loosing JCO connections. After a while I get JCO connection errors. I just can't find which component is causing this. I checked over and over again.
Is there a way to check how many JCO connections an application/component has or at least how many open connections a model has?
I really need to know which component is causing my loss of JCO connections.
Thanks all!
JeschaelHi Jeschael,
Go to System Administration -> System Configuration -> Select Web Dynpro Console -> (Model & backend- You can check JCo performance by component) or ( JCo Connection Pools you can check max. calls and active connections for JCos)
Regards,
Siva -
Hi,
In WebdynPro Application without using Adaptive RFC, we are able to disconnect a connection after few seconds as we using disconnect() method for that.
But for a WebdynPro Application using Adaptive RFC, we are not able to disconnect a connection as fast as we were able to do in first case.
We are using following to disconnect:
wdContext.currentInputElement().modelObject().modelInstance().disconnectIfAlive();
In SM04 transaction, we observed that the connection(Adaptive RFC) is taking more time to close than it is taking for without Adaptive RFC WD application. The connection still exists even the memory utilized becomes 0 MB.
Also, when we are not disconnecting in Adaptive RFC WD application, then memory is utilized as long as connection exists. But, when we are disconnecting the connection, the memory utilized is 0 MB though the connection still exists.
While creating the JCo connection for metadata and modeldata we gave:
Max pool size : 5
Max connection: 1000
Connection Timout (msec.) : 1000
Maximum Waiting Time (msec.): 5000
Can anybody suggest how to disconnect the connection to overcome above problem?
Thanks and Regards,
VaibhavHi
Check this URL
Actually The Connection will be Terminated when it is inactive for particular time
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/85a483cb-0d01-0010-2990-c5168f01ce8a">Jco Connection Pools</a>
Regards
Chandran S -
Hi Everyone
My Connection Pool parameters JCO api.
client=300
user=SISGERAL_RFC
passwd=******
ashost=14.29.3.120
sysnr=00
size=10
I have these parameters on my Connection Pool and sometimes appear these wrongs in my application:
1.
2006-01-07 13:20:37,414 ERROR com.tel.webapp.framework.SAPDataSource - ##### Time limit exceeded. LOCALIZED MESSAGE = Time limit exceeded. KEY = RFC_ERROR_SYSTEM_FAILURE GROUP = 104 TOSTRING = com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Time limit exceeded.
2.
2006-01-07 14:01:31,007 ERROR com.tel.webapp.framework.SapPoolConnectionManager - Timeout
Id like to know if is happening.
Are there something wrong with my connection pool?
What can be happening?
ThanksRaghu,
Thanks for your response.
Yes, the pool connections are in place according to the sAP note mentioned above.
Regards,
Faisal -
JCO Connection constructor: Pool already initialized
Hi Folks,
while i'm configuring a JCO connection to R/3, i got a little problem:
In my class constructor i initialize a client pool.
JCO.addClientPool(sapSID, sapMaxConnections, sapMandant, sapUser, sapPasswort, sapLanguage, sapSystem, sapSystemNumber);
JCO.getClientPoolManager().getPool(sapSID).setMaxWaitTime(maxWaitTime);
problem:
when there is already a client pool, the application crashes
solution:
check if there is already a connection-pool with this name
i tried the following:
1) Check if there's a pool with the name
if (JCO.getClientPoolManager().getPool(sapSID).getName()==sapSID) {
==> which leads to a null pointer exception because logically there is no pool and as the doc says "if there's no pool, .getPool(String) will return null, which leads to:
2) Check if null
if (JCO.getClientPoolManager().getPool(sapSID)==null) {
but unfortunately. this won't work either.. null point exception again.
anyone got a hint?
thx in advance,
lars
Message was edited by:
Lars Paetzoldi remove the waittime part now, but it won't work anyway:
java.lang.NullPointerException
if (JCO.getClientPoolManager().getPool(sapSID)==null) {
if (JCO.getClientPoolManager().getPool(sapSID).getName().toString()==sapSID.toString()) {
} else {
JCO.addClientPool(sapSID, sapMaxConnections, sapMandant, sapUser,
sapPasswort, sapLanguage, sapSystem, sapSystemNumber);
if i'm not checking if there is any kind of pool, everything works fine until i call the application a second time and the pool is already initialized -
Connection Pool establishment problem
Hi Experts,
we have one application with JCo mechanism. For this application,
we are using one properties file, which holds ABAP connection information. From this connection information(sapconn.props), we created connection pool and fetching data from the back end. Now my requirement is, instead of this properties file, we want to use one SLD, from this i would like to fetch connection information and establish a connection pool. How can we implement this one...?
Is there any API to read the ABAP connection informaation from visual admin (JCo RFC provider) ?
Thanks
mahaYour question has been answered in this [thread|connection establishment doubt;.
Please read the [rules|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement], in particular - do not cross post.
-- Vladimir -
Connection pool SAPPool is exhausted
hi..
I am getting this following error in my application
om.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: Connection pool SAPPool is exhausted. The current pool size limit (max connections) is 50 connections.
at com.sap.mw.jco.JCO$Pool.getClient(JCO.java:5366)
at com.sap.mw.jco.JCO$PoolManager.getClient(JCO.java:6324)
at com.sap.mw.jco.JCO$PoolManager.getClient(JCO.java:6269)
at com.sap.mw.jco.JCO.getClient(JCO.java:8536)
at com.tcs.interfaces.sapConnectionUtility.JCOClient_Connection.connectToSAP(JCOClient_Connection.java:21)
at com.tcs.interfaces.wifi.outbound.DisablingWifi.disableWifi(DisablingWifi.java:110)
at com.tcs.interfaces.jco.StartJob.run(StartJob.java:68)
at java.lang.Thread.run(Thread.java:636)
The front end PMS (Property Management System) - SAP Customised product is unable to connect with the JCo Middleware server because of the above mentioned error.
The thing is that in java application I have set the maximum pool size (SAPPool) to 50.
Still we are facing this error twice a week.
Is there any kind of setting in SAP server side where JCo RFC connection limits can be set ?
Can any pls help in this regard.After reading the url that you have pointed out: i have a question our from my
curiosity:
is there any overhead that does have if connection pool is very high say 100 and
the required is say like 70.
Thank You very much.
Rob Woollen <[email protected]> wrote:
I usually recommend that for production systems. There's some info here:
http://edocs.bea.com/wls/docs81/perform/WLSTuning.html#1123237
-- Rob
Mike wrote:
Thanks Rob,
is it a good idea to make InitialCapacity equal to the MaxCapacity?
say making InitialCapacity = MaxCapacity = 50
while thread count is also = 50
Rob Woollen <[email protected]> wrote:
Typically thread count = connection pool size is a good starting point.
You might want thread count > connection pool size if you want to
throttle work to the database, or if you have some threads which will
never require a db connection.
You might want connection pool size > thread count if remote clients
are
starting transactions or reserving connections. Another case is if
a
single thread starts multiple transactions.
-- Rob
Mike wrote:
what is the relationship between thread count and connection pool
Eg, if i have a thread count of =50
and connection pool = 36
how does these 2 parameters work together ?
is there any equation between the 2 ?
--Mike -
Dear all,
I am new to j2ee environment.
RFC from PI Java stack to PI ABAP stack failing intermittently. Error message: Error while lookupProblem when calling an adapter by using communication channel CC_RFC_LookUp (Party: , Service: PPICLNT900, Object ID: 2e663396395c3213aaecd4e7746a8ddd) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: resource error: could not get a client from JCO.Pool: com.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: Connection pool RfcClient[CC_RFC_LookUp]2e663396395c3213aaecd4e7746a8ddd is exhausted. The current pool size limit (max connections) is 1 connections.'. Cause Exception: 'error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: resource error: could not get a client from JCO.Pool: com.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: Connection pool RfcClient[CC_RFC_LookUp]2e663396395c3213aaecd4e7746a8ddd is exhausted. The current pool size limit (max connections) is 1 connections.'
When we go to http://hostname:50100/webdynpro/dispatcher/sap.com
we can see RFC CC_RFC_LookUp and MAx connection parameter set to 1.
Rest of RFCs are having maximum connections as 20.
Please let us know what is the procedure to change MAX connection parameter for this
particular RFC CC_RFC_LookUp and which parameter we need to change and where should we find
this parameter?
Regards,
RRThanks Manoj,
I have gone through VA nodes ... could please mention which node i need to make this pareameter changes.
Please note : currently all other JCO pool RFCs are set to Max connections 20 .
But this particular RFC CC_RFC_LookUp under JCO pool tab shows
max connections set to only 1.
Please let me know where in VA i will find this parameter? -
Connection pool size limit error
Hi all,
I am trying to execute a BAPI function from MII, execution fails with the following message;
[ERROR] Unable to make RFC call Exception: [Problem retrieving JCO.Function object: Connection pool <ECC_Server>:800:02:EN:ECCUser is exhausted. The current pool size limit (max connections) is 1 connections.]
[WARN] [SAP_JCo_Function_0] Skipping execution of output links due to action failure.
[ERROR] Uncaught exception from SAP_JCo_Function_0, Problem retrieving JCO.Function object: Connection pool <ECC_Server>:800:02:EN:ECCUser is exhausted. The current pool size limit (max connections) is 1 connections.
Config:
1. In 'SAP MII: Connections' of type JCO and have given pool size to 100.
2. In 'SAP MII: Credential Stores' store is created and same is being used in Start Session.
3. In JCO_Function block, we can search for the Function Module and set it.
MII Version:
14.0.2 Build(82)
Am I missing something?
Has any one seen this? please advise.
Thanks,
Message was edited by: Shridhar NCheck if there is another JCo connection configured with the same IP and User. I have found in the past that even though there are two connections configured because they have the same ip and user they are put into one pool with the lowest max pool of the two connections.
Maybe you are looking for
-
Vendor Payment Advice with Manual Check Creation
Hi Frnds. My Company Code following Non-sequential check lots. and it is not possible for us to use sequential check lot in present business scenario. The requirement is I need to generate the Payment Advice for the payment doucment by assigning the
-
Can't install a game??
Hi, I bought myself an old game from my childhood to play on my Mac as it said it was compatable with PC, and MAC. But trying to install it the message poped up saying. "The Classic Environment is no longer supported" Any ideas guys?? Any advice woul
-
Here's the scoop: I had about 4.5 GB worth of "other" on my phone and couldn't seem to get rid of it/find out what it was. After restoring my phone to factory settings with the backup, it was still there. I decided it had to be in the backup somewher
-
Im trying to sync my iphone 3 to my computer but it keeps saying usb device not recognised
im trying to sync my iphone 3g to my computer but it keeps saying usb device not recognised.
-
DB view - join conditions order
Hi gurus I wonder if, while creating a DB view, the order of join conditions will affect the overall performance. In my case, i need to join COEP, COBK and TKA01. Actually the join conditions are, in this order: COEP MANDT = TKA01 MAN