clebertsuconic commented on pull request #3809:
URL: https://github.com/apache/activemq-artemis/pull/3809#issuecomment-949255376


   You should probably squash all your changes Into a single commit.
   
   Also, you are adding the lister to a collection on ActiveMQServer, but 
you're not doing anything with it. you should register it to the StorageManager 
when it starts...
   
   ultimately you should just delegate it from the storage manager.
   
   
   Also: notice the critical error is meant for IO Storage.. not acceptors.. on 
your test you did an invalid TCP operation, but that wouldn't cause any damage.
   
   We have some tests that are validating the IOCriticalException by simply 
calling an artificial method, generating a fake failure:
   
   ShutdownOnCriticalIOErrorMoveNextTest was doing that, but that would be a 
bit convoluted for your test.
   
   
   As for the change, you will have to change ActiveMQServerImpl a bit further.
   
   Currently the ActiveMQServerImpl is creating a DefaultCriticalErrorListener 
that will register into the StorageManagers.
   
   I suggest you add this ioCriticalErrorListener to your collection,
   
   and then create a new Listener that will do the following:
   
   ioCriticalErrorListeners.forEach((t) -> t.callitWhateverTheMethodName);


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to