“Sir, can you please switch off your mobile phone or keep it in flight mode during the entire flight?” The flight attendant approached a young guy and told. The guy did not like what she said, looks like he was busy in a very important call and not in a mood to discontinue the conversation. But she did not give-up and thanks to the federal law, the guy had to hang the call and switch off his mobile. I often encounter such situation during flight, most of these occur either because of electronic devices or fastening of seat belt. These are very trivial matters but can generate greater negative impact during the flight. Let’s take the case of mobile phone or any electronic devices, these devices are equipped with Wi-Fi and may interfere with the cockpit devices causing communication breakdown. The modern flight operating devices are designed to block such interference; however it is highly recommended that the devices are switched off or kept in flight mode. There can b...
This is useful when a Singleton bean need to use a non-singleton bean. Sometime your application may need to collaborate a prototype bean with a singleton bean to satisfy your business logic. That is your singleton bean is dependent on a prototype bean. Let’s consider three beans Customer Sales Person Product A customer may ask a sales Person to show different type of products from the repository. Let’s assume you have gone to a garment shop to buy a new shirt for the lucky date with your new girlfriend. So, it’s a tough choice and you may like to try different colors and styles and finally you will choose one. So, if we describe the above situation in the form of business logic inside one of your module, it will look like this, The sales Person should show a new product every time he requests. Let’s assume Customer and Sales Person to be singleton bean in your Spring container and Product as prototype. But based on bean life-cycle a prototype bean can not be injec...