code: @Override
  	public DistributedSchedulingLock updateNGetDistributedScheduleByType(LockType type,int jobsBlockSize, long schedulingRefreshInterval) {
  		requireNotDisposed();
  		requireArgument(type != null, "Lock type cannot be null.");
  
  		EntityManager em = emf.get();
  		while(true){
  			try{
  				DistributedSchedulingLock distributedSchedulingLock = DistributedSchedulingLock.updateNGetDistributedScheduleByType(em, type, jobsBlockSize,  schedulingRefreshInterval);
  				return distributedSchedulingLock;
  			}catch(OptimisticLockException ex){
  				_logger.info("Optimistic lock exception " + ex.toString());  
  			}catch(Throwable th){
  				_logger.error("Optimistic lock exception " + th.toString());   
  			}
  		}
  
  	}
docs: ~ Methods **************************************************************************************************************************************