[ 
https://issues.apache.org/jira/browse/CXF-791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512927
 ] 

benson margulies commented on CXF-791:
--------------------------------------

First, a question: given the comment I reported that insists that the
ServerEngineFactory come off the bus, how could a custom
TransportFactory actually work? Or is the comment misleading?

Second, I'd respectfully disagree. It seemed to me that, as things are,
I'd have to copy quite a lot of code to effect a tiny change in the
behavior of JettyHTTPServerEngine. I'd need a transport factory which
could be a subclass of the standard one, but then I'd need to completely
reproduce the contents of the ServerEngineFactory. If that method were
protected instead of private, I could make very small adjustments with
small amounts of code.

If the two factories were one class, then I could just override the
function that creates the server engine itself. Because they are split
into two classes, I think I'm trying to convince you that it's important
to allow overrides of both. That is, even if I were taking your advice
and subclassing the TransportFactory, I'd want to be able to subclass
the ServerEngineFactory to use in my subclassed TransportFactory.



> JettyHTTPServerEngineFactory.createJettyHTTPServerEngine should be protected
> ----------------------------------------------------------------------------
>
>                 Key: CXF-791
>                 URL: https://issues.apache.org/jira/browse/CXF-791
>             Project: CXF
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 2.0
>            Reporter: benson margulies
>            Assignee: willem Jiang
>
> According to comments in 
> JettyHTTPTransportEngine.getyJettyHTTPServerEngineFactory, the server factory 
> must come off the bus. So, a person who wanted to customize the server engine 
> factory would subclass the standard server engine factory and place the 
> object of the specialized type on the bus.
> Sadly, this won't work, since the create method in the summary is not 
> protected, but rather package default, and so a subclassed 
> ServerEngineDactory is pretty comprehensively prevented from being even 
> faintly useful.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to