Thursday, November 29, 2012

Spring bean threadsafety

Recently working on multi-thread safety issues, and read a interesting article regarding spring bean and thread safe. http://tarunsapra.wordpress.com/2011/08/21/spring-singleton-request-session-beans-and-thread-safety/ Please be aware one more thing, spring singleton is not a true singleton, is one instance per application context. So it is possible there are multiple instances inside JVM.

Tuesday, November 20, 2012

Four questions for every solution

1. What is the problem 2. What is the solution 3. Solution Matrix for Advantage and disadvantage. 4. What is the best solution http://www.dzone.com/links/r/is_programming_the_art_of_making_the_right_decisi.html

Monday, November 19, 2012

Java deadLock

Below it is the link of a blog regarding java dead Lock, it is very useful. http://www.captaindebug.com/p/blogs-on-investigating-deadlocks.html

Tuesday, October 9, 2012

Java Interview questions Link

Today I read one article regarding interview questions, it is basic but useful. I might use for future interview for Java developers. link is below. http://javarevisited.blogspot.com/2011/04/top-20-core-java-interview-questions.html

Tuesday, June 26, 2012

Manager vs Leader

Today I read a article and below statement is very interesting. Managers do things right, and leaders do the right thing. Then a manager who has a leadership will do the right things right. It reminds me a concept which a Chinese guy "Sun Tzu" said 2000 years ago in "The Art of War": a Strategist is making sure they are doing the right thing, and a Tactician is making sure the army is doing the thing right.

Tuesday, May 8, 2012

Pagination Solution

In the last couple of days, I had some discussions with some developers regarding how to implement Pagination, below are the notes. 1. Client side solution, good for small result (10-500), static data. Initial load is slow, but switch is fast. 2. Application server solution, good for medium result set (500- 1000), and relative static data. Initial load is slow. and switch is little slow. 3. Database solution, good for Large result set ( > 10000) and dynamic data. Initial load is faster than the other two, but switch pages are much slower depends on QUERY. If the query is complicated and expensive, then solution 3 will have big overhead. By the way, from scalability point of view, database solution is much more expensive as it will need query db multiple times and resources are also expensive (hard to scale).

Monday, March 5, 2012

JSF ajax exception handler solution

Recently I had some issues with JSF ajax exception handling, Primefaces 3.2 will fix it, so I am still waiting.

Below are the resources might helpful:

http://www.dzone.com/links/r/full_ajax_exception_handler_for_jsf_2.html
http://ovaraksin.blogspot.com/2010/10/global-handling-of-all-unchecked.html
http://stackoverflow.com/questions/464193/intercepting-exceptions-with-custom-jsf-event-handlers