You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Gregg D Bolinger <gt...@gmail.com> on 2005/05/04 17:41:15 UTC

iBatis DAO Transaction Batch Default

Why doesn't iBatis DAOManager transactions batch by default?  Wouldn't
it make more sense?  It sure would solve a lot of problems for me.

Re: iBatis DAO Transaction Batch Default

Posted by Gregg D Bolinger <gt...@gmail.com>.
I'll take a look at that. Thanks a lot.

Gregg

On 5/7/05, Clinton Begin <cl...@gmail.com> wrote:
> 
>  Here's the cool thing....you can write your own DAO transaction
> implementation.  I'm assuming you're using SQL Maps.  If so, just copy the
> SQL Map transaction implementation from the DAO framework into your own
> package name.  Then, add startBatch() and endBatch() to the constructor and
> commit methods respectively.
>  
>  Then in your DAO config file, just use your own tx manager implementation
> name:
>  
>  <transactionManager
> type="your.package.and.TXMgrImplementation">
>  
>  Cheers,
>  Clinton
> 
>  
> 
> On 5/4/05, Gregg D Bolinger <gt...@gmail.com> wrote:
> > Why doesn't iBatis DAOManager transactions batch by default?  Wouldn't
> > it make more sense?  It sure would solve a lot of problems for me.
> > 
> 
>

Re: iBatis DAO Transaction Batch Default

Posted by Clinton Begin <cl...@gmail.com>.
Here's the cool thing....you can write your own DAO transaction 
implementation. I'm assuming you're using SQL Maps. If so, just copy the SQL 
Map transaction implementation from the DAO framework into your own package 
name. Then, add startBatch() and endBatch() to the constructor and commit 
methods respectively.

Then in your DAO config file, just use your own tx manager implementation 
name:

<transactionManager type="your.package.and.TXMgrImplementation">

Cheers,
Clinton


On 5/4/05, Gregg D Bolinger <gt...@gmail.com> wrote:
> 
> Why doesn't iBatis DAOManager transactions batch by default? Wouldn't
> it make more sense? It sure would solve a lot of problems for me.
>

Re: iBatis DAO

Posted by Ken <so...@gmail.com>.
Clinton Begin <clinton.begin <at> gmail.com> writes:

> 
> 
> You only get that if you call .forceCloseAll().
> Cheers,
> Clinton
> 
> On 5/4/05, Folashade Adeyosoye <shardayyy <at> gmail.com> wrote:
> Is this a normal logger/system out  output for iBatis DAODEBUG[2005-May-04 
22:47:24] -jdbc.SimpleDataSource(SimpleDataSource.java:506) - 
SimpleDataSourceforcefully closed/removed all connections.May 4, 2005 10:47:35 
PM 
> org.apache.catalina.core.StandardHost getDeployerINFO: Create Host deployer 
for direct deployment ( non-jmx )May 4, 2005 10:47:37 PM 
org.apache.coyote.http11.Http11Protocol startINFO: Starting Coyote HTTP/1.1 on 
http-8080
> May 4, 2005 10:47:37 PM org.apache.catalina.startup.Catalina startINFO: 
Server startup in 359227 msShardayyy
> 
> 
> 
> 



I am getting this same message "SimpleDataSource forcefully closed/removed all 
connections." several times in a row. I am not calling forceCloseAll.
I am calling iBatis from multiple threads. I have not put synchronized on the 
calling methods since I thought SimpleDataSource was thread safe.



Re: iBatis DAO

Posted by Clinton Begin <cl...@gmail.com>.
You only get that if you call .forceCloseAll().

Cheers,
Clinton

On 5/4/05, Folashade Adeyosoye <sh...@gmail.com> wrote:
> 
> 
> Is this a normal logger/system out output for iBatis DAO
> 
> DEBUG[2005-May-04 22:47:24] -
> jdbc.SimpleDataSource(SimpleDataSource.java:506) - SimpleDataSource
> forcefully closed/removed all connections.
> May 4, 2005 10:47:35 PM org.apache.catalina.core.StandardHost getDeployer
> INFO: Create Host deployer for direct deployment ( non-jmx )
> May 4, 2005 10:47:37 PM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-8080
> May 4, 2005 10:47:37 PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 359227 ms
> 
> Shardayyy
> 
>

iBatis DAO

Posted by Folashade Adeyosoye <sh...@gmail.com>.
Is this a normal logger/system out  output for iBatis DAO


DEBUG[2005-May-04 22:47:24] -
jdbc.SimpleDataSource(SimpleDataSource.java:506) - SimpleDataSource
forcefully closed/removed all connections.
May 4, 2005 10:47:35 PM org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx ) 
May 4, 2005 10:47:37 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 4, 2005 10:47:37 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 359227 ms



Shardayyy