This application demonstrates lock-based synchronization in RDBMS. It connects twice to a specified database instance. You can then run SQL statements against the two different connections, monitor the locks that are held, and watch the effects.
The application is packaged with an Apache Derby runtime, which allows you to run against an in-memory Derby database.