get things started with my spring apps. What if you create an interface
that and let me know.
> Brian,
> After modifying the code example to implement an interface and return
> it from the Bean Config, Spring is still using CGLIB. I discovered
> that if I use the xml configuration instead of the @Configuration, it
> works fine. Is this a way to force Spring not to use CGLIB when using
> the Config annotation?
> Sent from my Verizon Wireless Phone
> ----- Reply message -----
> From: "Brian Hurley" <brhur...@gmail.com>
> Date: Thu, Sep 8, 2011 8:48 pm
> Subject: Out of Memory PermGen issue when using Spring 3
> To: <javamug-discussion@googlegroups.com>
> In my experience using CGLIB can cause locking of the permgen memory
> for those classes and dependent classes. The first thing that you can
> do is to program to the interface and get rid of the CGLIB if
> possible. However, in the mean time you can increase the memory on
> the permgen.
> Lets see if anyone else has experience with this error and found a
> better way to solve it.
> Regards,
> Brian
> Zo wrote:
> > We are having an out of memory issue in our application.
> > Environment : JBoss 6.0, Spring 3, Hibernate 3.6
> > We use annotation based spring bean configuration as below. We get
> > context and close and end of the operation.
> > AnnotationConfigApplicationContext beanContext = new
> > AnnotationConfigApplicationContext(BeanConfig.class);
> > TestDAO testDAO = beanContext .getName("testDAO")
> > beanContext .close();
> > beanContext .destroy();
> > But the application ends to OOM issue ( perm gen) after processing few
> > messages.
> > JVM args at starting of server is below.
> > JAVA_OPTS=-Xms512M -Xmx768M -XX:MaxPermSize=256M -XX:+UseParNewGC -
> > XX:MaxNewSize=256m -XX:NewSize=256m -XX:MaxTenuringThreshold=0 -
> > XX:SurvivorRatio=128 -XX:+UseTLAB -XX:+UseConcMarkSweepGC -XX:
> > +CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled
> > Upon analyzing heap dump with visualvm, we see lots of cglib related
> > inner classes are not being reclaimed by GC.
> > class names like: BeanConfig$$EnhancerByCGLIB3232$$FastClassByCGLIB$$
> > $
> > Anyone having similar issue? Any help will be highly appreciated.
> --
> Regards,
> Brian Hurley
> Secret...@JavaMUG.org
> Leader Spring Dallas User Group
> --
> You received this message because you are subscribed to the Google
> Groups "JavaMUG Discussion" group.
> To post to this group, send email to javamug-discussion@googlegroups.com.
> To unsubscribe from this group, send email to
> javamug-discussion+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/javamug-discussion?hl=en.