- Timestamp:
- 10/18/13 16:09:36 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/supervisor/src/main/java/omq/common/broker/Broker.java
r99 r106 240 240 } 241 241 242 public void bind(String reference, String UID, RemoteObject remote) throws RemoteException, AlreadyBoundException { 243 bind(reference, UID, remote, environment); 244 } 245 242 246 /** 243 247 * Binds the reference to the specified remote object. This function uses … … 264 268 try { 265 269 remote.startRemoteObject(reference, this, env); 270 remoteObjs.put(reference, remote); 271 } catch (Exception e) { 272 throw new RemoteException(e); 273 } 274 } 275 276 public void bind(String reference, String UID, RemoteObject remote, Properties env) throws RemoteException, AlreadyBoundException { 277 if (remoteObjs.containsKey(reference)) { 278 throw new AlreadyBoundException(reference); 279 } 280 // Try to start the remtoeObject listeners 281 try { 282 remote.startRemoteObject(reference, UID, this, env); 266 283 remoteObjs.put(reference, remote); 267 284 } catch (Exception e) { … … 400 417 * Supervisor 401 418 */ 402 public void setSupervisor(String supervisorName, String broker Name) throws Exception {419 public void setSupervisor(String supervisorName, String brokerSet, String brokerName) throws Exception { 403 420 // Create a RemoteBrokerImpl 404 bind(broker Name, new RemoteBrokerImpl());421 bind(brokerSet, brokerName, new RemoteBrokerImpl()); 405 422 // Subscribe broker 406 423 supervisor = lookup(supervisorName, Supervisor.class); 407 supervisor.subscribe(broker Name);408 logger.info("Supervisor set: " + supervisorName + ", Broker Name: " + brokerName);424 supervisor.subscribe(brokerSet, brokerName); 425 logger.info("Supervisor set: " + supervisorName + ", BrokerSet: " + brokerSet + ", BrokerName: " + brokerName); 409 426 } 410 427
Note: See TracChangeset
for help on using the changeset viewer.