See http://my.oschina.net/itblog/blog/211693