Fancy Frameworks: A surefire way of consuming all the memory of any portlet container...

Perhaps as a secondary title I should put: "Why is every Liferay plugin writtin in plain old JSP?".

There is a very big trend toward wanting to build portlets using some form of fancy framework. It is a seductive notion. One filled with all manner of "potential" benefits.

There is also a very dangerous side effect. One that we don't initially consider, at least not until too much time and money has been spent. The problem is the design of the java classloader.

While great for security it forces each WAR to load it's own version of classes into the VM, these are not shared between apps. We all know this, right?

In the case of portals, this becomes a little bit of a problem because you tend to want to deploy portlets as separate bundles (WARs). But imagine what happens if you installed a whole bunch of individually packaged portlets which all use heavy frameworks. This will start to consume all the available perm gen space with class meta data.

You might wonder "Why is Liferay so slow?" But I assure you, the same problems would happen with a whole bunch of regular old webapps all using heavy frameworks.

If all the Liferay plugins used Spring MVC for instance, (this is not a knock at Spring MVC, it's a great framework, I'm just using it as an example, the same issue would arrise with any JSF or other heavy framework) by the time you reached the 7th or 8th plugin you might start to notice the effect these are having on the VM's memory consumption.

If your project is planing for lots separation (as Liferay's plugins are generally designed), consider using the lightest possible framework, or using a framework that you can share globally between the plugins (as is the case with JSP, and some Liferay specific portlet bridges, and why we use plain old JSP almost exclusively).

I don't like the idea of building huge bundles, BUT in the case of heavy design frameworks you may find you have no choice but to bundle portlets into groups in order to save on memory.

So keep this in mind!

Blogs
Don't IBM and BEA's java runtimes not use permgen space?
However they deal with class meta data to distinguish between classloaders you will likely see the same problem, though to be honest the synopsis above is one I gather from using Sun's JDK.
Bonjour désolé de vous contactez ici.(je n'est pas trouvé moyen pour vous contacter directement..) voilà j'ai un petit problème et j'aimerai bien que vous me donniez votre avis...merci d'avance

http://www.liferay.com/web/guest/community/forums/-/message_boards/message/3075466
It would be great if Liferay get's rid of the old school JSP and Struts in favor of JSF or another "heavy" framework.
Hi Ray,
Although I am aware that it would have a huge impact, I suppose that implementing your entire portal on a platform like springsource dm server could solve a lot of these issues (this is the primary focus of OSGi).

Obviously you would trade in those issues for other problems, but I suppose that keeping an eye on what's happening in the Spring DM / DM Server world could be a Good Thing emoticon
ugg,boots shoes,ugg boots,buy ugg boots,argyle knit,knit argyle,mini boots,buy leather boots,boots on sale,boots sale,2010 ugg boots,ugg boots 2010,boots store,classic crochet,classic crochet boots,womens boots on sale,boots for sale,boots in sale,short boots,classic boots,ugg australia,classic tall,discount ugg boots,ugg 2010,ugg company,ugg discount boots,ugg bailey button,cheap womens boots,discount womens boots,womens boots,cheap leather boots,discount leather boots,leather boots,ugg australia boots ,uggstore,kids snow boots,snow boots for kids,uggs 2010,uggs,ugg boots discount,cheap ugg boots,classic knit,ugg 5879,classic argyle knit,classic argyle knit boots,ugg classic argyle knit,classic mini boot,classic sheepskin,classic mini,cheap winter boots,discount winter boots,classic mini for sale,buy classic mini,classic sheepskins,comfortable boots,short leather boots,best winter boots,knee high boots,boat shoes,blue boots,boots online,womens boot,furry boots for women,cheap tall boots,girls boots,thigh boots,thigh high boots,fur boots cheap,waterproof boots,thigh high boots for women,cheap furry boots,full fur boots,ugg classic crochet 5833,ugg 5833 boots,crochet boot,fur boots on sale,cheap crochet boots,crochet boots,ugg 5833,boots uk,green ankle boots,where to buy boots,classic crochet tall,cheap fashion boots,cheap flat boots,flat boots,classic boot,over the knee boots,short boot,boots on line,black leather boots,ugg 5825 boots,short sand,high leather boots,pink in boots,knee boots,ugg classic short 5825,ugg 5825,short classics,classic short 5825,boots usa,australia classic short boots,winter boots,winter boots for women on sale,winter boots on sale,boot shop,knitted boots for women,classic cardy 5819,australia classic cardy boots,australia classic cardy,classic cardy black,australia cardy classic boot,ugg 5819,ugg 5819 boots,ugg classic cardy 5819,grey cardy boots,cream boots,white boots,black cardy boots,classic tall sand,red back boots,red boots,ugg 5815 boots ,pink boots for women,ugg classic tall 5815,classic tall 5815,leggings and boots,ugg 5815,waterproof leather boots,waterproof sheepskin boots,classic tall metallic,cheap fur boots,waterproof winter boots,golden boot,gold boots,gold ankle boots,bailey button boot,pink fur boots,snow boot,bailey button 5803,bailey button chocolate,ugg bailey button 5803,ugg 5803,black knit boots,shop for boots,woman boots on sale,womens shoes boots,boots shop,classic sheepskin boots,boots to buy,buy boots,fur boots for women,green boots,boots with fur,female boots,real fur boots,cheap snow boots,ugg 5359,furry boot,cheap grey boots,cheap brown boots,cozy bootswoman boots,long black boots,black shoe boots,big boots,boot for women,cheap over the knee boots,boot on sale,lace up boots,boot for sale,ankle boots,cheap thigh high boots,cheap knee high boots,boots that are in style,style boots,tall sheepskin boot,boots and all,tall boots,tall boots on sale,snow wear,fall boots,boots shoe stores,patent boots,patent leather boots,love from australia,boot uk,hot boots,shoes australia,kid classic,new boots,boots with the fur,grey boots for women,grey boots on sale,boots on sales,boots sales,boots and more,womens boots and shoes,long boots,button boot,pink boots,leather boots on sale,long leather boots,cheap ankle boots,grey boot,grey boots,boot chocolate,black boots,fashion boots,fur boots,