Initial work

Actually, locking in general is sort of unneeded as any resource in JCA can only be accessed from one thread concurrently. So, I will revisit Lin's locking stuff as a result.