cancel
Showing results for 
Search instead for 
Did you mean: 

SAPJCo - Reconnect Support

Former Member
0 Kudos

Hi,

I have a application built with JCo that supports the Idoc Processing by external system.

This makes use of :

DestinationDataProvider and ServerDataProvider by registering them

as

com.sap.conn.jco.ext.Environment.registerDestinationDataProvider

com.sap.conn.jco.ext.Environment.registerServerDataProvider

respectively.

First created a JCoDestination object with DestinationDataProvider as following properties set

and a IDocRepository object created on this destination, but if network is down it give exception (which is obvious),

How we can internally force to try and reconnect (user defined no of attempts / time interval) till the network is available ?

// properties used for DestinationDataProvider

DestinationDataProvider.JCO_ASHOST,"<hostname>"

DestinationDataProvider.JCO_SYSNR,"<Sysno>"

DestinationDataProvider.JCO_CLIENT,"<client>"

DestinationDataProvider.JCO_USER,"<User>"

DestinationDataProvider.JCO_PASSWD,"<pwd>"

DestinationDataProvider.JCO_LANG,"EN"

DestinationDataProvider.JCO_POOL_CAPACITY,"5"

DestinationDataProvider.JCO_PEAK_LIMIT,"10"

DestinationDataProvider.JCO_DEST,"<destname>"

JCoDestination destination = JCoDestinationManager.getDestination(destinationName);

// below line of code give me exception mentioned below:

IDocRepository repository = destination.getRepository();

// ERROR  Thrown is

ERROR: Connect to SAP gateway failed

//connection parameters.....................

LOCATION    CPIC (TCP/IP) on local host with Unicode
ERROR      
partner '<Host Address>' not reached

TIME        Fri Sep 26 12:44:23 2014

RELEASE     720

COMPONENT   NI (network interface)

VERSION     40

RC          -10

MODULE      nixxi.cpp

LINE        3286

DETAIL      NiPConnect2: <Host Address>
SYSTEM CALL connect

ERRNO       10060

ERRNO TEXT  WSAETIMEDOUT: Connection timed out

COUNTER     4

Regards,

Yogi

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member193379
Active Contributor
0 Kudos

HI Yogesh,

Please check your connection string (please do SOP of your connection string).

Thanks,

Hamendra

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Yogesh,

this means that it is not possible to establish connectivity to that host from the host, on which JCo is used.

Best regards,

Markus

vijay_kumar49
Active Contributor
0 Kudos

I think problem in

partner '<Host Address>' not reached

Please check in HostName is pinging or not in your system.

Former Member
0 Kudos

Hi,

this question is not related to the SAP Application Interface Framework. So I will move it Java Development.

Best regards,

Verena