1 Reply Latest reply on Jul 30, 2009 7:16 PM by asookazian

    Advantages n Disadvantages of Integrating Spring into Seam

    ambrish_kumar

      Hi Everyone,


      Could anybody tell me the advantages of Integrating Spring into Seam?.


      Both the frameworks are very complex and have their own advantages and disadvantages, but the performance of Spring is much better than Seam.


      Due to performance issues with Seam, we are planning to integrate Spring into Seam. Is it the right decision?.


      Will the integration of Spring increase the performance of Seam or not?


      Thanks


      Ambrish

        • 1. Re: Advantages n Disadvantages of Integrating Spring into Seam
          asookazian

          Depends on whether or not you're using JSF with Seam and what performance optimizations you use (like @BypassInterceptors, Hibernate 2nd level cache, etc.) as well as architecture/layering of your app.


          Read the online Spring integration chapter (it's free) here: http://manning.com/dallen/SeamIACH15_bonus.pdf from SiA book.  IMO, you're looking for trouble b/c these two frameworks are both very complicated and the integration process was somewhat complicated (also depends on which app server you're using).


          One of the main reasons to use Spring with Seam is if you have an existing Spring app and you want to re-use the Spring beans and add the functionality that Seam offers.  Perhaps also if you're interested in using AOP.  Also, Spring offers JdbcTemplate but there is no equivalent of that in Seam.  The @Transactional annotation is more robust in Spring than Seam.  I'm pretty sure that Spring Web Flow offers some kind of conversation modeling/support but most likely not jBPM integration with JBoss AS which Seam does.


          It seams that Spring has implemented the conversation and nested conversation concepts as flows and sub-flows:


          http://forum.springsource.org/showthread.php?t=46265


          Here's an excerpt from SiA ch15:



          Which classes of Spring can be assimilated into Seam? Well, it depends on their
          POJO rating, of course! As long as the class can act as a regular object, meaning it
          doesn’t attempt to call out to the Spring container or depend on any Spring container
          magic (at least that we can’t emulate), it’s a viable candidate. Here’s a small sampling
          just to get you thinking:
          ■ Custom—Classes in your application being used as Spring beans
          ■ Lightweight remoting—HttpInvoker, Hessian, Burlap, and POJO
          ■ JDBC—JdbcTemplate and SimpleJdbcTemplate
          ■ JMS—JmsTemplate
          ■ iBatis—SqlMapClientFactoryBean and SqlMapClientTemplate
          ■ JNDI—JndiObjectLocator
          ■ JMX—MBeanExporter