@Override
	public void  sendProbe(ArrayList<Integer> probelist, int resID) throws RemoteException {

		if(activeTransaction == null){
			System.out.println("LOL1");
			//resources.get(resID).notifyShiet(null);
			return;
		}
		ResourceAccess waitingForResource = activeTransaction.getWaitingForResource();
		if(waitingForResource == null){
			System.out.println("LOL2");
			resources.get(resID).notifyShiet(null);
			return;
		}
		System.out.println("LOL3");	
		if(activeTransaction != null && waitingForResource != null){
		if(probelist.contains(activeTransaction.getTransactionId())){
			System.out.println("This transaction has gone in a loop: " + activeTransaction.getTransactionId());
			//probelist.add(activeTransaction.getTransactionId());						
			printhehe(probelist, activeTransaction.getTransactionId());
			System.out.println("RESID: + " + resID);
			//resources.get(resID).doAbort(activeTransaction);
			waitingForResource.server.doAbort(waitingForResource.resourceId, activeTransaction.getTransactionId());
			//notifyAll();
		}
		else{
			System.out.println("halla");
			
			int resourceID = waitingForResource.resourceId;
			int lockowner = waitingForResource.server.getResourceOwnerID(resourceID);

			if(lockowner != -1){
				int newServerID = getTransactionOwner(lockowner);
				Server newServer = getServer(newServerID);
				ProbeMessage probeMessage = new ProbeMessage(activeTransaction.getTransactionId(), probelist, newServer, resourceID);
				probeMessage.start();
			}
			// if(waitingForResource != null){
			// 	int resourceID = waitingForResource.resourceId;
			// 	int lockowner = waitingForResource.server.getResourceOwnerID(resourceID);
			// 	// getServer(getTransactionOwner(lockowner)).sendProbe(probelist, resID);
			// 	System.out.println(activeTransaction);
			// 	System.out.println(activeTransaction.getWaitingForResource());
			// 	System.out.println(activeTransaction.getWaitingForResource().server);
			// 	activeTransaction.getWaitingForResource().server.sendProbe(probelist,resID);
			// }
		}
	}
	}