Here is the code snippet for the transaction management

<bean id="txManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
                <property name="dataSource" ref="dataSource" />
        </bean>
        <tx:annotation-driven transaction-manager="txManager" />        
        
        <tx:advice  id="txAdvice" transaction-manager="txManager" >
                <tx:attributes>
                        <tx:method name="get*" propagation="SUPPORTS" 
read-only="true"/>
                        <tx:method name="*" propagation="REQUIRED"
rollback-for="java.sql.SQLException,com.framework.exception.types.BusinessException"/>
                </tx:attributes>
        </tx:advice>
        
        <aop:config>
            <aop:pointcut id="databaseOperation" expression="execution(*
com..business.component..*(..))"/>
            <aop:advisor advice-ref="txAdvice" 
pointcut-ref="databaseOperation"/>
        </aop:config>

& Here goes the code for ibatis configuration


<bean id="sqlMapClient"
class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
                <property name="configLocation"
value="classpath:com/dataservice/ibatis/config/SQLMapConfig.xml"/>
                <property name="dataSource" ref="dataSource"/>
                <property name="useTransactionAwareDataSource" value="true" />
                <property name="transactionConfigClass">
          
<value>com.ibatis.sqlmap.engine.transaction.external.ExternalTransactionConfig</value>
       </property>
                
                <property name="transactionConfigProperties">
           <props>
               <prop key="DefaultAutoCommit">false</prop>
           </props>
       </property>
                
        </bean> 


Nicholoz Koka Kiknadze wrote:
> 
> Hm, but I have used package variables at Oracle 9 times (with JDBC though,
> but iBatis just wraps JDBC) and it worked fine.
> 
> May I ask how do you handle transactions, and may I look at the code
> snippet
> calling those procedures?
> 
> On Tue, Aug 4, 2009 at 9:44 AM, CuriousMind
> <yogeshcjad...@hotmail.com>wrote:
> 
>>
>> Hi Nichol,
>>
>> Thanks for your response. We are already using same transaction while
>> calling these procedures.
>> But we are not getting expected results.
>>
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/PL-SQL-package-level-variables-tp24802267p25061697.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

Reply via email to