[ 
https://issues.apache.org/jira/browse/ARTEMIS-1447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16198740#comment-16198740
 ] 

ASF GitHub Bot commented on ARTEMIS-1447:
-----------------------------------------

Github user franz1981 commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1576
  
    @clebertsuconic You're right, I need to take a better example to explain 
what I mean.
    Quoting from the `CriticalAnaylizerImpl`:
    
    ```
          // we are not using any Thread Pool or any Scheduled Executors from 
the ArtemisServer
          // as that would defeat the purpose,
          // as in any deadlocks the schedulers may be starving for something 
not responding fast enough
          thread = new Thread("Artemis Critical Analyzer")
    ```
    The reason is similar: if for any reason (eg deadlocks/long JVM pauses/a 
single long running task) the live/backup locks wouldn't be renewed with the 
correct timing (ie not a matter to be fast but with a correct timing), the 
mechanics of the node manager will be compromised. It sounds cathastrofic but 
is the same limitation of the original JDBC lock of ActiveMQ 6: 
[LeaseDatabaseLocker](https://github.com/apache/activemq/blob/master/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/LeaseDatabaseLocker.java
 ).
    Hence I need 2 executors that cannot be shared with none in order to 
minimize the chance of being slowed down.
    To summarize:
    > if you need your own executor, still use the component which encapsulates 
that.. 
    
    I need 2 of them (live + backup), not shared and to use 
`scheduleWithFixedRate` instead of `scheduleWithFixedDelay` used in the 
`ActiveMQScheduledComponent`: probably is not the right choice.
    
    > if you can reuse one from the pool.. (It seems you can).. you can just 
pass in the argument.
    
    I can pass them in the argument, but given that I need them to be unshared 
and I can't be sure of it if they will be instantiated elsewhere.
    
    In order to use your advice what I can do (maybe similar) is to pass a 
common thread pool and run the scheduled executors on top of it.
    
    And Re the package there is a good place (and module) in your opinion where 
I could move the classes?
    
    
    
    
    
    
    



> JDBC NodeManager to support JDBC HA Shared Store
> ------------------------------------------------
>
>                 Key: ARTEMIS-1447
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1447
>             Project: ActiveMQ Artemis
>          Issue Type: New Feature
>          Components: Broker
>            Reporter: Francesco Nigro
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to