cancel
Showing results for 
Search instead for 
Did you mean: 

how to cofirm a connect session to mdm is usable???

Former Member
0 Kudos

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!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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!