4 Replies Latest reply on Aug 16, 2018 5:27 AM by Tom Jenkinson

    How to stop the evictor-thread ?

    中島佑樹 中島佑樹 Newbie

      We have developed web application server for enterprise with your org.jboss.narayana.tomcat.jta.TransactionalDataSourceFactory.

      When we set on timeBetweenEvictionRunsMillis, tomcat can't be stopped.

       

      The reason is the following thread dump:

      "commons-pool-evictor-thread" #40 prio=5 os_prio=0 tid=0x0000000021389800 nid=0x7408 waiting on condition [0x000000002776e000]

         java.lang.Thread.State: TIMED_WAITING (parking)

       

      We already checked that tomcat can be stopped when timeBetweenEvictionRunsMillis is not set.

       

      Please tell me how to stop the evictor-thread ?

       

      Tomcat 9.0.8

       

      narayana ver.

              <dependency>

                  <groupId>org.jboss.narayana.tomcat</groupId>

                  <artifactId>tomcat-jta</artifactId>

                  <version>5.8.2.Final</version>

              </dependency>

       

      context.xml

          <Transaction factory="org.jboss.narayana.tomcat.jta.UserTransactionFactory" />
          
          <Resource
              factory="org.jboss.narayana.tomcat.jta.TransactionManagerFactory"
              name="TransactionManager"
              type="javax.transaction.TransactionManager"/>
                  
          <Resource
              factory="org.jboss.narayana.tomcat.jta.TransactionSynchronizationRegistryFactory"
              name="TransactionSynchronizationRegistry"
              type="javax.transaction.TransactionSynchronizationRegistry" />
                  
          <Resource
              name="postgresDS"
              uniqueName="myDataSource"
              auth="Container"
              type="org.postgresql.xa.PGXADataSource"
              factory="org.postgresql.xa.PGXADataSourceFactory"
              databaseName="DATABASE_NAME"
              jmxEnabled="true"
              user="USER"
              password="PASSWORD"
              portNumber="PORT"
              serverName="SERVER_NAME"/>
      
          <Resource
              name="transactionalDataSource"
              uniqueName="transactionalDataSource"
              auth="Container"
              xaDataSource="postgresDS"
              type="javax.sql.XADataSource"
              factory="org.jboss.narayana.tomcat.jta.TransactionalDataSourceFactory"
              transactionManager="TransactionManager"
              driverClassName="com.arjuna.ats.jdbc.TransactionalDriver"
              username="USER"
              initialSize="INITIAL_SIZE"
              minIdle="MIN_IDLE"
              maxIdle="MAX_IDLE"
              maxTotal="MAX_TOTAL"
              poolPreparedStatements="true"
              maxOpenPreparedStatements="MAX_OPEN_PREPARED_STATEMENTS"
              jmxEnabled="true"
              timeBetweenEvictionRunsMillis="TIME_BETWEEN_EVICTION_RUNS_MILLIS"
              maxWaitMillis="MAX_WAIT_MILLIS"
              autoCommit="false"
              jmxName="Catalina:type=Resource,resourcetype=DataSource,context=/dl,name=dataSource"
              validationQuery="SELECT 1"
              validationInterval="10000"/>