Changeset 53 for trunk/src/main/java/omq/server/RemoteObject.java
- Timestamp:
- 06/20/13 16:57:39 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/main/java/omq/server/RemoteObject.java
r49 r53 39 39 private String UID; 40 40 private Properties env; 41 private transient Broker broker; 42 private transient Serializer serializer; 41 43 private transient RemoteWrapper remoteWrapper; 42 44 private transient Map<String, List<Class<?>>> params; … … 60 62 } 61 63 62 public void startRemoteObject(String reference, Properties env) throws Exception { 63 this.UID = reference; 64 this.env = env; 64 public void startRemoteObject(String reference, Broker broker) throws Exception { 65 this.broker = broker; 66 UID = reference; 67 env = broker.getEnvironment(); 68 serializer = broker.getSerializer(); 65 69 66 70 params = new HashMap<String, List<Class<?>>>(); … … 75 79 // Get num threads to use 76 80 int numThreads = Integer.parseInt(env.getProperty(ParameterQueue.NUM_THREADS, "1")); 77 remoteWrapper = new RemoteWrapper(this, numThreads );81 remoteWrapper = new RemoteWrapper(this, numThreads, broker.getSerializer()); 78 82 79 83 startQueues(); … … 130 134 EventWrapper wrapper = new EventWrapper(event); 131 135 channel.exchangeDeclare(UID, "fanout"); 132 channel.basicPublish(UID, "", null, Serializer.serialize(wrapper));136 channel.basicPublish(UID, "", null, serializer.serialize(wrapper)); 133 137 } 134 138 … … 221 225 222 226 // Start channel 223 channel = Broker.getNewChannel();227 channel = broker.getNewChannel(); 224 228 225 229 // Declares and bindings
Note: See TracChangeset
for help on using the changeset viewer.