1 45 package org.openejb.server.telnet; 46 47 import java.io.DataInputStream ; 48 import java.io.IOException ; 49 import java.io.PrintStream ; 50 51 import org.openejb.Container; 52 import org.openejb.DeploymentInfo; 53 import org.openejb.OpenEJB; 54 55 58 public class Ls extends Command { 59 60 public static void register() { 61 Ls cmd = new Ls(); 62 Command.register("system", cmd); 63 } 65 66 public void exec(Arguments args, DataInputStream in, PrintStream out) throws IOException { 67 Container[] c = OpenEJB.containers(); 69 out.println("Containers:"); 70 for (int i=0; i < c.length; i++){ 73 out.print(" "+c[i].getContainerID()); 74 out.println(""); 75 } 76 out.println(""); 77 78 79 out.println("Deployments:"); 81 DeploymentInfo[] d = OpenEJB.deployments(); 84 for (int i=0; i < d.length; i++){ 85 out.print(" "+d[i].getDeploymentID()); 86 out.println(""); 87 } 88 } 89 90 } 91 92 | Popular Tags |