aspose file tools*
The moose likes Other Application Frameworks and the fly likes Spring + iBatis Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Spring + iBatis" Watch "Spring + iBatis" New topic
Author

Spring + iBatis

Charles McGuire
Ranch Hand

Joined: Jan 18, 2005
Posts: 99
Our development team is considering adopting a Spring MVC + iBatis framework mix. I just finished doing a search on this forum looking for discussions and problems with this combination, but I didn't find a lot of either here. I don't know if it is because it is an uncommon blend, or maybe simply devoid of problems

My search (outside of JavaRanch) let me to an article that states the following:

... the SPring Framework supports several alternative persistence layers...iBatis is generally better suited than Hibernate for the following situations:
  • You need to integrate with an existing database
  • Your DBAs and application developers tend to work separately
  • You have more junior Java developers
  • Your data model is relatively simple


  • This seems to describe us pretty well. We are starting a "proof of concept" pilot to use these two frameworks together in our environment. However, not wanting to trust that we will discover all the landmines in the pilot, I'd like to ask this forum the following questions:

  • What has been your experience with iBatis?
  • What could we expect with an iBatis + Spring marriage?
  • Would you recommend a different tool in place of iBatis?


  • As for the last question, Hibernate is pretty well ruled out. We tried it once, found it to be too heavy for our skill level. It lengthened development time and had performance problems. We do not have the bandwidth to acquire Hibernate guru-level skills that framework seems to require to use well and keep tuned.

    Any help / suggestions / resource links would be appreciated.
    [ March 28, 2008: Message edited by: Charles McGuire ]

    There's no place like 127.0.0.1
    Gregg Bolinger
    GenRocket Founder
    Ranch Hand

    Joined: Jul 11, 2001
    Posts: 15299
        
        6

    My typical toolbox consists of Stripes + Spring + iBatis.

    I use Stripes for the MVC layer
    I use Spring for its DAO helpers and Transactional support
    I use iBatis for persistence.

    I'll always weigh my options on new projects but its hard to go wrong with that combination, for me anyway. Your mileage my vary.


    GenRocket - Experts at Building Test Data
    Charles McGuire
    Ranch Hand

    Joined: Jan 18, 2005
    Posts: 99
    Well, I just stepped on a big land mine. iBatis doesn't support auto-generated keys. Ugh.

    https://issues.apache.org/jira/browse/IBATIS-142
    Gregg Bolinger
    GenRocket Founder
    Ranch Hand

    Joined: Jul 11, 2001
    Posts: 15299
        
        6

    It does. Just not in a database independent way. For example, if using MySQL or MS SQL you can do this:

     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Spring + iBatis