Hi,

Do you know when it will close the connection? We are facing a situation
that there are too many connections not closed after a long running of
applications, such that sometimes connections are not available to other
applications. I am not sure whether ibatis will close the connection
automatically, as I have browsed the source code that not found any coding
or framework that do this "close" connection job. 

I guess the connections are closed by the Garbage collector but not under
control by ibatis.

Any experts can comment on this?

Thanks,
Raymond


Jeff Butler-2 wrote:
> 
> Why are you calling conn.close()?  iBATIS closes connections
> automatically.
> 
> Jeff Butler
> 
> On Mon, Aug 18, 2008 at 11:45 AM, SonyRaymond <[EMAIL PROTECTED]> wrote:
> 
>>
>> No spring or EJB has been used. Only common JDBC calls
>>
>> This is my 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>
>>  <context>
>>        <transactionManager type="JDBC">
>>                <property name="DataSource" value="JNDI"/>
>>                <property name="DBJndiContext"
>> value="java:comp/env/jdbc/datasource-mssql"/>
>>        </transactionManager>
>>    <dao interface="com.aiab.iso.dbaccess.isoDaoIF"
>> implementation="com.aiab.iso.dbaccess.isoDaoJdbc" />
>>  </context>
>>  <context>
>>        <transactionManager type="JDBC">
>>                <property name="DataSource" value="JNDI"/>
>>                <property name="DBJndiContext"
>> value="java:comp/env/jdbc/datasource-sybase"/>
>>        </transactionManager>
>>    <dao interface="com.aiab.iso.dbaccess.isoSybaseDaoIF"
>> implementation="com.aiab.iso.dbaccess.isoSybaseDaoJdbc"/>
>>  </context>
>> </daoConfig>
>>
>> Exception : com.ibatis.dao.client.DaoException: Error ending JDBC
>> transaction.  Cause: com.ibm.websphere.ce.cm.ObjectClosedException:
>> DSRA9110E: Connection is closed.
>>
>> This exception is raised when "conn.close()" is executed. ** Where conn
>> is
>> SQLConnection
>>
>> I use MSSQL JDBC Driver for this testing.
>>
>> Any help??
>>
>> Thanks in advance,
>> Raymond
>>
>>
>> Clinton Begin wrote:
>> >
>> > Certainly not... :-)
>> >
>> > We'll need more information about your configuration:
>> >
>> > Which transaction manager are you using?  Which data source?  Which
>> > database
>> > driver
>> >
>> > Are you using Spring or EJB?
>> >
>> > Clinton
>> >
>> > On Fri, Aug 8, 2008 at 9:20 AM, SonyRaymond <[EMAIL PROTECTED]> wrote:
>> >
>> >>
>> >> Hi,
>> >>
>> >> I experience the following situation when using iBatis 2.2 with
>> WebSphere
>> >> 5.1 JNDI datasource, closing database connection after use will make
>> the
>> >> next getConnection() call gives error exception? (Connection
>> >> is closed!)
>> >>
>> >> Is it normal?
>> >>
>> >> Thanks,
>> >> Raymond
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Close-Connection-after-use--tp18893861p18893861.html
>> >> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Close-Connection-after-use--tp18893861p19035411.html
>>  Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Close-Connection-after-use--tp18893861p19110838.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

Reply via email to