cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CXF-1857) ServiceFactoryBean should not call createInvoker() twice if its invoker does not be set
Date Sun, 12 Oct 2008 13:32:44 GMT

     [ https://issues.apache.org/jira/browse/CXF-1857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Willem Jiang updated CXF-1857:
------------------------------

          Description: 

 public Server create() {
        try {
            applyExtraClass();
            if (serviceBean != null && getServiceClass() == null) {
                setServiceClass(ClassHelper.getRealClass(serviceBean));
            }
            if (invoker != null) {
                getServiceFactory().setInvoker(invoker);
            } else if (serviceBean != null) {
                 // we should set the invoker here
                getServiceFactory().setInvoker(createInvoker());               
            }

            Endpoint ep = createEndpoint();
            server = new ServerImpl(getBus(),
                                    ep,
                                    getDestinationFactory(),
                                    getBindingFactory());

            if (ep.getService().getInvoker() == null) {
                if (invoker == null) {
                    ep.getService().setInvoker(createInvoker());
                } else {
                    ep.getService().setInvoker(invoker);
                }
            }

            if (start) {
                server.start();
            }
        } catch (EndpointException e) {
            throw new ServiceConstructionException(e);
        } catch (BusException e) {
            throw new ServiceConstructionException(e);
        } catch (IOException e) {
            throw new ServiceConstructionException(e);
        }

        if (serviceBean != null) {
            initializeAnnotationInterceptors(server.getEndpoint(),
                                             ClassHelper.getRealClass(getServiceBean()));
        } else if (getServiceClass() != null) {
            initializeAnnotationInterceptors(server.getEndpoint(), getServiceClass());
        }


        applyFeatures();
        return server;
    }


  was:
{code:language=java}
 public Server create() {
        try {
            applyExtraClass();
            if (serviceBean != null && getServiceClass() == null) {
                setServiceClass(ClassHelper.getRealClass(serviceBean));
            }
            if (invoker != null) {
                getServiceFactory().setInvoker(invoker);
            } else if (serviceBean != null) {
                 // we should set the invoker here
                getServiceFactory().setInvoker(createInvoker());               
            }

            Endpoint ep = createEndpoint();
            server = new ServerImpl(getBus(),
                                    ep,
                                    getDestinationFactory(),
                                    getBindingFactory());

            if (ep.getService().getInvoker() == null) {
                if (invoker == null) {
                    ep.getService().setInvoker(createInvoker());
                } else {
                    ep.getService().setInvoker(invoker);
                }
            }

            if (start) {
                server.start();
            }
        } catch (EndpointException e) {
            throw new ServiceConstructionException(e);
        } catch (BusException e) {
            throw new ServiceConstructionException(e);
        } catch (IOException e) {
            throw new ServiceConstructionException(e);
        }

        if (serviceBean != null) {
            initializeAnnotationInterceptors(server.getEndpoint(),
                                             ClassHelper.getRealClass(getServiceBean()));
        } else if (getServiceClass() != null) {
            initializeAnnotationInterceptors(server.getEndpoint(), getServiceClass());
        }


        applyFeatures();
        return server;
    }
{code}

    Affects Version/s: 2.0.3
                       2.0.4

> ServiceFactoryBean should not call createInvoker() twice if its invoker does not be set
> ---------------------------------------------------------------------------------------
>
>                 Key: CXF-1857
>                 URL: https://issues.apache.org/jira/browse/CXF-1857
>             Project: CXF
>          Issue Type: Improvement
>    Affects Versions: 2.0.3, 2.0.4, 2.0.5, 2.1, 2.0.6, 2.1.1, 2.0.7, 2.0.8, 2.1.2
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>             Fix For: 2.1.3, 2.2
>
>
>  public Server create() {
>         try {
>             applyExtraClass();
>             if (serviceBean != null && getServiceClass() == null) {
>                 setServiceClass(ClassHelper.getRealClass(serviceBean));
>             }
>             if (invoker != null) {
>                 getServiceFactory().setInvoker(invoker);
>             } else if (serviceBean != null) {
>                  // we should set the invoker here
>                 getServiceFactory().setInvoker(createInvoker());               
>             }
>             Endpoint ep = createEndpoint();
>             server = new ServerImpl(getBus(),
>                                     ep,
>                                     getDestinationFactory(),
>                                     getBindingFactory());
>             if (ep.getService().getInvoker() == null) {
>                 if (invoker == null) {
>                     ep.getService().setInvoker(createInvoker());
>                 } else {
>                     ep.getService().setInvoker(invoker);
>                 }
>             }
>             if (start) {
>                 server.start();
>             }
>         } catch (EndpointException e) {
>             throw new ServiceConstructionException(e);
>         } catch (BusException e) {
>             throw new ServiceConstructionException(e);
>         } catch (IOException e) {
>             throw new ServiceConstructionException(e);
>         }
>         if (serviceBean != null) {
>             initializeAnnotationInterceptors(server.getEndpoint(),
>                                              ClassHelper.getRealClass(getServiceBean()));
>         } else if (getServiceClass() != null) {
>             initializeAnnotationInterceptors(server.getEndpoint(), getServiceClass());
>         }
>         applyFeatures();
>         return server;
>     }

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


Mime
View raw message