We faced CodeCache full with jdk 1.6.x versions for our application and it doesn't get empty automatically. Only when we force it to do in JVM options.
Can we expect better codecache handling in Java 7 version?
Looks like it has been fixed in later versions, and even if you are using a JDK 1.6 version which has this issue, you might have to configure some custom setting for Code Cache flushing to avoid this exception, because looks like the default code cache memory allocation and the default flushing is not sufficient for your scenario.