Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

JCO Connection to backend

Hi Gurus!

We are trying to connnect from our B2B application to the backend, not using the property files but going through the JCO standard connection.

Although we have implemented the code in our cutsom JAVA class that is handling the connection for the custom code, we are not able to connect to the backend. Here a sample code suggested by SAP that we have followed. Can anybody suggest a way to fix this?

thanks in advance!!

" DestinationService dstService = (DestinationService)

ctx.lookup(DestinationService.JNDI_KEY);

if (dstService == null)

throw new NamingException("Destination Service not available");

RFCDestination dst =

(RFCDestination) dstService.getDestination("RFC", "RFC_NAME");

int maxPoolSize = dst.getMaxPoolSize();

long maxWaitTime = dst.getMaxWaitTime();

Properties jcoProperties = dst.getJCoProperties();

/**

  • Code example for establishing a direct connection */

JCO.Client client = JCO.createClient(jcoProperties);

client.connect();

"

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question