cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vitaliy Garnashevich (Created) (JIRA)" <>
Subject [jira] [Created] (CXF-4066) AbstractTransportFactory registers itself as extension, before being fully initialized
Date Thu, 26 Jan 2012 16:24:38 GMT
AbstractTransportFactory registers itself as extension, before being fully initialized

                 Key: CXF-4066
             Project: CXF
          Issue Type: Bug
    Affects Versions: 2.5.2, 2.4.5
            Reporter: Vitaliy Garnashevich

AbstractTransportFactory calls register() at the end of its constructor, to register itself
as a DestinationFactory and/or as a ConduitInitiator. Classes that extend AbstractTransportFactory
(e.g. HTTPTransportFactory), and which call super's constructor, have no way to properly initialize,
before being exposed as an extension. Such classes must call super() constructor, before initializing
their fields.

This could lead to concurrency issues, when such object is used as an extension, before being
fully initialized. Here is a stack trace of such problem:

        at org.apache.cxf.transport.http.HTTPTransportFactory.getDestination(
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(
        at org.apache.cxf.endpoint.ServerImpl.initDestination(
        at org.apache.cxf.endpoint.ServerImpl.<init>(
        at org.apache.cxf.frontend.ServerFactoryBean.create(
        at org.apache.cxf.dosgi.dsw.handlers.PojoConfigurationTypeHandler.createServer(
        at org.apache.cxf.dosgi.dsw.hooks.ServiceHookUtils.createServer(
        at org.apache.cxf.dosgi.dsw.hooks.CxfPublishHook.createServer(
        at org.apache.cxf.dosgi.dsw.hooks.CxfPublishHook.publishEndpoint(
        at org.apache.cxf.dosgi.dsw.Activator$
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
        at java.util.concurrent.ThreadPoolExecutor$

Here, the HTTPTransportFactory.getDestination() method, implementing DestinationFactory interface,
is called before HTTPTransportFactory's "registry" field is assigned by constructor.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message