1 7 package org.jboss.remoting.marshall.dynamic.remote.socket; 8 9 import org.apache.log4j.Level; 10 import org.jboss.dtf.MultipleTestRunner; 11 import org.jboss.remoting.AbstractInvokerTest; 12 import org.jboss.remoting.Client; 13 import org.jboss.remoting.InvokerLocator; 14 15 18 public class MarshallerLoadingClient extends AbstractInvokerTest implements MarshallerLoadingConstants 19 { 20 public MarshallerLoadingClient(String name) 21 { 22 super(name); 23 } 24 25 public MarshallerLoadingClient(String name, int numberOfInstances) 26 { 27 super(name, numberOfInstances); 28 } 29 30 public MarshallerLoadingClient(String name, String transport, int port) 31 { 32 super(name, transport, port); 33 } 34 35 public MarshallerLoadingClient(String name, String transport, int port, int numberOfInstances) 36 { 37 super(name, transport, port, numberOfInstances); 38 } 39 40 public void testInvocation() throws Throwable 41 { 42 InvokerLocator locator = new InvokerLocator(locatorURI); 43 System.out.println("Calling remoting server with locator uri of: " + locatorURI); 44 45 Client remotingClient = new Client(locator, null); 46 Object response = remotingClient.invoke("Do something", null); 47 assertTrue(true); 48 49 System.out.println("Invocation response: " + response); 50 } 51 52 58 public static void main(String [] args) 59 { 60 org.apache.log4j.BasicConfigurator.configure(); 61 org.apache.log4j.Category.getRoot().setLevel(Level.INFO); 62 org.apache.log4j.Category.getInstance("org.jboss.remoting").setLevel(Level.DEBUG); 63 64 71 MarshallerLoadingClient client = new MarshallerLoadingClient(MarshallerLoadingClient.class.getName()); 72 try 73 { 74 MultipleTestRunner runner = new MultipleTestRunner(); 75 runner.doRun(client, true); 76 } 77 catch(Throwable e) 78 { 79 e.printStackTrace(); 80 System.exit(1); 81 } 82 System.exit(0); 83 } 84 85 86 } | Popular Tags |