protected static Boolean tryToLock(String serviceName){
  DistributedLockService service=DistributedLockService.getServiceNamed(serviceName);
  boolean locked=service.lock("obj",1000,-1);
  if (locked) {
    service.unlock("obj");
  }
  return Boolean.valueOf(locked);
}

protected static Boolean tryToLock ( String serviceName ) { DistributedLockService service = DistributedLockService . getServiceNamed ( serviceName ) ; boolean locked = service . lock ( "obj" , 1000 , - 1 ) ; if ( locked ) { service . unlock ( "obj" ) ; } return Boolean . valueOf ( locked ) ; }
accessed via reflection . do not remove
