Quantcast
Channel: SCN: Message List - PowerBuilder Developer Center
Viewing all articles
Browse latest Browse all 7329

WCF Proxy ended in a multithread call to another webservice

$
0
0

Hi!

 

I'm trying to improve the performance of a massive e-signature process using multithreading.  This e-signature is made by the app on behalf of the person, 'cause we're taking about 120,000 documents.

 

This functionality was implemented in a wcf webservice made with PB.Net 12.5.2

 

For this purpose I needed to split my script as follow:

 

 

1) a NVO (that I'm going to call nvoFunctional ) that has 3 methods (has more but for this example):

  • validateMassiveSignature: that handles everything about the type of document to be signed, signer, authentication, records starting hour, validates a e-signed request (calling a third-party webservice), etc.
  • signDocument(docID): that signs the document (calling a third-party webservice), uploads the original signed document to a content manager server (using another webservice (homemade)), record log (on DB), record results on file for another app to process them.
  • recordEndedMassiveSignature: calculates how many e-signatures where done successfully, records finishing hour and the status of the whole process.

2) a global external function f_massiveSignature that: instanciates nvoFunctional and calls signDocument(docID) on every thread and every document to be signed.

3) a NVO that controls the process:

  • instanciates nvoFunctional and calls validateMassiveSignature
  • if everything is OK, if creates 3 (variable) threads for f_massiveSignature
  • for the 'n' (in this case 3) threads calls Thread.join()
  • using the same instance of nvoFunctional calls recordEndedMassiveSignature

 

 

First part (nvoFunctional.validateMassiveSignature()) works fine, but when I reach the first nvoFunctional.signDocument(docID) I get a "underlying connection was closed unexpected error on receive" just on the m_service.Invoke() sentence of the third-party webservice.

 

The only clue that I have by now is that the connection to the 3rd-party webservice is already open, 'cause I used that webservice on nvoFunctional.validateMassiveSignature(), but I tried destroying nvoFunctional before calling the thread and isn't working either, and there is no .close(), terminate() or similar for proxies.

 

Has anyone have a clue?  I'm new on multithreading so maybe I'm asking something stupid, but is more stupid not to ask


Viewing all articles
Browse latest Browse all 7329

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>