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.getClientPoolManager().setConnectionTimeout(30000); //JCO.getClientPoolManager().setMaxWaitTime(60000); JCO.Pool pool = JCO.getClientPoolManager().getPool(POOL_NAME); if (pool == null) { try { // SAP Login information is stored in logon.properties instead of // hardcoded in Java Class. Hence, if SAP login infor has to be // changed, modify it in logon.properties file LoginProperties loginProperties = LoginProperties.load("logon.properties"); JCO.addClientPool(POOL_NAME, // pool name MAX_CONNECTION, // maximum number of connections loginProperties); // properties } catch(Exception e) { e.printStackTrace(); } } // 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()); ex.printStackTrace(); } return repository; }
but the thing is..when i wan to test it after work at home..it 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