on 03-10-2005 1:25 PM
hi everybody
we have a webdynpro application which runs in a portal .
starting it, a connection to an r/3 backend is opened using a JCO Destination .
after some logins we have the problem , that no additional JCO Connection can be created ==> error :
Could not create JCOClientConnection for logical System: 'WD_MODELDATA_DEST' - Model: 'class com.lgs.hr.gg.searchemployee.model.SearchEmployeeModel'.
calling webdynpr
for me it seems , that the max. number of connections is created . does anybody know , which parameter i have to change to increase this value?
thank you for your help .
hannes toefferl ==> hannes.toefferl@leica-geosystems.com
Hi Bhavik, just wanted to say thanks it looks like it will resolve my problem but i have one final question.
I remember in the past "HTMLB" that it was difficult to find the object that will give me access to the log on ticket. Please if possible could you tell me how i can get the log on ticket .... some code or something or where i can find the webdyn pro API.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, thats looks like it will work fine but there is no mention in the Jco docs about how to open a connection using a SSO tick ie the currently logged on user.
Any suggestions?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhavik, I have question : is it possible to bypass the "adaptive rfc model" and write the jco connection insted directly in the application of a webdynpro. If so do you perhaps know where i can find a doc that out lines how to do this or some sample code.
I ask because i used to wirte jsp's with htmlb tags on portal ep5sp5 and there i had to wirte the jco connection in the code.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Juan,
Yes you can also use JCO manually inside your code. For that you require sapjco.jar at design time and need to provide sharing reference to library, com.sap.mw.jco, deployed on server.
You can download this JAR from service.sap.com site. Find link for Java connectors there. With this Jar you will also get sample codes to call JCO.
If you find answer helpful then please assign award points.
Regards,
Bhavik
Hi Bhavik, thank you for your reply. I will only be able to implement and test Monday.
Will keep you posted.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, i am having the sam problem but i am using the adaptive RFC model and not writing the code in my application.
Here is some of my code :
private String getEmployeeFromUser(IUser user) throws Exception {
String pernr = "No pernr";
try{
IWDMessageManager msgManager = wdThis.wdGetAPI().getComponent().getMessageManager();
HR_GETEMPLOYEEDATA_FROMUSER rfc = new HR_GETEMPLOYEEDATA_FROMUSER();
Hr_Getemployeedata_Fromuser_Input input = new Hr_Getemployeedata_Fromuser_Input();
input.setUsername(user.getUniqueName().toUpperCase());
Hr_Getemployeedata_Fromuser_Output output = rfc.hr_Getemployeedata_Fromuser(input);
Bapiret2 bapiret = output.getReturn();
if (bapiret.getNumber().equals("000") == false) {
errorOut("bapiret.getNumber() : "bapiret.getNumber()" bapiret.getMessage() : "+bapiret.getMessage());
}
pernr = output.getEmployeenumber();
//Disconnect
rfc.disconnectIfAlive();
}catch(Exception ex){
this.errorOut("Could not get employee number for this user! MESSAGE : "+ex.getMessage());
}
return pernr;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
dear jari
many thanks for your tip . can you tell me how i have to create this pool .i can't find the mentioned tutorial.pdf.
could you please send me this documentation or describe how to change/create it .
hannes.toefferl@leica-geosystems.com.
thank you !!
br. hannes toefferl
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Juan,
There is another way also to avoid this situation. After executing your BAPI close the connection to SAP R/3.
Write following code to disconnect with SAP R/3.
wdcontext.current<node>element().modelobject().modelInstance().disconnectIfAlive();
It will close connection with R/3. and this error won't come again.
Regards,
Bhavik
Hi,
have you created Pool with JCO.addClientPool?
Here is example from jco tutorial.pdf:
JCO.addClientPool(
POOL_NAME, // pool name
5, // maximum number of connections
logonProperties); // properties
Remember to release unused clients also:
JCO.releaseClient()
Br. Jari Schwartz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.