On 16/01/2014 15:08, Mark Thomas wrote:
> On 15/01/2014 15:59, Rémy Maucherat wrote:
>> 2014/1/15 Mark Thomas <ma...@apache.org>
>>
>>>
>>> If folks integrating with Tomcat need to extend / replace what is
>>> currently in StandardContext.bindThread() and
>>> StandardContext.unbindThread() having a listener for this rather than
>>> having to extend StandardContext makes sense to me.
>>>
>>
>> Ok.
>>
>>>
>>> I'm not sure I follow what you are proposing for PAs.
>>>
>>> Nothing, if a utility class was doing the PA itself to make it easier and
>> do PA + setContextCL + call the listener, there would be more PAs (maybe a
>> performance impact).
> 
> Thanks for the clarification. No objections here.
I've been looking at this some more with an eye to reducing code
duplication. I think the thread binding listener could be merged with
the ContainerListener. I can't see a good reason to keep them apart at
this point. With this in mind, the changes I'm planning are:

- Add bindThread() and unbindThread() to the Context interface
- Add optional PA (as in callers can opt to use it if they wish)
  support to bindThread() and unbindThread()
- Switch all the components currently implementing their own
  bind/unbind methods to use these new context methods
- Switch container event type to use an enum
- Add bind and unbind events to this new enum
- Remove ThreadBindingListener

The main benefit of this is that all the actions required on bind and
unbind will be in a single place rather than duplicated (sometimes
inconsistently) across the code base.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to