3 Replies Latest reply on Jan 24, 2008 10:07 AM by hubaghdadi

    Integerating Seam & Spring

    hubaghdadi

      Hi.
      I have been reading about Spring-Seam integeration.

      To configure Seam to use Spring transactions enable the SpringTransaction component like so:

      <spring:spring-transaction platform-transaction-manager="#{transactionManager}"/>

      Supposed I configured component.xml to use Spring transactions as the document specified, does my Seam component code requires any modifications?
      I mean do I have to use Spring's HibernateTemplate for example?
      Thanks.


        • 1. Re: Integerating Seam & Spring
          youngm

          Nope, your spring and Seam code will not be effected. The configuration might be more difficult though depending upon the transactionManager you are using. For example, if you're using a HibernateTransactionManager you need to make sure that both spring and seam are using the same SessionFactory. If you're using a JTA TransactionManager then you shouldn't need to change anything.

          Does that help?

          Mike

          • 2. Re: Integerating Seam & Spring

            Hi,
            I'm sucessfully using SEAM - Spring integration with modular approach to Services, Entities, Business and Web (may be remoting / webservices later).

            If you get any problem with configuration just post it here, i'll try to help you.

            • 3. Re: Integerating Seam & Spring
              hubaghdadi

              What I don't understand is:
              I inject Seam managed Hibernate session object via @In
              What is happening when I configure Seam to use Spring managed transactions (PlatformTransactionManager)?