private int getPeerLeaseCheckInterval ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getPeerLeaseCheckInterval" ) ; int intToReturn ; Integer peerLeaseCheckInterval = null ; try { peerLeaseCheckInterval = AccessController . doPrivileged ( new PrivilegedExceptionAction < Integer > ( ) { @ Override public Integer run ( ) { return Integer . getInteger ( "com.ibm.tx.jta.impl.PeerLeaseCheckInterval" , 20 ) ; // Default is 20 seconds } } ) ; } catch ( PrivilegedActionException e ) { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Exception setting Peer Lease-Check Interval" , e ) ; peerLeaseCheckInterval = null ; } if ( peerLeaseCheckInterval == null ) peerLeaseCheckInterval = new Integer ( 20 ) ; intToReturn = peerLeaseCheckInterval . intValue ( ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getPeerLeaseCheckInterval" , intToReturn ) ; return intToReturn ; }
This method retrieves a system property named com . ibm . tx . jta . impl . PeerLeaseCheckInterval which allows a value to be specified for the time we should wait between peer server status checks .