ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfs <farhan.sar...@gmail.com>
Subject Re: DAO Framework - how to disable connection pooling..
Date Thu, 09 Oct 2008 18:32:31 GMT

Thanks for the quick followup Larry....

I think i need to give some more details here...

I have already OracleAs (Oc4j) connection pooling setup, and the jndi
datasource (jdbc/proxy) is already configured to use the very connection
pool. 

Anyways, last night while trying to test as to what the behavior of the
application would be if the connections in the CP go stale i.e. by shutting
down one of the db instance (which is one of the cluster nodes in the ORACLE
DB CLuster/RAC env) against which the connections were initially established
in the oracleAS Connection pool. 

The test results were a bit strange, for use-cases where iBatis was being
used (giving a hit after shutting down the RAC node) would result in
"Connection closed"  exception from iBatis (which is fine) BUT the
unexpected behavior is that right after that i would notice that all the
remaining DB Connections (9 out of 10) would failover to the other RAC node.
This would have certainly made sense if the Fast Connection Failover of oc4j
connection pooling was turned on, which is not.

Now to support the above argument, i ran another test on yet another
use-case which didn't had ibatis being used in the data-layer, and the
behavior was what i had expected at the first place. The same "Closed
Connection" exception occured BUT the connections don't failover to the
other node.

Above is the reason i posted the question and i have a feeling that may be
even if the ibatis pooling is turned off in my approach (as i assume from
your response) the failover capabilities of the iBatis connection pool are
still being employed ?

Thanks in advance.



 

so the strange behavior made me look into what ibatis is internally 

Larry Meadors wrote:
> 
> That's just going to use the pool defined by the container. Tomcat,
> jboss, whatever - that's where you'd need to change things.
> 
> Larry
> 
> 
> On Thu, Oct 9, 2008 at 2:39 AM, mfs <farhan.sarwar@gmail.com> wrote:
>>
>> Ok, well these would sound funny, but i didn't knew at all before today
>> that
>> iBatis DAO framework uses connection pooling internally. Anyways i am
>> somewhat struggling to figure out as to how to disable it..I dont have
>> any
>> attribute relating to it (and thats why didnt knew at all) but apparently
>> a
>> 10 connections pool is maintained by default...
>>
>>  <transactionManager type="JDBC" commitRequired="true">
>>        <dataSource type="JNDI">
>>      <property name="DataSource" value="jdbc/[schema]"/>
>>     </dataSource>
>>  </transactionManager>
>>
>> Please comment..
>>
>> I do plan to switch over to Spring DAOs soon, but for a month or so i
>> will
>> relying on the same..
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/DAO-Framework---how-to-disable-connection-pooling..-tp19894728p19894728.html
>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/DAO-Framework---how-to-disable-connection-pooling..-tp19894728p19904687.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Mime
View raw message