on 11-17-2009 6:05 AM
hello every one!
i use the code of below to check the session if have expired:
AuthenticateUserSessionCommand authenticateUserSessionCommand = new AuthenticateUserSessionCommand(rep.connPool);
authenticateUserSessionCommand.setSession(rep.getNewSession());
authenticateUserSessionCommand.setUserName(username);
authenticateUserSessionCommand.setUserPassword(password);
authenticateUserSessionCommand.execute();
but follow that i execute the code :
RetrieveLimitedRecordsCommand rlrCmd = new RetrieveLimitedRecordsCommand(RepositoryManager.getTheRep(0).connPool);
rlrCmd.setSearch(search);
rlrCmd.setSession(RepositoryManager.getTheRep(0).getNewSession());
rlrCmd.setResultDefinition(rd);
rlrCmd.execute();
and the exception out:
aused by: com.sap.mdm.internal.protocol.manual.ServerException: 不支持指定会话的当前协议操作;
aused by: com.sap.mdm.internal.protocol.manual.ServerException:The specified session does not support the operation of the current protocol
who can help me ,thank you!
Hi buddy,
it's so glad that seeing someone from my country here.
Your problem seems to be the 2 commands use different sessions. Try to set a same session into them.
Sean
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Xuhuanjun,
Check whether in both scenarios you are using same instance of Session or not.
authenticateUserSessionCommand.setSession(rep.getNewSession());
RetrieveLimitedRecordsCommand(RepositoryManager.getTheRep(0).connPool);
rlrCmd.setSession(RepositoryManager.getTheRep(0).getNewSession());
Please post the complete code and explan what you are trying to do if you are not able to find out the problem.
Thanks & Regards,
Veera.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for your attention!
I connect a repository by connection pool ,the connection instance holded in memory!
when i do nothing to the repository for a moment,then i use the connection pool instance to connect the repository usually throw a 'session expired exception',so i want to do a check before i use the connection pool instance ,check the session if has expired,if that ,i will reinitialize the connection pool!
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
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.