Changeset 75 for trunk/src/main/java/omq


Ignore:
Timestamp:
07/02/13 11:50:11 (11 years ago)
Author:
stoda
Message:

Multi problem solved

Location:
trunk/src/main/java/omq
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/main/java/omq/client/proxy/MultiProxymq.java

    r70 r75  
    44import java.lang.reflect.Method;
    55import java.util.Properties;
     6
     7import org.apache.log4j.Logger;
    68
    79import com.rabbitmq.client.AMQP.BasicProperties;
     
    2022 */
    2123public class MultiProxymq implements InvocationHandler {
     24        private static final Logger logger = Logger.getLogger(MultiProxymq.class.getName());
    2225        private static final String multi = "multi#";
    2326
     
    3740                Properties env = broker.getEnvironment();
    3841                replyQueueName = env.getProperty(ParameterQueue.RPC_REPLY_QUEUE);
    39                 exchange = multi + env.getProperty(ParameterQueue.RPC_EXCHANGE);
     42                exchange = multi + uid;
    4043                serializerType = env.getProperty(ParameterQueue.SERIALIZER_NAME, Serializer.JAVA);
    4144        }
     
    5558                broker.getChannel().basicPublish(exchange, routingkey, props, bytesRequest);
    5659
     60                logger.debug("Proxymq: " + uid + " invokes " + methodName + ", corrID" + corrId + ", exchange: " + exchange + ", replyQueue: " + replyQueueName
     61                                + ", serializerType: " + serializerType + ", multi call: " + request.isMulti() + ", async call: " + request.isAsync());
     62
    5763                return null;
    5864        }
  • trunk/src/main/java/omq/client/proxy/Proxymq.java

    r72 r75  
    9090                env = broker.getEnvironment();
    9191                exchange = env.getProperty(ParameterQueue.RPC_EXCHANGE);
    92                 multiExchange = multi + exchange;
     92                multiExchange = multi + uid;
    9393                replyQueueName = env.getProperty(ParameterQueue.RPC_REPLY_QUEUE);
    9494
  • trunk/src/main/java/omq/common/message/Request.java

    r58 r75  
    2323        }
    2424
    25         public Request(String id, String method, Object[] params) {
    26                 this.id = id;
    27                 this.method = method;
    28                 this.params = params;
    29         }
    30 
    31         private Request(String id, String method, boolean async, Object[] params) {
     25        public Request(String id, String method, boolean async, Object[] params) {
    3226                this.id = id;
    3327                this.method = method;
     
    3630        }
    3731
    38         private Request(String id, String method, boolean async, Object[] params, boolean multi) {
     32        public Request(String id, String method, boolean async, Object[] params, boolean multi) {
    3933                this.id = id;
    4034                this.method = method;
  • trunk/src/main/java/omq/common/util/Serializers/GsonImp.java

    r72 r75  
    3333                String id = jsonObj.get("id").getAsString();
    3434                String method = jsonObj.get("method").getAsString();
     35                boolean async = jsonObj.get("async").getAsBoolean();
    3536
    3637                List<Class<?>> types = obj.getParams(method);
     
    4849                                i++;
    4950                        }
    50 
    51                         return new Request(id, method, arguments);
     51                        return new Request(id, method, async, arguments);
    5252                } catch (NullPointerException e) {
    53                         return new Request(id, method, null);
     53                        return new Request(id, method, async, null);
    5454                }
    5555        }
  • trunk/src/main/java/omq/server/RemoteObject.java

    r74 r75  
    9797                                Delivery delivery = consumer.nextDelivery();
    9898
    99                                 logger.debug(UID + " has received a message");
     99                                logger.debug(UID + " has received a message, serializer: " + delivery.getProperties().getType());
    100100
    101101                                remoteWrapper.notifyDelivery(delivery);
     
    219219                String routingKey = UID;
    220220                // Multi info
    221                 String multiExchange = multi + exchange;
     221                String multiExchange = multi + UID;
    222222
    223223                boolean durable = Boolean.parseBoolean(env.getProperty(ParameterQueue.DURABLE_QUEUES, "false"));
Note: See TracChangeset for help on using the changeset viewer.