Skip to Content
0
Former Member
Jun 24, 2009 at 12:14 PM

JCO.createclient SSO problem

16 Views

Hello,

I want to connect to backend system via SSO in J2EE application, when user process application via click to Send to SAP Button at different time no problem, everything is ok, but when they click to Send to SAP Button in same time we have a problem.A user create SAP document (for example number a1) and B user create SAP document (for example b1). When we show that document in R/3, a1 document created by B user, and b1 document created by A user.

I guess portal or R/3 cannot resolve connection correctly that created by JCO.createclient with "$MYSAPSSO2$" user name. Same time many connection have opened and cannot resolved correctly.

See my code in below;

// firstly i've read cookie lik that;

String ticket ="";

Cookie[] all_Cookies = request.getCookies ();

+ +

for (int i=0; i<all_Cookies.length; i) {

if (all_Cookies<i>.getName().equals("MYSAPSSO2")) {

ticket = all_Cookies<i>.getValue ();

break;

}

}

//and then connect with JCO.createClient:

mConnection = JCO.createClient(

+ "210" // SAP client+

+ "$MYSAPSSO2$"// userid+

+ ticket// password+

+ "EN"// language+

+ "10.21.31.21"// application server host name +

+ "00"// system id +

+ );+

mConnection.connect();

repository = new JCO.Repository(PoolName, mConnection);

How can i solve this problem, any idea will be appreciated.

Regards

Smith