This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*-----------------Beanfactory vs Application Context | |
Beanfactory: | |
Bean instantiating/autowiring | |
Application Context: | |
Bean instantiating/autowiring | |
Automatic BeanPostProcessor registraion | |
Automatic BeanFactoryPostProcessor registraion | |
Convenient MessageSource access (i18) | |
ApplicationEvent publication |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Transaction Isolation levels: | |
Voilations: | |
Dirty Reads - A updates,B reads, A rollbacks | |
Non-Repeatable Reads - A reads, B Updates, A reads found 2 records for same. | |
Phantom Reads - A reads with where critaria, B insert new record which falls in that where critaria, A reads records with same. | |
TRANSACTION_READ_UNCOMMITTED | |
TRANSACTION_READ_COMMITTED | |
TRANSACTION_REPEATABLE_READ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*--------- Executor Framework -----------*/ | |
java.util.concurrent.Executors | |
Executor API de-couples execution of tasks from actual task to be executed via Executors | |
Executor framework to schedule and execute the submitted tasks and return the result from thread pool. | |
1. Overhead of thread creation & tear-down | |
2. For each process creating new thread occupy more memory & waste of resources. | |
ExecutorService executorService = Executors.newSingleThreadExecutor(); | |
ExecutorService executorService = Executors.newFixedThreadPool(); |
NewerOlder