ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fabrice MERCIER" <Fabrice.MERC...@123multimedia.com>
Subject RE: Disable Transactions into Ibatis How can I do
Date Tue, 03 Jan 2006 17:14:07 GMT
Ok I have supposed this so but how to specify my SQLMapConfig.xml now ?

Fabrice Mercier
123Multimedia
Tel interne : 3603
Tel externe : 0561431833

-----Message d'origine-----
De : Ben Munat [mailto:bent@munat.com] 
Envoyé : mardi 3 janvier 2006 18:12
À : user-java@ibatis.apache.org
Objet : Re: Disable Transactions into Ibatis How can I do

<transactionManager type="EXTERNAL">


b


Fabrice MERCIER wrote:
> To begin  : Happy new year !-D
> 
>  
> 
> More seriously (sorry) I use Ibatis for lot of projects it's a nice and 
> convenient framework !
> 
>  
> 
> At the moment I would like to disabled any transaction into ibatis 
> because requests are embeded into procedure executed on a SQL Server side
> 
>  
> 
> Bellow an extract of my config :
> 
>  
> 
> *DAO.XML*
> 
>  
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
>  
> 
> <!DOCTYPE daoConfig
> 
>     PUBLIC "-//iBATIS.com//DTD DAO Configuration 2.0//EN"
> 
>     "http://www.ibatis.com/dtd/dao-2.dtd">
> 
>  
> 
> <daoConfig>
> 
>  
> 
>   <properties resource="database.properties"/>
> 
>  
> 
>   <context>
> 
>  
> 
>     <transactionManager type="SQLMAP">
> 
>       <property name="SqlMapConfigResource" 
> value="sqlmapdao/sql/sql-map-config.xml"/>
> 
>     </transactionManager>
> 
>  
> 
> ...
> 
> </context>
> 
>  
> 
>  
> 
> *SQL-MAP-CONFIG.XML*
> 
>  
> 
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> 
> <!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 
> 2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
> 
>  
> 
> <sqlMapConfig>
> 
>  
> 
>   <settings
> 
>     cacheModelsEnabled="true"
> 
>     enhancementEnabled="true"
> 
>     maxSessions="64"
> 
>     maxTransactions="8"
> 
>     maxRequests="128"/>
> 
>  
> 
>   <transactionManager type="JDBC">
> 
>     <dataSource type="SIMPLE">
> 
>                   <property name="JDBC.Driver"        value="${driver}"/>
> 
>                   <property name="JDBC.ConnectionURL" 
> value="${url}${dataBaseName}"/>
> 
>                   <property name="JDBC.Username"      value="${username}"/>
> 
>                   <property name="JDBC.Password"      value="${password}"/>
> 
> *      **<**property **name**=**"JDBC.DefaultAutoCommit"        
> **value**=**"false"**/>***
> 
>         <property name="Pool.PingQuery" value="select @@VERSION"/>    
> 
>         <property name="Pool.PingEnabled" value="true"/>      
> 
>       <property name="Pool.MaximumActiveConnections" value="10"/>
> 
>       <property name="Pool.MaximumIdleConnections"   value="5"/>
> 
>       <property name="Pool.MaximumCheckoutTime"      value="120000"/>
> 
>     </dataSource>
> 
>   </transactionManager>
> 
>  
> 
> I disabled default autoCommit but when I check a dump of catalina.out
> 
> I can see that transaction are still actived !!!
> 
>  
> 
> EXAMPLE :
> 
>  
> 
> "TP-Processor119" daemon prio=1 tid=0x08f48030 nid=0x9a8 in 
> Object.wait() [ab689000..ab68a8b8]
> 
>       at java.lang.Object.wait(Native Method)
> 
>       at java.lang.Object.wait(Object.java:429)
> 
>       at com.ibatis.common.util.Throttle.increment(Throttle.java:69)
> 
>       - locked <0x47de5658> (a java.lang.Object)
> 
>       at com.ibatis.common.util.ThrottledPool.pop(ThrottledPool.java:60)
> 
>       at 
>
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.popSession(SqlMapExecuto
rDelegate.java:910)
> 
>       at 
>
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.<init>(SqlMapSessionImpl.java
:50)
> 
>       at 
>
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.getLocalSqlMapSession(SqlMapCl
ientImpl.java:214)
> 
>       at 
>
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.startTransaction(SqlMapClientI
mpl.java:102)
> 
>       at 
>
com.ibatis.dao.engine.transaction.sqlmap.SqlMapDaoTransaction.<init>(SqlMapDa
oTransaction.java:31)
> 
>       at 
>
com.ibatis.dao.engine.transaction.sqlmap.SqlMapDaoTransactionManager.startTra
nsaction(SqlMapDaoTransactionManager.java:65)
> 
>       at 
> com.ibatis.dao.engine.impl.DaoContext.startTransaction(DaoContext.java:91)
> 
>       at com.ibatis.dao.engine.impl.DaoProxy.invoke(DaoProxy.java:71)
> 
>       at $Proxy3.getIntervenantById(Unknown Source)
> 
>       at 
>
com.mm123.tchatanim.business.impl.IntervenantManagerImpl.getIntervenantById(I
ntervenantManagerImpl.java:69)
> 
>       at 
>
com.mm123.tchatanim.business.impl.ContextImpl.initialize(ContextImpl.java:111
)
> 
>       at 
>
com.mm123.tchatanim.business.impl.ContextImpl.initialize(ContextImpl.java:87)
> 
>       at 
>
com.mm123.tchatanim.business.ContextFactory.getContext(ContextFactory.java:34
)
> 
>       at 
>
org.apache.jsp.e_002daccueil.e_002daccueil_jsp._jspService(e_002daccueil_jsp.
java:69)
> 
>       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
> 
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 
>       at 
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:32
4)
> 
>       at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
> 
>       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
> 
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 
>       at 
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationF
ilterChain.java:237)
> 
>       at 
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCha
in.java:157)
> 
>       at 
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.jav
a:214)
> 
>       at 
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext
.java:104)
> 
>       at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> 
>       at 
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextV
alve.java:198)
> 
>       at 
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.jav
a:152)
> 
>       at 
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext
.java:104)
> 
>       at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> 
>       at 
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
> 
>       at 
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext
.java:104)
> 
>       at 
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
> 
>       at 
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext
.java:102)
> 
>       at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> 
>       at 
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109)
> 
>       at 
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext
.java:104)
> 
>       at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> 
>       at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> 
>       at 
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> 
>       at 
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
> 
>       at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
> 
>       at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
> 
>       at 
>
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
> 
>       at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
> 
>       at 
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java
:683)
> 
>       at java.lang.Thread.run(Thread.java:534)
> 
>  
> 
> "RUNNING" daemon prio=1 tid=0x08a26310 nid=0x9a8 in Object.wait() 
> [9df0b000..9df0b8b8]
> 
>             at java.lang.Object.wait(Native Method)
> 
>             at java.lang.Object.wait(Object.java:429)
> 
>             at com.ibatis.common.util.Throttle.increment(Throttle.java:69)
> 
>             - locked <0x47de5658> (a java.lang.Object)
> 
>             at 
> com.ibatis.common.util.ThrottledPool.pop(ThrottledPool.java:60)
> 
>             at 
>
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.popSession(SqlMapExecuto
rDelegate.java:910)
> 
>             at 
>
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.<init>(SqlMapSessionImpl.java
:50)
> 
>             at 
>
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.getLocalSqlMapSession(SqlMapCl
ientImpl.java:214)
> 
>             at 
>
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.startTransaction(SqlMapClientI
mpl.java:102)
> 
>             at 
>
com.ibatis.dao.engine.transaction.sqlmap.SqlMapDaoTransaction.<init>(SqlMapDa
oTransaction.java:31)
> 
>             at 
>
com.ibatis.dao.engine.transaction.sqlmap.SqlMapDaoTransactionManager.startTra
nsaction(SqlMapDaoTransactionManager.java:65)
> 
>             at 
> com.ibatis.dao.engine.impl.DaoContext.startTransaction(DaoContext.java:91)
> 
>             at com.ibatis.dao.engine.impl.DaoProxy.invoke(DaoProxy.java:71)
> 
>             at $Proxy0.getConnectedSessionId(Unknown Source)
> 
>             at 
>
com.mm123.tchatanim.business.impl.AnimStatManagerImpl.getStatsSessionId(AnimS
tatManagerImpl.java:832)
> 
>             at 
>
com.mm123.tchatanim.business.impl.AnimStatClientListener.messageCreated(AnimS
tatClientListener.java:145)
> 
>             at 
>
com.mm123.tchat.surv.impl.SurvClientCore.receiveMessageCreated(SurvClientCore
.java:664)
> 
>             at 
>
com.mm123.tchat.surv.server.socket.ActionsToSurvClientImpl.survMessageCreated
(ActionsToSurvClientImpl.java:81)
> 
>             at 
>
com.mm123.tchat.common.comm.tosurv.SurvMessageCreatedCommand.doTheProcessing(
SurvMessageCreatedCommand.java:85)
> 
>             at 
> com.mm123.socketcom.command.Command$CommandRun.run(Command.java:134)
> 
>             at 
>
com.mm123.socketcom.pool.PooledThreadManager.process(PooledThreadManager.java
:125)
> 
>             at 
> com.mm123.socketcom.pool.PooledThread.run(PooledThread.java:88)
> 
>  
> 
>  
> 
> Could you please help me to disabled totally transaction
> 
> And how can I do set a timeOut for each request ???
> 
>  
> 
> Thanks a lot
> 
>  
> 
> Fabrice
> 
>  
> 
>  
> 

Mime
View raw message