Showing results for 
Search instead for 
Did you mean: 

JCO pool

Former Member
0 Kudos

i development a system in my company..and everything work fine...connect to sap without any problem using JCO.Pool

 public IRepository createSapRepository()
  	IRepository repository = null;
  	try {
      // Add a connection pool to the specified system
      //   The pool will be saved in the pool list to be used
      //   from other threads by JCO.getClient(SID).
      //   The pool must be explicitely removed by JCO.removeClientPool(SID)
      JCO.Pool pool = JCO.getClientPoolManager().getPool(POOL_NAME);
	  if (pool == null) 
	  		// SAP Login information is stored in instead of
	  		//   hardcoded in Java Class. Hence, if SAP login infor has to be
	  		//   changed, modify it in file 
			LoginProperties loginProperties = 
			JCO.addClientPool(POOL_NAME, // pool name
			  			 MAX_CONNECTION, // maximum number of connections
						loginProperties); // properties
		catch(Exception e)
      // Create a new repository
      //   The repository caches the function and structure definitions
      //   to be used for all calls to the system SID. The creation of
      //   redundant instances cause performance and memory waste.
      repository = JCO.createRepository("MYRepository", POOL_NAME);
      //System.out.println("SAP repository created successful..");
    catch (JCO.Exception ex) 
      System.out.println("Error Trace in ConnectionUtilities.getSapRepository:n"
      					 + ex.getMessage());
    return repository;

but the thing is..when i wan to test it after work at error..

and i am using Netweaver and i just confuse whether is it the same or not with my company sap system..

me totaly zero knowledge in SAP..

coz from there, the code is interface with the sap by using client,user,password,ashost,sysnr and pool name..

but when came over to netweaver..all change already...i cant even know wat is the client id, sysnr or even pool name..

anyone pls help..i just getting confuse with SAP

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos


Your company SAP is setup is different. Your home SAP system is a prirated one and it will have nothing of security settings and other settings, maybe does not support connection pool concept itself.