title: What is the difference between JDK dynamic proxy and CGLib?
body: <p>In case of the <a href="http://en.wikipedia.org/wiki/Proxy_pattern">Proxy Design Pattern</a>, What is the difference between <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Proxy.html">JDK's Dynamic Proxy</a> and third party dynamic code generation API s such as <a href="http://cglib.sourceforge.net/">CGLib</a>? </p>
  
  <p>What is the difference between using both the approaches and when should one prefer one over another?</p>