Author Topic: CMOD 10.1, ODWEK 9.5 - Error when working with multi threaded mode from java  (Read 1403 times)

balakrishna_m

  • Guest
Request assistance with following error. When i am trying with more than 2 search requests on ODWEK using multi threading, we are getting following error.


Linux-#1 SMP Thu Jul 18 20:25:13 UTC 2019.3.10.0-1062.el7.x86_64-ODWEK_API-9.5.0.0-01/08/2020 09:22:13
19436:140151685613312 01/08/2020 09:22:44:901326 ERROR ars3wapi.C(8566)Java_com_ibm_edms_od_ArsWWWInterface_apiSearchWithCriteria:Current state rtn.RC=9 extId=2086 pMsg=Connection cannot be established for the bellvpc8lpr117
 
19436:140153592727296 01/08/2020 09:22:44:922637 ERROR ars3wapi.C(5598)Java_com_ibm_edms_od_ArsWWWInterface_apiLogon:Current state rtn.RC=9 extId=2086 pMsg=Connection cannot be established for the bellvpc8lpr117 server
19436:140151685613312 01/08/2020 09:22:44:924112 ERROR ars3wapi.C(8576)Java_com_ibm_edms_od_ArsWWWInterface_apiSearchWithCriteria:Current state rtn.RC=9 extId=2151 pMsg=*** LOGIC ERROR: exception from External Server
19436:140151685613312 01/08/2020 09:22:45:436194 ERROR ars3wapi.C(8576)Java_com_ibm_edms_od_ArsWWWInterface_apiSearchWithCriteria:Current state rtn.RC=9 extId=2151 pMsg=*** LOGIC ERROR: exception from External Server
19436:140151685613312 01/08/2020 09:22:45:438610 ERROR ars3wapi.C(8576)Java_com_ibm_edms_od_ArsWWWInterface_apiSearchWithCriteria:Current state rtn.RC=9 extId=2151 pMsg=*** LOGIC ERROR: exception from External Server
19436:140151685613312 01/08/2020 09:22:45:442769 ERROR ars3wapi.C(8576)Java_com_ibm_edms_od_ArsWWWInterface_apiSearchWithCriteria:Current state rtn.RC=9 extId=2151 pMsg=*** LOGIC ERROR: exception from External Server

spond

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
I'm not exactly sure how your application is using the ODWEK Java APIs - and I'm not going to review your code, but I will note the following about applications using ODWEK in a multi-threaded environment.

The ODServer object represents a single connection to an OnDemand server. This object, and all objects created from it (ODFolder, ODHit, etc...) must not be access by multiple threads at the same time. If the application needs to handle large numbers of users, it is recommended to either create a single ODserver object per user or create an ODServer connection pool where these connections can be doled out to a single transaction at a time.

It is the responsibility of the application developer to make sure they are preventing simultaneous access to an ODServer object.

Here is a really good white paper on best practices for developing applications using the ODWEK Java APIs - with sections specifically on threading, synchronization, and connections.
https://www-01.ibm.com/support/docview.wss?uid=tss1wp101203

Here is a link to the ODWEK Java API Redbook – although it is several years old, this requirement still applies and hasn’t changed since the writing of this redbook. - Chapter 6.2.2 discusses ODWEK Java API objects and threads. Chapter 6 covers connection pooling and handling connections. Chapter 6.4 on Thread Safety covers the ODWEK requirement regarding ODServer objects and multiple threads.

http://www.redbooks.ibm.com/abstracts/sg247646.html

I don't know if this is your issue or not but should give you some background into writing ODWEK applications and is a great place to start when trying to suss out issues.