ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SonyRaymond <pp...@hotmail.com>
Subject Re: Close Connection after use?
Date Mon, 18 Aug 2008 16:45:54 GMT

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 <pplcm@hotmail.com> 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.


Mime
View raw message