import org.jboss.remoting.Client; import org.jboss.remoting.InvokerLocator; import org.jboss.remoting.transport.socket.SocketServerInvoker; public class RemoteClient { public static void main(String[] args) throws Exception { InvokerLocator locator = new InvokerLocator("socket://localhost:4444"); Client client = new Client(locator); String request = "Hello, JBoss!"; String response = (String) client.invoke(request); System.out.println("Response: " + response); client.destroy(); } }


上一篇:
下一篇:
切换中文