The ThreadLocal is very helpful to keep some information available from anywhere in the application but it is very important to release it when the process ends, otherwise, the resource will never be free and can cause a memory leak. Here is an example of using TheadLocal to store data in a web application. I… Continue reading ThreadLocal usage
Month: September 2014
My Eclipse shortcuts
Here is a list of my favorite shortcuts I use with Eclipse: [Ctrl]+[D]: Delete row [Ctrl]+[F]: Search in file [Ctrl]+[H]: Search->search… [Ctrl]+[O]: Navigation->Quick outline [Ctrl]+[Q]: Last edit location [Ctrl]+[S]: save the current tab [Ctrl]+[T]: Navigation->Quick type hierarchy [Alt]+[left/right]: Back/next to tab [Alt]+[up/down]: Move row [Ctrl]+[Shift]+[C]: Comment selection/uncomment commented selection [Ctrl]+[Shift]+[G]: Search->references->workspace [Ctrl]+[Shift]+[R]: Navigation->Open resource [Ctrl]+[Shift]+[S]:… Continue reading My Eclipse shortcuts
Display Maven release number in JSF page
In the web projects, it is often useful to see quickly the version of the deployed application. A simple solution is to get it from Maven and display it in our page, in footer or a “about” page. The main idea is to use a property file as a JSF resource as we can use,… Continue reading Display Maven release number in JSF page