1 24 25 package org.objectweb.cjdbc.scenario.console; 26 27 import java.io.File ; 28 import java.io.FileInputStream ; 29 import java.net.InetAddress ; 30 31 import org.objectweb.cjdbc.common.jmx.JmxConstants; 32 import org.objectweb.cjdbc.console.jmx.RmiJmxClient; 33 import org.objectweb.cjdbc.console.text.Console; 34 import org.objectweb.cjdbc.scenario.templates.Raidb1Template; 35 36 42 public class ConsoleScenario extends Raidb1Template 43 { 44 String consoleDir = "/console"; 45 46 51 public void testConsoleStart() throws Exception 52 { 53 String ip = InetAddress.getLocalHost().getHostName(); 54 String jmxport = ""+JmxConstants.DEFAULT_JMX_RMI_PORT; 55 RmiJmxClient jmxClient = new RmiJmxClient(jmxport, ip,null); 56 57 File file = new File (getClass().getResource(consoleDir+"/test1.console").getFile()); 58 FileInputStream in = new FileInputStream (file); 59 60 Console console = new Console(jmxClient, in, false, true); 61 console.handlePrompt(); 62 } 63 } | Popular Tags |