2 Replies Latest reply on Sep 7, 2011 1:48 PM by hathawa

    CXF and initializing bean with scope=session

    hathawa

      I have a service that I have running in a CXF/Tomcat environment that I would

      like to port to FUSE ServiceMix. The Spring bean for the service is defined as:

       

       

       

      In the web.xml file I have defined a RequestContextListener so that Spring gets

      control and creates the bean.

       

      How do I do a similar thing in ServiceMix?

      Thanks in advance.

       

      Barry Hathaway

        • 1. Re: CXF and initializing bean with scope=session
          ffang

          Hi,

           

          I suggest you use cxf http-osgi transport but not serlvet transport in FUSE ESB, it's also a servlet and use pax-web underlying, you may need take a look at cxf-osgi example shipped with kit.

           

          Freeman

          • 2. Re: CXF and initializing bean with scope=session
            hathawa

            Actually I am following the cxf-osgi example in Fuse ESB 4.4. It looks like the http_osgi

            transport has been removed in 4.4 since the Release Notes mention that "regular HTTP transport now works when deployed into OSGi containers".

             

            Like the example, my pom.xml has an import of:

                 org.apache.cxf.transport.http

            and my beans.xml imports:

                 )

                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_25]

                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_25]

                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_25]

                 at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_25]

                 at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173)[123:org.apache.cxf.bundle:2.4.1.fuse-00-43]

                 at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)[123:org.apache.cxf.bundle:2.4.1.fuse-00-43]

                 ... 42 more