2 Replies Latest reply on Dec 31, 2008 12:20 PM by ahus1

    Spring-Seam integration concerns

    buginfame

      The scenario has been to implement web-services in Apache CXF (integrated with Spring container) and use/implement Seam component, for actual business logic and database interactions. The Seam-Spring integration has been done. However I am unable to instantiate a seam component from inside the Spring bean, using Component.getInstance, and I am getting null pointer. Any pointers or workarounds for this?


      Thanks
      ApMu

        • 1. Re: Spring-Seam integration concerns

          I guess you have already read this? and this? and this?

          • 2. Re: Spring-Seam integration concerns
            ahus1

            We have done a similar integration, that is using webservices as the backend for our seam beans (but we use plain axis 1.2 wrapped in spring)


            While all of our seam beans are session/conversation scoped, our spring/webservice beans are stateless. Our seam beans call the spring beans. And not the other way round.


            There should be no need from a spring bean to call a seam bean.


            If there is really the need in one or two places, you could call Component.getInstance() manually (we have used this in an AOP aspect that wraps some of our spring beans for logging/authentication/error handling)


            And yes, Seam in Action is a good book, including the chapter about all levels of seam/spring integration.


            Alexander.