searchforsolutions

Just another WordPress.com site

Monthly Archives: January 2017

Optimizing start up time of an Spring application


  1. Load the bean lazily! Specify @Lazy (true) annotation for all the beans!
  2. Instead of class path scanning the beans could be loaded from a particular package name format or have a list of classes generated before hand (write some utility to generate discovered beans and dump in csv and then use it to load only certain beans)
Advertisements

Concurrency control for database updates


A good blog for reading about database issues with concurrent uupdates and how to resolve it apart from optimistic locking

A beginner’s guide to database locking and the lost update phenomena

How to prevent lost updates in long conversations

How to prevent OptimisticLockException with Hibernate versionless optimistic locking