Ignore:
Timestamp:
10/19/13 13:20:44 (11 years ago)
Author:
stoda
Message:

Error detected: there should be only one thread listening to the multiexchange queue.
TODO: change this. Make refactor in the invocationthread. Change remotethreadpool to achieve this behavior.
AInvocationThread <- InvocationTHread

<- MultiInvocationTHread

Location:
branches/supervisor/src/main/java/omq/common/broker
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/supervisor/src/main/java/omq/common/broker/RemoteBroker.java

    r103 r107  
    66
    77import omq.Remote;
    8 import omq.client.annotation.SyncMethod;
    98import omq.exception.RemoteException;
    109import omq.exception.RetryException;
     
    1918        public void deleteObject(String reference) throws RemoteException, IOException;
    2019
    21         @SyncMethod(retry = 1, timeout = 1000)
    2220        public boolean hasObject(String reference) throws RetryException;
    2321
    24         @SyncMethod(retry = 1, timeout = 1000)
    2522        public HasObject hasObjectInfo(String reference) throws RetryException;
    2623
  • branches/supervisor/src/main/java/omq/common/broker/RemoteBrokerImpl.java

    r103 r107  
    5050        @Override
    5151        public HasObject hasObjectInfo(String reference) throws RetryException {
     52                System.out.println("Hola soc un broker"+ getRef() + ", "+getUID()+ ", fil: "+Thread.currentThread().getId());
    5253                if (getBroker().getRemoteObjs().containsKey(reference)) {
    5354                        RemoteObject r = getBroker().getRemoteObjs().get(reference);
    5455                        int numThreads = r.getPool().getWorkers().size();
    55                         return new HasObject(this.getRef(), reference, true, numThreads);
     56                        return new HasObject(this.getUID(), reference, true, numThreads);
    5657                }
    57                 return new HasObject(this.getRef(), reference, false, 0);
     58                return new HasObject(this.getUID(), reference, false, 0);
    5859        }
    5960
  • branches/supervisor/src/main/java/omq/common/broker/RemoteMultiBroker.java

    r106 r107  
    11package omq.common.broker;
    2 
    3 import java.util.Set;
    42
    53import omq.Remote;
     
    97
    108public interface RemoteMultiBroker extends Remote {
    11         @MultiMethod
    12         @SyncMethod(retry = 1, timeout = 1000)
    13         public Set<String> getRemoteObjects();
    149
    1510        @MultiMethod
Note: See TracChangeset for help on using the changeset viewer.