Hi Guys,
I am using Mirth3.0. I am having a requirement to check the database lock before performing any operations on the database through mirth. This can only be achieved by the system command. How I can get the system command results in mirth. As of now, I have tried the following:
var proc=java.lang.Runtime.getRuntime().exec("ls"); //say ls is command to know the database lock status
logger.debug(proc);
var stdin = proc.getInputStream();
logger.debug(stdin);
var isr = new InputStreamReader(stdin);
logger.debug(isr);
var br = new BufferedReader(isr);
var temp=br.readLine();
logger.debug(temp);
From all of the loggers above I am getting the object values like for example:
java.lang.UNIXProcess@3fd49dca
java.lang.UNIXProcess$ProcessPipeInputStream@1c1b4 5b4
etc
I am using Mirth3.0. I am having a requirement to check the database lock before performing any operations on the database through mirth. This can only be achieved by the system command. How I can get the system command results in mirth. As of now, I have tried the following:
var proc=java.lang.Runtime.getRuntime().exec("ls"); //say ls is command to know the database lock status
logger.debug(proc);
var stdin = proc.getInputStream();
logger.debug(stdin);
var isr = new InputStreamReader(stdin);
logger.debug(isr);
var br = new BufferedReader(isr);
var temp=br.readLine();
logger.debug(temp);
From all of the loggers above I am getting the object values like for example:
java.lang.UNIXProcess@3fd49dca
java.lang.UNIXProcess$ProcessPipeInputStream@1c1b4 5b4
etc
Calling system command from Mirth
0 commentaires:
Enregistrer un commentaire