cancel
Showing results for 
Search instead for 
Did you mean: 

Java API CommandException: ProtocolException: Connection Timed Out

Former Member
0 Kudos

Hi,

We have a bizarre problem right now, where intermittently MDM will drop a Java API connection (whether it is the network or not...), which results in the code hanging until it productes the following exception:

com.sap.mdm.commands.CommandException: com.sap.mdm.internal.protocol.manual.ProtocolException: java.net.SocketException: Connection timed out

The Exception occurs on a RetrieveLimitedRecordsCommand, but basically it can happen on any Command call after the connection drops. Once the connection drops, no new Connections/Sessions work until the Application Server (Glassfish) is rebooted.

When a Connection Time out occurs on a Command call like this, is there any way to restore connectivity/functionality using the API?

Also, we are using ConnectionPoolFactory for Connections.

Any help would be GREATLY appreciated.

Thanks.

Accepted Solutions (0)

Answers (3)

Answers (3)

nitin_mahajan2
Contributor
0 Kudos

Well I used to get this issue with earlier patches of 7.1 but it got resolved in some hotfix i dont remember the number.

Which patch you are on for MDM.

Regards,

Nitin

Former Member
0 Kudos

Hi,

Conditions like Unloading of Repository and some as in your case tend to destroy the session and connections.

However using API the connection can be restored.

For this we have to use the Extension Layer classes of API.

When working with extension layer classes the connection is automatically created when we try to create a user session. The password for a establishing particular user session can be supplied to createSession method of SessionManager class. You need to write a class (with getter and setter method for storing password) and pass this object to SessionManager class. The password supplied to Session Manager class is then stored by SessionManager class in this object.

Whenever the session goes down or connection is not available the API try to create a new session and connection using this stored password.

This is typically used for applications that run in backend and do not involve user interaction.

Regards,

Suresh

Former Member
0 Kudos

Hi Charinde,

I think the main cause for Connecton timeout is the long time taken by the RetrieveLtdRecordsCommand. You can set the (ConnectionPoolFactory.NO_TIMEOUT) value for the timeout so that connection is alive.

Edited by: Arafat Farooqui on May 15, 2009 11:53 AM