How to change order of event handlers

I have two event handlers that are attached to event, for example on event "onEndRequest".

So, what would be the best way to arrange order of event handlers?

I can’t change order how I attach events handlers, because one is attached during application creation(when behaviors are attached to application), and another latter, for example when we store something in cookie.

Is there any way to solve this problem without extending some classes, and overriding their methods?