Announcement Announcement Module
Collapse
No announcement yet.
JDBC rollback failed Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    karldmoore: well...nothing has changed. PLease have a look at my first post in this topic. There are my configurations.

    I am 100% this problems is because of the "idle period". I created a thread in the app that interogates the DB once at 30 minutes, and in this way everything is OK.

    Comment


    • #17
      Originally posted by tarjoadi View Post
      karldmoore: well...nothing has changed. PLease have a look at my first post in this topic. There are my configurations.
      If nothing has changed that would explain the problem . I thought you'd been playing with testOnBorrow and testWhileIdle, also I thought you'd extracted the dataSource configuration to a standalone dataSource.

      Originally posted by tarjoadi View Post
      I am 100% this problems is because of the "idle period". I created a thread in the app that interogates the DB once at 30 minutes, and in this way everything is OK.
      Indeed, so the connection must be timing out. This is supposed to be why there are "test" settings on the connection pool.
      Last edited by karldmoore; Aug 29th, 2007, 11:26 AM.

      Comment


      • #18
        karldmoore: sorry...besides my first configuration, I usd the below bean in my xxx-servlet.xml file :

        <bean id="DataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
        <property name="url" value="jdbc:mysql://localhost/telefon"/>
        <property name="username" value="root"/>
        <property name="password" value="XXXX"/>
        <property name="testWhileIdle" value="true"/>
        <property name="validationQuery" value="select 1 from dual"/>
        <property name="maxWait" value="60000"/>
        <property name="maxActive" value="50"/>
        </bean>

        This is all. I didn't configurate anything. As you see I didn't use testOnBorrow but only testWhileIdle.
        What do you think ? What could be the problem?

        10x

        Comment


        • #19
          P.S. Do I really have to use this query?
          "select 1 from dual"

          I don't have a dual table, so I think I should change it

          10x

          Comment


          • #20
            I think you just seen a simple SQL query that will execute quickly. As for testWhileIdle or testOnBorrow try both of the options and see if either helps.
            Last edited by karldmoore; Aug 29th, 2007, 11:26 AM.

            Comment

            Working...
            X