- Timestamp:
- 06/14/13 15:11:13 (12 years ago)
- Location:
- trunk/objectmq
- Files:
-
- 5 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/objectmq/src/omq/client/proxy/Proxymq.java
r38 r39 237 237 if (resp.getError() != null) { 238 238 OmqException error = resp.getError(); 239 String name = error.getType(); System.out.println("Name: "+name);239 String name = error.getType(); 240 240 String message = error.getMessage(); 241 241 throw (Exception) Class.forName(name).getConstructor(String.class).newInstance(message); -
trunk/objectmq/src/omq/common/broker/Broker.java
r38 r39 108 108 } 109 109 110 public static Remote lookup(String reference, Class<?> contract) throws RemoteException { 110 @SuppressWarnings("unchecked") 111 public static <T extends Remote> T lookup(String reference, Class<T> contract) throws RemoteException { 111 112 try { 112 113 Properties environment = Environment.getEnvironment(); … … 120 121 Proxymq proxy = new Proxymq(reference, contract, environment); 121 122 Class<?>[] array = { contract }; 122 return ( Remote) Proxymq.newProxyInstance(contract.getClassLoader(), array, proxy);123 } 124 return ( Remote) Proxymq.getInstance(reference);123 return (T) Proxymq.newProxyInstance(contract.getClassLoader(), array, proxy); 124 } 125 return (T) Proxymq.getInstance(reference); 125 126 126 127 } catch (Exception e) { -
trunk/objectmq/src/omq/common/util/Serializers/GsonImp.java
r38 r39 39 39 40 40 try { 41 JsonArray jsonArgs = (JsonArray) jsonObj.get(" arguments");41 JsonArray jsonArgs = (JsonArray) jsonObj.get("params"); 42 42 43 43 // TODO: if (jsonArgs.size() == types.size()) -
trunk/objectmq/src/omq/server/InvocationThread.java
r38 r39 81 81 82 82 } 83 System.out.println("Invocation Thread dies!!");84 83 } 85 84 -
trunk/objectmq/test/exceptionTest/ClientTest.java
r38 r39 3 3 import static org.junit.Assert.assertEquals; 4 4 5 import java.lang.reflect.UndeclaredThrowableException; 5 6 import java.util.Properties; 6 7 … … 25 26 env.setProperty(ParameterQueue.SERVER_PORT, "5672"); 26 27 env.setProperty(ParameterQueue.DURABLE_QUEUES, "false"); 27 env.setProperty(ParameterQueue.SERIALIZER_NAME, Serializer. java);28 env.setProperty(ParameterQueue.SERIALIZER_NAME, Serializer.kryo); 28 29 env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false"); 29 30 … … 67 68 } 68 69 69 @Test(expected = NoSuchMethodException.class) 70 @Test(expected = UndeclaredThrowableException.class) 71 // This exception will be caused by java.lang.NoSuchMethodException 70 72 public void getTrailer() throws Exception { 71 73 client.getTrailer(); -
trunk/objectmq/test/exceptionTest/ServerTest.java
r38 r39 17 17 env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1"); 18 18 env.setProperty(ParameterQueue.SERVER_PORT, "5672"); 19 env.setProperty(ParameterQueue.DURABLE_QUEUES, " true");20 env.setProperty(ParameterQueue.SERIALIZER_NAME, Serializer. java);19 env.setProperty(ParameterQueue.DURABLE_QUEUES, "false"); 20 env.setProperty(ParameterQueue.SERIALIZER_NAME, Serializer.kryo); 21 21 env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false"); 22 22
Note: See TracChangeset
for help on using the changeset viewer.