It was a sqlserver database. So I think it's the "Test Reserved Connections" in weblogic to test the connection periodically, and it's not set by default. Anyone knows what's the equivalent in Websphere, and is it being set by default? Thanks.

On 1/27/06, Sven Boden <[EMAIL PROTECTED]> wrote:

It looks a bit like
http://forums.bea.com/bea/message.jspa?messageID=200019770&tstart=0
Which database are using... sybase by any chance?

Regards,
Sven

Brent Ryan wrote:

>I don't believe this is an iBatis problem since you're letting your
>application server manage your transaction.  Your application server
>needs to validate the connections before handing them over so I'd check
>there.
>
>Brent
>
>  _____
>
>From: Scott Zhu [mailto:[EMAIL PROTECTED]]
>Sent: Friday, January 27, 2006 10:18 AM
>To: [email protected]
>Subject: reset jdbc connection
>
>
>   I'm using weblogic 8.1 in this case and transaction is managed by the
>application server. Here's my configuration for the sql map:
>
>   <transactionManager commitRequired="true" type="JDBC">
>     <dataSource type="JNDI">
>        <property name="DataSource" value="${dataSourceName}"/>
>     </dataSource>
>   </transactionManager>
>
>If I shutdown the database and bring it back, then click on some links
>that requires database access, I'd get the following exception
>sometimes:
>
>java.sql.SQLException: Cannot obtain connection: driverURL =
>jdbc:weblogic:pool:Campaign Barcelona, props =
>{enableTwoPhaseCommit=false, connectionPoolID=Campaign Barcelona,
>jdbcTxDataSource=true, dataSourceName=Campaign Data Source for
>partition1}.
>Nested Exception: java.lang.RuntimeException: Failed to setAutoCommit to
>true for pool connection.
> at weblogic.jdbc.wrapper.PoolConnection.init(PoolConnection.java:47)
> at weblogic.jdbc.pool.Driver.allocateConnection (Driver.java:254)
> at weblogic.jdbc.pool.Driver.connect(Driver.java:164)
> at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:509)
> at weblogic.jdbc.jts.Driver.connect(Driver.java:139)
> at weblogic.jdbc.common.internal.RmiDataSource.getConnection
>(RmiDataSource.java:305)
> at
>com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTrans
>action.java:48)
> at
> com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(
>JdbcTransaction.java:89)
> at
>com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQuery
>ForList(GeneralStatement.java :123)
> at
>com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMap
>ExecutorDelegate.java:610)
> at
>com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMap
>ExecutorDelegate.java:584)
> at
>com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessi
>onImpl.java:101)
> at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList
>(SqlMapClientImpl.java:78)
>...
>
>It seemed like it's trying to use an old connection which is not valid
>any more. I think I can try to enable " Test Reserved Connections" in
>weblogic to test the connections periodically to avoid this. But this
>problem doesn't seem to happen on raw jdbc access calls (not thru
>ibatis). So I wonder if there's some setting in ibatis I need to do to
>fix this. Thanks for any help.
>
>
>BbWorld '06
>New Client-Centered Program, Peers Aplenty, Party on Deck
>San Diego, CA February 28-March 2, 2006
>Register today! Visit: http://www.blackboard.com/company/events/bbworld/ to learn more.
>
>This e-mail is intended only for the personal and confidential use of the recipient(s) named above.
>It may include Blackboard confidential and proprietary information, and is not for redistribution.
>
>
>
>
>


Reply via email to