Ignore:
Timestamp:
07/01/13 12:47:42 (11 years ago)
Author:
stoda
Message:

WorkspaceTest?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/main/java/omq/server/RemoteObject.java

    r72 r74  
    5858        }
    5959
    60         public void startRemoteObject(String reference, Broker broker) throws Exception {
     60        public void startRemoteObject(String reference, Broker broker, Properties env) throws Exception {
    6161                this.broker = broker;
    62                 UID = reference;
    63                 multiQueue = UID + System.currentTimeMillis();
    64                 env = broker.getEnvironment();
    65 
    66                 params = new HashMap<String, List<Class<?>>>();
     62                this.UID = reference;
     63                this.multiQueue = UID + System.currentTimeMillis();
     64                this.env = env;
     65
     66                this.params = new HashMap<String, List<Class<?>>>();
    6767                for (Method m : this.getClass().getMethods()) {
    6868                        List<Class<?>> list = new ArrayList<Class<?>>();
     
    7070                                list.add(clazz);
    7171                        }
    72                         params.put(m.getName(), list);
     72                        this.params.put(m.getName(), list);
    7373                }
    7474
    7575                // Get num threads to use
    7676                int numThreads = Integer.parseInt(env.getProperty(ParameterQueue.NUM_THREADS, "1"));
    77                 remoteWrapper = new RemoteWrapper(this, numThreads, broker.getSerializer());
     77                this.remoteWrapper = new RemoteWrapper(this, numThreads, broker.getSerializer());
    7878
    7979                startQueues();
     
    227227
    228228                // Declares and bindings
    229                 logger.info("RemoteObject: " + UID + " declaring direct exchange: " + exchange + ", Queue: " + queue);
     229                logger.info("RemoteObject: " + UID + " declaring direct exchange: " + exchange + ", Queue: " + queue + ", Durable: " + durable);
    230230                channel.exchangeDeclare(exchange, "direct");
    231231                channel.queueDeclare(queue, durable, false, false, null);
    232232                channel.queueBind(queue, exchange, routingKey);
    233233
     234                logger.info("RemoteObject: " + UID + " declaring fanout exchange: " + multiExchange + ", Queue: " + multiQueue + ", Durable: " + durable);
    234235                channel.exchangeDeclare(multiExchange, "fanout");
    235236                channel.queueDeclare(multiQueue, durable, false, false, null);
    236237                channel.queueBind(multiQueue, multiExchange, "");
    237 
    238                 // Declare the event topic fanout
    239                 logger.info("RemoteObject: " + UID + " declaring fanout exchange: " + UID);
    240                 channel.exchangeDeclare(UID, "fanout");
    241238
    242239                // Declare a new consumer
Note: See TracChangeset for help on using the changeset viewer.