Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-3157

@PostConstruct doesn't work with servlet transport

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Transports
    • Labels:
      None

      Description

      The cxf-servlet.xml is loaded with GenericApplicationContext which is not refreshable, the method annotated with @PostConstruct can not be executed by JSR250PostProcessor.
      Below is an example uses WS-RM persistence and RMTxStore can not be initialized :

      <beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:cxf="http://cxf.apache.org/core"
      xmlns:wsa="http://cxf.apache.org/ws/addressing"
      xmlns:wsrm-mgr="http://cxf.apache.org/ws/rm/manager"
      xmlns:jaxws='http://cxf.apache.org/jaxws'
      xsi:schemaLocation="
      http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
      http://cxf.apache.org/ws/rm/manager http://cxf.apache.org/schemas/configuration/wsrm-manager.xsd
      http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
      http://cxf.apache.org/jaxws
      http://cxf.apache.org/schemas/jaxws.xsd">

      <cxf:bus>
      <cxf:features>
      <wsa:addressing/>
      <wsrm-mgr:reliableMessaging>
      <wsrm-mgr:store>
      <ref bean="testStore"/>
      </wsrm-mgr:store>
      </wsrm-mgr:reliableMessaging>
      </cxf:features>
      </cxf:bus>

      <wsrm-mgr:jdbcStore id="testStore"/>

      <jaxws:endpoint id='EndpointImpl'
      implementor='org.apche.cxf.EndpointImpl'>
      </jaxws:endpoint>

      </beans>

        Attachments

          Activity

            People

            • Assignee:
              ema Jim Ma
              Reporter:
              ema Jim Ma
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: