String connect = "connect('weblogic', 'weblogic', 't3://bcdev07:5210')";
WLST.ensureInterpreter();
WLSTInterpreter interpreter = WLST.getWLSTInterpreter();
interpreter.exec(connect);
while (true) {
OutputStream os = new ByteArrayOutputStream();
interpreter.setOut(os);
interpreter.exec("threadDump('false')");
System.out.println("buffer=" + os.toString());
TestingUtilities.sleep(100);
}
2 comments:
Hi a little question, have ou tried using pwd()command?, I have tested a big list of commands but thar doesn' work, if you have a way or advice would be great.
thanks in advance.
try this:
WLSTInterpreter interpreter = WLST.getWLSTInterpreter();
interpreter.exec(connect);
interpreter.exec("serverRuntime()\n");
while (true) {
OutputStream os = new ByteArrayOutputStream();
interpreter.setOut(os);
interpreter.exec("myvar=pwd()");
interpreter.exec("print myvar");
System.out.println("buffer=" + os.toString());
Thread.sleep(1000);
}
Post a Comment