Archive for the ‘Java’ Category

132

PHJDBC: Temporary Remove the Java System Output

When I execute SQL query using PowerHub JDBC driver, it always gives connection status. Connecting to //powerhubmachine/pe_dic-server Connected to ////powerhubmachine/pe_dic-server (PowerHub 20.0) To remove this output, I temporarily redirect the output to ‘null’, as shown in snippet below: private void connect() throws IOException { try { PrintStream oriOut = System.out; System.setOut(new PrintStream(new OutputStream(){public void write [...]

118

Java: JConsole’s TopThreads Plugin

While, I was googling to find a tool to monitor our Java RMI Server (PowerHub), I found this cool plugin. The TopThreads plugin. By using this plugin, it’s easier for us to monitor which plugin that have consume cpu power. We’re able to find the culprit thread. And by following the stack trace that produce [...]

77

PowerHub: Enable JConsole to monitor PowerHub

JDK provide Java Monitoring and Management Console (JConsole) tool to provide information on performance and resource consumption of application running in Java platform using Java Management Extension (JMX) technology. To enable JMX in PowerHub add lines below to $PE_HOME/bin/runServer: -Dcom.sun.management.jmxremote \ -Dcom.sun.management.jmxremote.port=8024 \ -Dcom.sun.management.jmxremote.authenticate=true \ -Dcom.sun.management.jmxremote.ssl=false \ Notice: 1. JConsole is part of JDK default [...]

Subscribe to RSS Feed Follow me on Twitter!