cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rouble <r.ou...@gmail.com>
Subject @PostConstruct called twice
Date Tue, 08 Nov 2011 00:15:37 GMT
Looks like a bug. Or I am missing something. My spring config looks like this:

    <bean id="myBean" class="com.example.MyBean" scope="singleton">
        <property name="someProperty" ref="someProperty"/>
    </bean>

    <jaxws:endpoint
        id="webserviceinterface"
        implementor="#myBean"
        address="/MyWebService">
    </jaxws:endpoint>


Once after the property (someProperty) is set:
        at org.apache.cxf.common.injection.ResourceInjector.invokePostConstruct(ResourceInjector.java:345)
        at org.apache.cxf.common.injection.ResourceInjector.construct(ResourceInjector.java:124)
        at org.apache.cxf.bus.spring.Jsr250BeanPostProcessor.postProcessAfterInitialization(Jsr250BeanPostProcessor.java:106)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:407)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1426)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)

and once when the service is deployed:
        at org.apache.cxf.common.injection.ResourceInjector.invokePostConstruct(ResourceInjector.java:345)
        at org.apache.cxf.common.injection.ResourceInjector.construct(ResourceInjector.java:124)
        at org.apache.cxf.jaxws.JaxWsServerFactoryBean.injectResources(JaxWsServerFactoryBean.java:268)
        at org.apache.cxf.jaxws.JaxWsServerFactoryBean.initializeResourcesAndHandlerChain(JaxWsServerFactoryBean.java:215)
        at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:203)
        at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:433)
        at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:322)
        at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
        at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$7.run(AbstractAutowireCapableBeanFactory.java:1531)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1529)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)

Is that expected?

tia,
rouble

Mime
View raw message