Good point. I had to create this table CREATE TABLE INT_LOCK ( LOCK_KEY CHAR(36) NOT NULL, REGION VARCHAR(100) NOT NULL, CLIENT_ID CHAR(36), CREATED_DATE TIMESTAMP NOT NULL, constraint INT_LOCK_PK primary key (LOCK_KEY, REGION) );
Theres good support for the same in spring data , using @Version annontation & optimistic locking or pessimistic locking even for clustered environment .
Great job as always Josh! I just today highlighted this video to one of my colleagues as an example of an excellent developer-oriented video.
"Using my second favorite place.. start.....stackoverflow..." 0:55, haha , we know what You are made of :> (Good tutorial)
is it supposed to create the db tables automatically for the lock? or you created them manually?
Good point.
I had to create this table
CREATE TABLE INT_LOCK (
LOCK_KEY CHAR(36) NOT NULL,
REGION VARCHAR(100) NOT NULL,
CLIENT_ID CHAR(36),
CREATED_DATE TIMESTAMP NOT NULL,
constraint INT_LOCK_PK primary key (LOCK_KEY, REGION)
);
Thank you for this video, I learned something today.
Will this work for mysql .i tried but registry coming null
getting initialization error for the final field ,private final LockRegistry registry;
Ok, not much spring-integration here, I thought. But it is the LockRegistry that is used!
With differenct JVMs will that solution work. And if not how can we handle?
Can you share github repo link.
I want a queuing approach instead of locking it, i want all the request to be processed but only one at a time
You can use some broker i.e. publisher consumer mechanism to achieve your requirement
Good demo .but no transaction controls ...
How can I do this with mongodb?
Theres good support for the same in spring data , using @Version annontation & optimistic locking or pessimistic locking even for clustered environment .
@@srvmojo9190 that will throw exception so you have to retry again
Please in future increase font zoom in IDE and browser... Good video
do NOT use verb in api uri, like "update", and do use correct http method PUT for update
Please increase the font
Arrgh, dark theme please.
No, please stay with the light theme. Stupid pseudo pro dark look doesn't make your code better nor is it easier to read.
@@zapl80 How old are you? Because the older you are, the more you appreciate the dark theme; it is easier on the eyes.
NO dark theme !!!! bad video!!!!! beeeee
J
3