Announcement Announcement Module
Collapse
No announcement yet.
Spring JDBC with Websphere 6.1/7 not closing connections Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring JDBC with Websphere 6.1/7 not closing connections

    Hi,

    It would be great if anybody could help in figuring out the DB connection issue that I have been facing. I looked into the Monitoring tool for Websphere 6.1/ 7.0 and saw that the number of open connections keeps on increasing.

    The error is: Could not get JDBC Connection; nested exception is com.ibm.websphere.ce.cm.ConnectionWaitTimeoutExcep tion: Connection not available, Timed out waiting for 360011

    Posted below is an excerpt of the config xml


    Code:
    <beans:bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
     <beans:property name="jndiName" value="java:comp/env/jdbc/myOracleDB"> </beans:property>
    <beans:property name="lookupOnStartup" value="false"></beans:property>
    <beans:property name="cache" value="true"></beans:property>
    <beans:property name="proxyInterface" value="javax.sql.DataSource"></beans:property>
    </beans:bean>
    
    <beans:bean id="transactionManager"
    	class="org.springframework.transaction.jta.WebSphereUowTransactionManager">
    </beans:bean>	
    	
    <tx:advice id="defaultTxAdvice">
    <tx:attributes>
    <tx:method name="get*" read-only="true"/>
    <tx:method name="retrieve*" read-only="true"/>
    <tx:method name="*"/>
    </tx:attributes>
    </tx:advice>
    Thanks in advance!

  • #2
    YOu have nothing that applies the transaction.. You are missing the aop:config stuff you only have the advice configured but not the where to apply the advice (I suggest a read of the reference guide which explains this).

    Comment


    • #3
      That solved the issue!
      Thanks Marten for the quick reply!

      Comment

      Working...
      X