I think this is a bug for activemq-cpp 3.9.5
In the file src/main/activemq/transport/correlator/ResponseCorrelator.cpp,
the class ResponseFinalizer destructor would remove commandId from the map,
but Actually it does not remove it successfully, because it throw exception.
I insert a line to print some information when catch some exception , And it
always print this information where run it.
so this is a bug ?
class ResponseFinalizer {
private:
ResponseFinalizer(const ResponseFinalizer&);
ResponseFinalizer operator=(const ResponseFinalizer&);
private:
Mutex* mutex;
int commandId;
HashMap<unsigned int, Pointer<FutureResponse> >* map;
public:
ResponseFinalizer(Mutex* mutex, int commandId, HashMap<unsigned int,
Pointer<FutureResponse> >* map1 :
mutex(mutex), commandId(commandId), map(map) {
}
~ResponseFinalizer() {
synchronized(mutex){
try {
printf("fuck ResponseFinalizer
remove[%d]\n ", commandId);
map->remove(commandId);
} catch (...) {
printf("remove get exception\n");
// added here
}
}
}
};
--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-f2368404.html