From the course: Java EE: Design Patterns and Architecture
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Singleton pattern concurrency
From the course: Java EE: Design Patterns and Architecture
Singleton pattern concurrency
- [Instructor] So already we have seen how the Java EE implementation of the singleton pattern is substantially different to its classical implementation. And requires substantially less code to achieve the same, or better, results. We have been given more control over when the bean is instantiated, either at application startup or on first use. We can specify a method to execute after the bean has been instantiated, that perform startup tasks, and we can specify its dependency on successful instantiation of another bean. These new features enhance the behavior and performance of the singleton bean substantially. But we can go further. Remember that I mentioned that the singleton bean is thread-safe by default, as concurrency is managed by the container. Well Java EE offers two types of concurrency management. Container-managed concurrency, and bean-managed concurrency. By default the container manages the concurrency, removing the need to implement the usual concurrency solutions…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Classic design patterns revisited1m 51s
-
(Locked)
The Singleton design pattern2m 6s
-
(Locked)
Implement a Singleton pool manager5m 58s
-
(Locked)
Advanced Singleton pattern3m 58s
-
(Locked)
Singleton pattern concurrency5m 4s
-
(Locked)
The Facade design pattern2m 10s
-
(Locked)
Implement the Facade pattern4m 54s
-
(Locked)
Advanced Facade services4m 59s
-
(Locked)
The Observer design pattern3m 14s
-
(Locked)
Implement Observer pattern8m 3s
-
(Locked)
Observer priority and qualifiers7m 28s
-
(Locked)
Asynchronous observer3m 54s
-
(Locked)
The Decorator design pattern2m 16s
-
(Locked)
Implement the Decorator pattern8m 39s
-
-
-
-
-
-
-
-
-