public static String getLockReservationName() { ThreadContext ctx = ThreadContext.getContext( true ); String ownerName = (String) ctx.get( PARTYLINE_LOCK_OWNER ); if ( ownerName == null ) { ownerName = "Context of: " + Thread.currentThread().getName(); ctx.put( PARTYLINE_LOCK_OWNER, ownerName ); } return ownerName; }