sp_getapplock not working in multiple Connection I wrote below script and run it in two tab of SQL Server management studio:

DECLARE @RC INT
Begin TRAN
    Exec @RC =sp_getapplock @Resource='MyLock', @LockMode='Exclusive', @LockOwner='Transaction', @LockTimeout = 15000

    SELECT @@SPID [session_id], @RC [return code], GETDATE()
    WAITFOR DELAY '00:00:08'            
COMMIT


One of the execution wait 8 seconds and another wait 16 seconds. I was expecting it and every things is fine.
But when I open two SQL Sever management studio which connected same instance, and run this script, It is not working and both executing wait 8 seconds!

I test my scenario in two Management Studios in two PCs that connected to same SQL Server instance. 

Do sp_getapplock not working in multiple Connection?
Detailing the answer added to the question, according to the sp_getapplock documentation, (emphasis added):


  The lock resource created by sp_getapplock is created in the current
  database for the session. Each lock resource is identified by the
  combined values of: 




  The database ID of the database containing the lock resource.


  The database principle specified in the @DbPrincipal parameter.


  The lock name specified in the @Resource parameter.