Thanks.
I am looking forward to see Spring support iBATIS 3.0.

I've created my own classes to support Spring's transaction. I've included them 
in this email if it can help someone.

Configuration in Spring context.
    <!-- iBATIS 3 -->
    <bean id="ibatisTransactionManager" 
class="org.apache.ibatis.transaction.managed.ManagedTransactionFactory"/>
    <bean id="ibatisEnvironment" class="org.apache.ibatis.mapping.Environment">
        <constructor-arg index="0" value="spring"/>
        <constructor-arg index="1" ref="ibatisTransactionManager"/>
        <constructor-arg index="2" ref="dataSource"/>
    </bean>
    <bean id="sqlSessionFactory" 
class="ca.qc.ircm.lims.persistence.mapper.SqlSessionFactoryBean">
        <property name="configLocation" 
value="classpath:ca/qc/ircm/lims/persistence/mapper/ibatisConfig.xml"/>
    </bean>

Configuration for iBATIS. You really only need to declare mappers...
<configuration>
    <mappers>
    </mappers>
</configuration>

Christian

-----Original Message-----
From: Clinton Begin [mailto:clinton.be...@gmail.com]
Sent: Friday, August 14, 2009 2:21 PM
To: user-java@ibatis.apache.org
Subject: Re: iBATIS 3.0 and Spring 2.5 integration

Awesome!

On Fri, Aug 14, 2009 at 12:14 PM, Gabriel Axel<guz...@gmail.com> wrote:
>
> Hi,
>
> I opened a JIRA request to add Spring support for iBatis 3 :
> http://jira.springframework.org/browse/SPR-5991
>
> I also implemented a very simple bean factory to do this and attached
> it to the request.
>
> Note: my implementation works with Spring 3.0 , but you may simple
> remove the generics to make it work with older versions.
>
> Gabriel
>
>
> Clinton Begin wrote:
>>
>> Nope.  In fact the compat library is not a supported library at this
>> time. It was primarily created to port the v2 unit tests to ibatis 3,
>> to ensure that we covered all of the known cases that iBATIS has
>> learned abut over the last 7 years.
>>
>> I'm not sure a compatibility layer is a good idea this time.  I did
>> it between V1 and V2, but that was a simpler transition.  There's a
>> much greater delta between V2 and V3.
>>
>> So, my thought was to use the compat library to load V2 config files
>> into a V3 Configuration object, then create a ConfigurationWriter
>> class to write out the equivalent V3 XML files....
>>
>> Then it would be safe to write a delegating wrapper to allow the old
>> V2 Java code to work with the V3  core and config files...
>>
>> Unfortunately, I'm out of time on that one.  I'd love to see if
>> someone could write a ConfigurationWriter class... that's a nice
>> isolated unit of work for someone in the community to try.
>>
>> The Configuration class should allow for introspection on the full
>> iBATIS configuration.  There may be one or two edge cases.
>>
>> Clinton
>>
>> On Fri, Aug 14, 2009 at 9:27 AM, Zhubin Salehi<zhooz...@yahoo.com> wrote:
>>>
>>> So here comes "Mr. Attitude" again:
>>>
>>> I was wondering if iBATIS 3.0 is supposed to work with Spring 2.5
>>> through ibatis-compat library or not. I get a NoClassDefFoundError
>>> exception when I try to run my application on Tomcat 6:
>>>
>>> java.lang.NoClassDefFoundError:
>>> com/ibatis/common/xml/NodeletException
>>>
>>> The stack trace doesn't say much about the root of the exception so
>>> I was not able to figure out if it is Spring that is trying to
>>> access that class or iBATIS. Also com.ibatis.common.xml package is
>>> not in ibatis-compat library.
>>>
>>> Andy ideas?
>>>
>>> Zhubin
>>> --
>>> View this message in context:
>>> http://www.nabble.com/iBATIS-3.0-and-Spring-2.5-integration-tp249735
>>> 90p24973590.html Sent from the iBATIS - User - Java mailing list
>>> archive at Nabble.com.
>>>
>>>
>>> --------------------------------------------------------------------
>>> - To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
>>> For additional commands, e-mail: user-java-h...@ibatis.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
>> For additional commands, e-mail: user-java-h...@ibatis.apache.org
>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/iBATIS-3.0-and-Spring-2.5-integration-tp24973590
> p24976251.html Sent from the iBATIS - User - Java mailing list archive
> at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
> For additional commands, e-mail: user-java-h...@ibatis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org

Attachment: SpringSqlSessionWrapper.java
Description: SpringSqlSessionWrapper.java

Attachment: SqlSessionFactoryBean.java
Description: SqlSessionFactoryBean.java

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org

Reply via email to