rbeckman-nextgen / test-mc3

0 stars 0 forks source link

JAVA using 99% CPU #1321

Closed rbeckman-nextgen closed 4 years ago

rbeckman-nextgen commented 4 years ago

This channel causes JAVA to run at 99% - if I stop it, CPU usage drops to 5%

a554be34-6e8c-4435-a10b-15e515f55958 Lab results Receive results from LabDAQ by polling files on the Lab PC. false 1.8.2.4472 America/Chicago 70 sourceConnector 0 *.txt anonymous 0 anonymous interval DEFAULT_ENCODING file c:/shares/HL7/LabDaq/Mirth 1 1000 1 File Reader 0 1 0 0 date 1 1 HL7V2 HL7V2 false true true false false false true true false false File Reader SOURCE true Original Send to Amelior 0x1C 0x0B 10000 hex 1 65536 0 50800 org.mule.providers.tcp.protocols.TcpProtocol 0x0D DEFAULT_ENCODING 1 10.9.8.29 50 0 LLP Sender sink 0 1 ${message.encodedData} 0x0D 0 New Step JavaScript Script var dbConn = DatabaseConnectionFactory.createDatabaseConnection('net.sourceforge.jtds.jdbc.Driver','jdbc:jtds:sqlserver://clsdb01a:4246/Radorders;instance=sql01','Mirth','HL7inter*'); // var PId = msg['PID']['PID.2']['PID.2.1'].toString(); var SeqNum = msg['OBR']['OBR.2']['OBR.2.1'].toString(); var Mnemonic = msg['OBR']['OBR.4']['OBR.4.1'].toString(); SeqNum = SeqNum.substring(SeqNum.length-1); if (SeqNum == "") { SeqNum = "1" ;} // var selectit = "SELECT OrderId FROM laborders Where PID = " + PId + " AND Mnemonic = " + Mnemonic +" AND SeqNum = " +SeqNum; // //whereclause += PId; //whereclause += " AND Mnemonic = "; //whereclause += msg['OBR']['OBR.4']['OBR.4.1'].toString(); // whereclause += " AND Resulted IS NULL"; //whereclause += " AND SeqNum = "; //whereclause += SeqNum; // // //var selectit = "SELECT OrderId FROM laborders"; //selectit += whereclause; // selectit = "Select OrderId From laborders Where VisitId = 19445 AND Mnemonic = 2060 AND SeqNum = 1"; var result = dbConn.executeCachedQuery(selectit); // // if (result.next()) { msg['ORC']['ORC.2']['ORC.2.1'] = result.getString("OrderId"); msg['ORC']['ORC.3']['ORC.3.1'] = result.getString("OrderId"); msg['OBR']['OBR.2']['OBR.2.1'] = result.getString("OrderId"); msg['OBR']['OBR.3']['OBR.3.1'] = result.getString("OrderId"); } else { // just let the labdaq accession number be used... msg['ORC']['ORC.2']['ORC.2.1'] = msg['OBR']['OBR.4']['OBR.4.1'].toString()+SeqNum; msg['ORC']['ORC.3']['ORC.3.1'] = msg['OBR']['OBR.4']['OBR.4.1'].toString()+SeqNum; msg['OBR']['OBR.2']['OBR.2.1'] = msg['OBR']['OBR.4']['OBR.4.1'].toString()+SeqNum; msg['OBR']['OBR.3']['OBR.3.1'] = msg['OBR']['OBR.4']['OBR.4.1'].toString()+SeqNum; } // // if it is a final result, mark the test as resulted, so that a second series can be run if (msg['OBX']['OBX.11']['OBX.11.1'].toString() == "F") { // var SetResulted = "UPDATE laborders SET Resulted=1"; // SetResulted += whereclause; var SetResulted = "UPDATE laborders SET Resulted=1 Where PID = " + PId + " AND Mnemonic = " + Mnemonic +" AND SeqNum = "+SeqNum; var result2 = dbConn.executeUpdate(SetResulted); } dbConn.close(); // HL7V2 HL7V2 false true true false false false true true false false LLP Sender DESTINATION true started true true false false -1 false false // Modify the message variable below to pre process data return message; // This script executes once after a message has been processed return; // This script executes once when the mule engine is started // You only have access to the globalMap here to persist data return; // This script executes once when the mule engine is stopped // You only have access to the globalMap here to persist data return; Imported Issue. Original Details: Jira Issue Key: MIRTH-1342 Reporter: monty_queener Created: 2010-02-18T13:01:04.000-0800
rbeckman-nextgen commented 4 years ago

Sorry to note.. The JAVAScript is in my transformer, the useScript property in the other issue did not seem to apply.

Monty

Imported Comment. Original Details: Author: monty_queener Created: 2010-02-18T13:11:41.000-0800

rbeckman-nextgen commented 4 years ago

How big are the files you are reading? Are messages being processed successfully through this channel? Are there any errors, heap space, or out of memory issues? There isn't currently enough information to reproduce this issue.

Imported Comment. Original Details: Author: jacobb Created: 2010-03-15T10:36:50.000-0700