ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ming Xue <ming....@plateau.com>
Subject Re: Possible Connection Leak
Date Mon, 09 May 2005 18:14:42 GMT
Hi
 
I am using the SpringDAO framework,  basically the SqlMapDAOSupport and
SqlMapTemplate,  the Transaction is acturally controlled by Spring,  in this
case, how should I config the transaction of SqlMap,  should I use External
Type ?
 
  <transactionManager type="EXTERNAL">
    <dataSource type="JNDI">
      <property name="DataSource" value="java:/PlateauDS"/>
    </dataSource>
  </transactionManager>
 
Here is my DAO
 
public class MyDAO extends SqlMapDAOSupport implements MyDAOService
 
{
    public void myMethod () {
 
        getSqlMapClientTemplate().insert("insertAccount", account);
 
    }
 
}
 
The transaction is started in the EJB level, which calls the DAO, and a EJB
may call any number of DAO to do the job, in this case, 
do I need to put in the SQLMap.startTransaction  in the DAO code ?
 
Thanks
Ming
 
 
 

[Ming Xue] 
 
 
 -----Original Message-----
From: Clinton Begin [mailto:clinton.begin@gmail.com]
Sent: Monday, May 09, 2005 1:04 PM
To: ibatis-user-java@incubator.apache.org
Subject: Re: Possible Connection Leak



Yes, the approach I suggested should be used regardless of your transaction
type.

Cheers,
Clinton


On 5/9/05, Rafiq, Adnan < arafiq@carreker.com <mailto:arafiq@carreker.com> >
wrote: 

Thanks Clinton.
 
We are using session beans to manage transactions in our application.
Moreover, since we have multiple databases involved we are using XA-
drivers.
 
Will the approach you mentioned still work in this scenario?


-----Original Message-----
From: Clinton Begin [mailto: clinton.begin@gmail.com
<mailto:clinton.begin@gmail.com> ]
Sent: Saturday, May 07, 2005 9:30 PM
To: ibatis-user-java@incubator.apache.org
<mailto:ibatis-user-java@incubator.apache.org> 
Subject: Re: Possible Connection Leak



Do ALL of your SqlMap calls follow this pattern:

try {
  sqlMap.startTransaction();
  //...do work
  sqlMap.commitTransaction();
} finally {
  sqlMap.endTransaction();
}

Clinton



On 5/6/05, Rafiq, Adnan < arafiq@carreker.com <mailto:arafiq@carreker.com> >
wrote: 

I am using a transaction manager type = JTA in my sql-map-config.xml file.
After running the application for a while, I am getting the following
message in my Weblogic 8.1 console:

<May 6, 2005 5:09:08 PM CDT> <Warning> <Common> <BEA-000620> <Forcibly

releasing
inactive resource "weblogic.jdbc.common.internal.ConnectionEnv@57bebf" back
into the pool "TP_BOFA_SYS".>

According to BEA, there is a connection leak somewhere. Is it possible that 
iBatis is not properly closing a connection after obtaining it?

Has anyone else come across a similar issue?





Mime
View raw message