Thu, 17 November 2011
In this episode we go over Aspects (and AspectJ), what really is, and when to use them. It turns out, that there is nothing misterious about them! We also cover how to set-up Aspects for J2SE so you can start using them immediately! Questions, feedback or comments! comments@javapubhouse.com VM Parameter Example Aspect @Aspect Example aop.xml file <aspectj> Example Folder Structure src References: http://www.eclipse.org/aspectj/doc/released/adk15notebook/ataspectj-pcadvice.html http://www.eclipse.org/aspectj/doc/next/quick5.pdf http://blog.espenberntsen.net/2010/03/20/aspectj-cheat-sheet/ (Using aspects with annotations) |
Fri, 30 September 2011
In this episode of Java pub house, we talk about Deadlocks, livelocks (and other spooky things). Most importantly we talk on how to spot them (using jstack, or visualvm), and how to program defensively against them. We also talk about escaped locks (the source of most deadlocks), and the wait/notify language construct. Finally we describe the unfairness of the lock (locks are not "fair" by default), and why is it so. |