1 45 package org.openejb.server.ejbd; 46 47 48 import java.io.IOException ; 49 import java.io.InputStream ; 50 import java.io.ObjectInputStream ; 51 import java.io.ObjectOutputStream ; 52 import java.io.OutputStream ; 53 import java.net.Socket ; 54 import java.util.Properties ; 55 56 import org.openejb.util.Messages; 57 import org.openejb.util.Logger; 58 import org.openejb.server.ServiceException; 59 import org.openejb.server.ServerFederation; 60 import org.openejb.client.RequestMethods; 61 62 66 public class EjbServer implements org.openejb.server.ServerService { 67 68 EjbDaemon server; 69 70 public void init(Properties props) throws Exception { 71 server = EjbDaemon.getEjbDaemon(); 72 server.init(props); 73 } 74 75 public void start() throws ServiceException { 76 } 77 78 public void stop() throws ServiceException { 79 } 80 81 public String getName() { 82 return "ejbd"; 83 } 84 85 public int getPort() { 86 return 0; 87 } 88 89 public void service(Socket socket) throws ServiceException, IOException { 90 ServerFederation.setApplicationServer(server); 91 server.service(socket); 92 } 93 94 public void service(InputStream inputStream, OutputStream outputStream) throws ServiceException, IOException { 95 ServerFederation.setApplicationServer(server); 96 server.service(inputStream, outputStream); 97 } 98 99 public String getIP() { 100 return ""; 101 } 102 103 } 104 | Popular Tags |